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

Need Help in Binding

1 Answer 27 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John John
Top achievements
Rank 1
John John asked on 19 Nov 2009, 07:22 AM
Hi
      I am using rad grid, which is having the functionality of updating and deleting. There are lot of table conneted with the grid.

Say example, i used Table1 to bind the grid initially. But i used some other table data information to view and bind the edit form.
A lot of table data to be used to bind the controls of EditForm. There i used to loop dataset to check the  condition and bind the data with relevant control. But some of the controls need to bind directly without condition checking..

Since the informations are related from different tables or procedures which would be the best way to bind the data with the control  for the edit form.


-Thanks

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 24 Nov 2009, 03:53 PM
Hello John,

I think it depends on your conventions about how to extract the data from the source.

In case you store it in a DataSet, the best option would be to bind the relevant table to the grid initially and then fetch the data for the edit form from the dataset at a later stage of the page lifecycle (i.e. editing operation).

If you get the records for the non-editable grid only on initial load, you can perform a second query to the source when the edit form is about to be loaded and then populate it. This can be done inside the ItemDataBound server event of the grid when e.Item is GridEditableItem && e.Item.IsInEditMode condition is met.

Best regards,
Sebastian
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.
Tags
Grid
Asked by
John John
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or