Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 167 results for
selectedcells
- Page 1
Number of rows selected in SelectedCells collection
Programming
Software Development
9 Years Ago
by midnite11
… the number of rows that are included in the total
SelectedCells
of a datagridview? This is where the user actually selects… is the total number of rows included in the entire
SelectedCells
collection. Appreciate any feed back.
Re: Number of rows selected in SelectedCells collection
Programming
Software Development
9 Years Ago
by deceptikon
… off the top of my head seems reasonable: rowCount = dgv.
SelectedCells
.OfType(Of DataGridViewCell)().Select(Function(x) x.RowIndex).Distinct().Count…
Re: Number of rows selected in SelectedCells collection
Programming
Software Development
9 Years Ago
by midnite11
… added each row index as I was looping thru the
SelectedCells
. I then used LINQ to extract out the Distinct Values…
Re: Number of rows selected in SelectedCells collection
Programming
Software Development
9 Years Ago
by midnite11
deceptikon, I could not use your suggestion as the
SelectedCells
does not include an "Of Type" property. Not sure how to transform what you provided into a valid LINQ query.
Re: Number of rows selected in SelectedCells collection
Programming
Software Development
9 Years Ago
by deceptikon
`OfType` is a LINQ extension method. You'd need to add `System.Linq` to your Imports statements and make sure that the appropriate assemblies are referenced.
Re: Number of rows selected in SelectedCells collection
Programming
Software Development
9 Years Ago
by midnite11
**Added System.Linq....received error below:** Error 105 Overload resolution failed because no accessible 'Select' can be called with these arguments: Extension method 'Public Function Select(Of TResult)(selector As System.Func(Of System.Windows.Forms.DataGridViewCell, Integer, TResult)) As System.Collections.Generic.IEnumerable(Of TResult)' …
Update MS ACCESS Database VB.NET
Programming
Software Development
13 Years Ago
by crispexops
… dgmain.CellContentClick tbid.Text = dgmain.
SelectedCells
(0).Value tbname.Text = dgmain.
SelectedCells
(1).Value tbyear.Text = dgmain.
SelectedCells
(2).Value tbdescrip.Text = dgmain…
How to Show Decimal Places in a Grid View
Programming
Software Development
10 Years Ago
by sundog1
….Text = dataGridView1.
SelectedCells
[4].Value.ToString(); txtAccTown.Text = dataGridView1.
SelectedCells
[2].Value.ToString(); txtAccCounty.Text = dataGridView1.
SelectedCells
[5].Value.ToString();…really to sure where to do this. It is '
SelectedCells
[5]' and '
SelectedCells
[6]' which hold the 'Cost' and 'Value'…
Re: How to Show Decimal Places in a Grid View
Programming
Software Development
10 Years Ago
by ddanbe
I thought you wanted to set the Value in the DGV For the textbox do: `txtSell.Text = dataGridView1.
SelectedCells
[6].Value.ToString("0.00");`
Object reference not set to an instance of an object.
Programming
Software Development
14 Years Ago
by tibebu.s
…= ""; } private void time_out_Click(object sender, EventArgs e) { employee_InformationDataGridView.
SelectedCells
[0].Style.ForeColor = Color.Red; time_out.Enabled = false; time_in.Enabled…
Select a datagrid row on load
Programming
Software Development
13 Years Ago
by harrispc
….CustName Select customers Me.DataGridView1.DataSource = cust Me.DataGridView1.
SelectedCells
() = '??? Do I assign this a value? Dim custselect …= DataGridView1.
SelectedCells
(1).Value Me.CustAccountsDataGridView.DataSource = From accounts In …
UPDATE SQL statement pulling in GDV value?
Programming
Software Development
11 Years Ago
by sundog1
… WHERE CashAccRef_FKID = '" + txtAccRef.Text + "' AND cashID = '" + dataGridView2.
SelectedCells
[0].Value.ToString() +"' "; //Creates a new version of… is causing the trouble is... ` AND cashID = '" + dataGridView2.
SelectedCells
[0].Value.ToString() +"' ";` even though the form loads…
Add rows per data copied from excel to datagrid
Programming
Software Development
10 Years Ago
by jared.geli
… Dim cc, iRow, iCol As Integer iRow = DataGridView1.
SelectedCells
(0).RowIndex iCol = DataGridView1.
SelectedCells
(0).ColumnIndex For i = 0 To tArr.Length…
Re: Add rows per data copied from excel to datagrid
Programming
Software Development
10 Years Ago
by jared.geli
… grid Dim r As Integer = dgv.
SelectedCells
(0).RowIndex Dim c As Integer = dgv.
SelectedCells
(0).ColumnIndex 'add rows into grid to…
Cells not to be pasted with values
Programming
Software Development
9 Years Ago
by jared.geli
….GetText().Split(Environment.NewLine) r = Form1.DataGridView1.
SelectedCells
(0).RowIndex c = Form1.DataGridView1.
SelectedCells
(0).ColumnIndex For i = 0 To tArr.Length…
Re: UPDATE SQL statement pulling in GDV value?
Programming
Software Development
11 Years Ago
by ChrisHunter
Is cashID an int value? If cashID is an int do `cashID = " + (int)dataGridView2.
SelectedCells
[0].Value + "";` In the long run the best thing to do is to creats a stored procedures on the database side, it will help prevent the SQL statements from being changed while you're editing you app.
Re: UPDATE SQL statement pulling in GDV value?
Programming
Software Development
11 Years Ago
by ChrisHunter
try `Convet.ToInt64(dataGridView2.
SelectedCells
[0].Value)` and see what happens. Let me know how you get on.
Re: UPDATE SQL statement pulling in GDV value?
Programming
Software Development
11 Years Ago
by sundog1
… IT! It was down to the... `cashID = '" + (int)dataGridView2.
SelectedCells
[0].Value + "'"` I just has to remove ' ' and…
Gridview is Very slow on the Cells change event
Programming
Web Development
14 Years Ago
by vuyiswamb
… stored in this array foreach (UltraGridCell cell in Gridstaff.DisplayLayout.
SelectedCells
) { if (cell.Column.Index == 0) { if (cell.Value != null &…
Value property (DataGgrid, WPF)
Programming
Software Development
14 Years Ago
by belkobot
Where have the property "Value"? in WinForms we can call: [B]DataGrid.
SelectedCells
[0].Value.ToString();[/B] but WPF DataGrid has not property "Value" (((
Read data from SQL
Programming
Software Development
14 Years Ago
by ShemoPT
…, username FROM [mybase].[myuser].[users] where username ='" & DataGridView1.
SelectedCells
(0).Value & "'") Dim GetVaule As New SQL…
how i insert values from one table to another table (MS-sql)
Programming
Software Development
14 Years Ago
by tibebu.s
… table. 10q private void time_in_Click(object sender, EventArgs e) { employee_InformationDataGridView.
SelectedCells
[0].Style.ForeColor = Color.Green; time_in.Enabled = false; time_out.Enabled…
current cell dirty state changed property
Programming
Software Development
13 Years Ago
by judithSampathwa
…(DataGridViewDataErrorContexts.Commit); if ((dgvSubContract.CurrentCell.Value != null)) { int r = dgvSubContract.
SelectedCells
[0].RowIndex; String subName = dgvSubContract.Rows[r].Cells[0].Value…
regarding datagrid view combo box column
Programming
Software Development
13 Years Ago
by judithSampathwa
…; } } } private void dgvSubContract_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) { int r = dgvSubContract.
SelectedCells
[0].RowIndex; if (!String.IsNullOrEmpty(string.Format("" + dgvSubContract…
datagridview cell validation
Programming
Software Development
13 Years Ago
by judithSampathwa
…. the code i wrote is below. [CODE] int row = dgvActions.
SelectedCells
[0].RowIndex; if (e.ColumnIndex == 2) { if (e.FormattedValue != null…
datagridview becomes empty, button disabled
Programming
Software Development
13 Years Ago
by AngelicOne
… = new SqlDataAdapter("DELETE FROM Book WHERE BookNumber = '" + dataGridView1.
SelectedCells
[2].Value + "'", con); da.Fill(ds); this.Display…
Re: datagridview becomes empty, button disabled
Programming
Software Development
13 Years Ago
by AngelicOne
… = new SqlDataAdapter("DELETE FROM Transactions WHERE Transaction_No = '" + dataGridView1.
SelectedCells
[0].Value + "'", con); da.Fill(ds); this.Display…
task manager
Programming
Software Development
13 Years Ago
by eikal
… thinking it would look something like this [code] if datagridview1.
selectedcells
= anitem.processname then anitem.kill end if [/code] i know…
DataGridView
Programming
Software Development
13 Years Ago
by trippinz
….Text); } } private void button3_Click(object sender, EventArgs e) { FileLocationToRun = dataGridView1.
SelectedCells
[1].Value.ToString(); Process.Start(FileLocationToRun); } private void button4_Click(object…
Re: DataGridView
Programming
Software Development
13 Years Ago
by trippinz
…} } private void button3_Click(object sender, EventArgs e) { try { FileLocationToRun = dataGridView1.
SelectedCells
[1].Value.ToString(); Process.Start(FileLocationToRun); } catch { MessageBox.Show("…
1
2
3
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC