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

Automatic Updates - Cast to Custom Object

1 Answer 53 Views
Grid
This is a migrated thread and some comments may be shown as answers.
TheLostLeaf
Top achievements
Rank 2
TheLostLeaf asked on 22 Mar 2010, 09:54 PM

I'm using LLBL DataCollections to bind to the grid which always works perfect. Is there a way to get the instance of the row as the data object entity that it holds? The only alternative I see is looping the values. Thanks!

 


void rgSystemSettings_EditCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)      
{     
   ((MyDataEntity)e.Item.DataItem).Save();     
}     
    
      
    
protected void rgSystemSettings_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)      
      
{     
   MyDataCollection col = new MyDataCollection();      
   col.GetMulti(null);      
   rgSystemSettings.DataSource = col;     
    

1 Answer, 1 is accepted

Sort by
0
Accepted
Pavlina
Telerik team
answered on 25 Mar 2010, 03:17 PM
Hello Erik,

In order to achieve your goal I suggest you examine the following online resources which elaborate on this subject and let me know if they help:
Accessing cells and rows
Referencing controls in grid row/edit form

I hope this gets you started properly.

Sincerely yours,
Pavlina
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
Grid
Asked by
TheLostLeaf
Top achievements
Rank 2
Answers by
Pavlina
Telerik team
Share this question
or