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

how to find telerik:GridClientSelectColumn in RadGrid

2 Answers 113 Views
Grid
This is a migrated thread and some comments may be shown as answers.
BRK
Top achievements
Rank 1
BRK asked on 02 Jun 2011, 11:11 AM
Hi friends,

I have used telerik:GridClientSelectColumn instead of checkbox. Here I want to do some operations on that. But before that I need to
find that control in RadGrid. I TRIED to find out but got error as "

Specified argument was out of the range of valid values.
Parameter name: index


I used code like this:

            Dim item1 As GridDataItem = DirectCast(e.Item, GridDataItem)
            Dim chkBox1 As CheckBox = DirectCast(item1("Complete").Controls(1), CheckBox)
       
I dont know what is the index controls(1) or upto controls(12)

Please help in solving this

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 02 Jun 2011, 11:49 AM
Hello Brk,

Try the following code snippet to access ClientSelectColumn.

VB:
Protected Sub RadGrid2_ItemCreated(sender As Object, e As GridItemEventArgs)
    If TypeOf e.Item Is GridDataItem Then
        Dim Item As GridDataItem = DirectCast(e.Item, GridDataItem)
        Dim chkbox As CheckBox = DirectCast(Item("Complete").Controls(0), CheckBox)
    End If
End Sub

Thanks,
Princy.
0
BRK
Top achievements
Rank 1
answered on 02 Jun 2011, 12:38 PM
Hi Princy,

   Controls(0)
means what can you explain

     Thanking You,
     Brk108
Tags
Grid
Asked by
BRK
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
BRK
Top achievements
Rank 1
Share this question
or