4 Answers, 1 is accepted
0
Hello Jay,
Thank you for contacting us.
In the CellFormatting event you should be able to get information via the e.CellElement.Text property.
I hope this helps.
Greetings,
Peter
the Telerik team
Thank you for contacting us.
In the CellFormatting event you should be able to get information via the e.CellElement.Text property.
I hope this helps.
Greetings,
Peter
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more.
Join us for a FREE webinar to see all the new stuff in action.
Interested, but can’t attend? Register anyway and we’ll send you the recording.
Interested, but can’t attend? Register anyway and we’ll send you the recording.
0
Jay
Top achievements
Rank 1
answered on 05 Mar 2013, 04:14 PM
Thanks for the response Peter.
Yes, I can get the cell text from inside the CellFormatting event. The problem is I can't get the cell text from outside the CellFormatting event.
For example, when I'm trying to export the grid to an Excel file, the CellFormatting event does not help unless I can somehow call it for each cell. In order to call CellFormatting() I need a CellFormattingEventArgs object, but I don't know how to make one of these. I need a GridRowElement for each cell, but I don't know how to get a GridRowElement from my RadGridView object.
Yes, I can get the cell text from inside the CellFormatting event. The problem is I can't get the cell text from outside the CellFormatting event.
For example, when I'm trying to export the grid to an Excel file, the CellFormatting event does not help unless I can somehow call it for each cell. In order to call CellFormatting() I need a CellFormattingEventArgs object, but I don't know how to make one of these. I need a GridRowElement for each cell, but I don't know how to get a GridRowElement from my RadGridView object.
0
Hi Jay,
Thank you for the clarifications.
You can access the Cell visual element's Text property only in the CellFormatting event because RadGridView is virtualized control and a few visual items (for example 25) represents many logical items (the whole table) e.g. the visual items are reused. In the other places you can access only the Value property from the logical items.
Should you have any other questions or suggestions, do not hesitate to contact us.
Kind regards,
Peter
the Telerik team
Thank you for the clarifications.
You can access the Cell visual element's Text property only in the CellFormatting event because RadGridView is virtualized control and a few visual items (for example 25) represents many logical items (the whole table) e.g. the visual items are reused. In the other places you can access only the Value property from the logical items.
Should you have any other questions or suggestions, do not hesitate to contact us.
Kind regards,
Peter
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more.
Check out all of the latest highlights.
0
Jay
Top achievements
Rank 1
answered on 07 Mar 2013, 05:51 PM
Thanks for the info. Peter.