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

New version - Can't find old functionality

1 Answer 99 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 12 Aug 2010, 04:17 PM
I just upgraded to 2010 Q2 SP1 and most of my code I have been able to upgrade. The main problem is getting at the Cell's underlying control now that cellelement is gone:

 

 

 

 

For Each CheckRow In gvData.Rows

 

 

     If (Not (CheckRow.Cells(5).CellElement Is Nothing)) Then

 

 

 

           Dim CheckCell As RadCheckBoxEditorElement = TryCast(CheckRow.Cells(5).CellElement.Children(0), RadCheckBoxEditorElement)

 

           CheckCell.UseDefaultDisabledPaint =

True

 

 

 

           CheckCell.Enabled = False

 

 

      End If

 

 

 

 

 

 

Next

 

 

 


How would I get the RadCheckBoxEditorElement in the current version?

Thanks Eric

1 Answer, 1 is accepted

Sort by
0
Accepted
Julian Benkov
Telerik team
answered on 17 Aug 2010, 05:18 PM
Hi Eric,

Thank you for writing.

Please check whether the following code snippet achieves the desired behavior:

For Each CheckRow As GridViewRowInfo In gvData.Rows
    Dim CheckCell As RadCheckBoxEditorElement = TryCast(gvData.GridElement.GetCellElement(CheckRow, gvData.Columns(5)), RadCheckBoxEditorElement)
    If CheckCell IsNot Nothing Then
        CheckCell.UseDefaultDisabledPaint = True
        CheckCell.Enabled = False
    End If
Next

More information about the changes of RowElement/CellElement you can find in this blog post.

I hope this helps. Let me know if you have further queries.

Kind regards,
Julian Benkov
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
Eric
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or