how to find telerik:GridClientSelectColumn in RadGrid

3 posts, 1 answers
  1. BRK
    BRK avatar
    35 posts
    Member since:
    Jun 2012

    Posted 02 Jun 2011 Link to this post

    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. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 02 Jun 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. BRK
    BRK avatar
    35 posts
    Member since:
    Jun 2012

    Posted 02 Jun 2011 Link to this post

    Hi Princy,

       Controls(0)
    means what can you explain

         Thanking You,
         Brk108
Back to Top