This is a migrated thread and some comments may be shown as answers.

Format rows and display value of column

2 Answers 125 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nadia Sangiovanni
Top achievements
Rank 1
Nadia Sangiovanni asked on 25 Mar 2010, 02:04 PM
Hi Expert,

My question will look maybe really simple but I can't find the way to do it.

1. I want my user to be able to double-click on any part of a row and when this is done I want to be able to know the value of the cell(row user click, column 3)

2. I want to be able to change the back color of some specific rows in blue and some other in white depend of value in the column 3

Thank you for your help.

2 Answers, 1 is accepted

Sort by
0
Giovanni
Top achievements
Rank 1
answered on 25 Mar 2010, 05:30 PM
hi, try this for the first question

 

Private Sub RadGridView_DoubleClick(ByVal sender As ObjectByVal e As System.EventArgs) Handles RadGridView1.DoubleClick   
    
   Dim wRig As Integer = RadGridView1.CurrentCell.RowIndex   
   
   Dim wCol As Integer = RadGridView1.CurrentCell.ColumnIndex   
   
   Dim Value As String = RadGridView1.Rows(wRig).Cells(3).Value  
End Sub 
 
 

0
Jack
Telerik team
answered on 29 Mar 2010, 01:57 PM
Hello Nadia,

please look at the following KB article. It demonstrates how to customize the appearance of a cell. You can use the GridCellElement.RowInfo.Cells collection to get the value of a specific cell in the row.

I hope this helps.

Kind regards,
Jack
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Nadia Sangiovanni
Top achievements
Rank 1
Answers by
Giovanni
Top achievements
Rank 1
Jack
Telerik team
Share this question
or