|
-
Nov 19th, 2003, 04:50 AM
#1
Thread Starter
Addicted Member
Highlight Datagrid row based on a column value
I've searched for this in the forums but could not find an answer, can anybody help?
I want to Highlighting a Datagrid Row based on a column value
I've refreshed my DataGrid and now I want to go to the row that contains a specific value.
ie, 2 Columns NAME, ID
1000 rows.
I want to highlight the Row with ID = 700
This does not seem to work:
Code:
Dim x As Integer
'
' the count of rows is in the Tag.
For x = 0 To CInt(dgMPANS.Tag) - 1
If CType(dgMPANS.Item(x, 1), String) = strSelectedMPAN Then
dgMPANS.CurrentCell = New DataGridCell(x, 1)
Exit Sub
End If
Next
-
Nov 19th, 2003, 06:12 AM
#2
Addicted Member
-
Sep 9th, 2009, 10:47 PM
#3
New Member
Re: Highlight Datagrid row based on a column value
Hi there
I also face the same issue but the link supplied by you doesnt work anymore.
If anyone has soluton to this problem please post it here
-
Sep 9th, 2009, 11:54 PM
#4
Re: Highlight Datagrid row based on a column value
 Originally Posted by ibuksh
Hi there
I also face the same issue but the link supplied by you doesnt work anymore.
If anyone has soluton to this problem please post it here
Back when this thread was created the DataGridView control didn't exist and this question was for the DataGrid control. Presumably you are using a DataGridView, correct? The best way to achieve your aim depends on how you populated the grid in the first place. Is your grid bound to a data source, e.g. a DataTable, or did you insert the data directly.
-
Sep 10th, 2009, 06:10 AM
#5
New Member
Re: Highlight Datagrid row based on a column value
i can acheive this with a datagridview control in VS2005 but the project I am working on is VS2003 and it has only a datagrid control and not datagridview control so my issue remains
would appreciate any help possible
-
Sep 10th, 2009, 08:22 PM
#6
Re: Highlight Datagrid row based on a column value
 Originally Posted by ibuksh
i can acheive this with a datagridview control in VS2005 but the project I am working on is VS2003 and it has only a datagrid control and not datagridview control so my issue remains
would appreciate any help possible
I see. This looks like the link you want:
http://www.syncfusion.com/FAQ/window...44c.aspx#q745q
Looks like the web site was changed from ASP (.asp) to ASP.NET (.aspx).
-
Sep 10th, 2009, 11:55 PM
#7
New Member
Re: Highlight Datagrid row based on a column value
Thanks for the help mate
I also found another solution that is an easier approach
Datagrid Row Color
its built around similar logic though
Last edited by ibuksh; Dec 6th, 2009 at 08:16 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|