I am new to telerik components.
Please how can I achieve something as this : dgv.Rows(0).Cells("name").value = "My name"
using telerik datagridview
Thank u in advance
4 Answers, 1 is accepted
Hi Eyo,
Changing the values of cells in such manner is not recommended with RadGridView.
The reason is that for performance reasons RadGridView uses a virtualization approach when rendering rows. This means that only visible rows would be realized in certain moment of time.
In other words if you try to access Rows[1000] and the user has never scrolled down and exception will occur.
The recommended way is to change the ItemsSource objects instead. The RadGridView will automatically update the cell value when the source object has changed. Your underlying business object should implement the INotifyPropertychanged interface.
Please give me some more details on your scenario and I will gladly provide a working sample application with the best applicable approach.
Regards,
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Please I need to know how to add check box column to grid view. And on check box event I need to get the Record where the check box was clicked, so I could get some cells values within same record. ex: I have a cell id, I need to get it's value.
Knowing that, since my data is very dynamic, and I can't add all the tables to dbml , I've used code found here by slAdapter to fill my grid. Something similar to yours DataTable written by Vladimir Enchev.
By the way I've tried to user your DataTable to store the data within system.DataTable in my service method and then send it back to silverlight, but unfortunately with no success.
Best Regards,
Eyad
Please have a look at the attached sample application . It demonstrates a way to have a checkbox column and find the relevant business object when user checks a checkbox
The checkbox is defined in xaml within the CellTemplate property of the column.
The logic to find the relevant business object is located in the CheckBox_Checked handler in the code-behind.
Best wishes,
Pavel Pavlov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
i'm doing my project: i have a radgeridview show student information, i have a checkbox colum and studentID colum, so how can i get studentID in the rows i have checked?
thank you!
phuoc