473,386 Members | 1,796 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Select the row in datagrid based on the row updated in underlying datatable

Hi,

I have a datagird having datatable as its datasource. It has a column
called "Check" which appears as checkbox in the grid. The user can
manually go and click on that field to check/uncheck it, and also the
user has the facility to check all the checkboxes with a click of a
button. To achieve this I am doing this..

On Button_Click
------------------------
For Each drDet As DataRow In dtMyData.Rows
' Validation performed
' If Validation is true then
drDet("Check") = True
' Else highlight the current row in the grid and exit the loop
Next

While doing this I want the user to see each row in the grid
HIGHLIGHTED (selected) as and when that row's "Check" column gets
checked. In the above code, I am not able to get the RowNumber so that
I can use DataGrid.Select(rownum) to select that row. The reason why I
want this feature is that at any time the above loop will break
depending upon a validation, and at that instance I want that
particular row to be selected.

Kindly advise.

Thanks,
Biju.

May 18 '06 #1
0 955

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Emerson | last post by:
The following assumes a System.Windows.Forms.DataGrid with a System.Data.DataTable set as the DataSource. I'm programming in C# Here's my scenario I click in a cell on a DataGrid. I enter some...
4
by: Angel | last post by:
How can I update the datatable with the datagrid values after the datagrid itself has been modified.? I assume it's not automatically done. Thanks.
2
by: Bajgon | last post by:
Hello, I have got a DataGrid and a DataTable, which is its DataSource. I can use DataTable.Rows.Find(key_value) method to locate any row in the DataTable, using values of key column. The...
5
by: John Richardson | last post by:
I've been bothered for some time about my DataGrid not populating my rows very quickly. I have about 10K rows loading into the grid. I create a datatable dt with 2 columns, an ID and a display. ...
4
by: Glenn Owens | last post by:
I have a DataGrid web control which I've dynamically populated with template columns to be used for bulk-editting. Generally, all of the columns are textbox and/or dropdownlist child controls. ...
11
by: Fred Nelson | last post by:
I have an application in which it would be VERY beneficial if I could obtain the names of the colums in a datagrid. For example dim datagrid1 as new datagrid datagrid1.datasource = (stored...
6
by: Strahimir Antoljak | last post by:
Is it possible (and how?) to get the data grid column name based on the DataGrid.CurrentCell? The DataGrid has assigned a TableStyle comprising selected columns (DataGridTextBoxColumn) from the...
3
by: astro | last post by:
I have a datagrid that is two levels down from the dataview (i.e. grandchild). I have spent 3 hours trying to get the syntax of determining it's real datasource (i.e. not it's source based on it's...
1
by: Jason Huang | last post by:
Hi, I have a DataGrid DataGrid1 in my C# Windows Form MyForm. The DataGrid1 uses DataTable as it's DataSource in the run time. Now that I have Column1 and Column2 and 2 DataRows in MyDataTable....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.