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

Is this conventional practice with a RadGrid?

2 Answers 37 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Boris
Top achievements
Rank 1
Boris asked on 28 Oct 2012, 09:26 PM
I'm trying to write my first web app using RadGrids.  

As far as design is concerned, the grid data source is set in the NeedDataSource event.  The editing of records is done in a FormTemplate popup that contains conventional ASP.Net DropDownlists.  The DropDowns are bound in the ItemCreated event.

All of this works so far.  I can both add and edit records.  

First of all, is the above conventional design practice?  

My problem is that I'm trying to trigger a shift to Add mode when initially loading the page, to immediately display the template popup.  My first test using PreRender and RadGrid1.MasterTableView.IsItemInserted = true went well, but that was with a simple screen with default Popup.  When I try to do this anywhere in the code with the above screen, I get crashes related to the dropdowns no matter where I put the IsItemInserted.

Suggestions?

2 Answers, 1 is accepted

Sort by
0
Accepted
Marin
Telerik team
answered on 01 Nov 2012, 07:25 AM
Hi Boris,

 The approach is correct. You can also move the binding of the dropdowns in the ItemDataBound event you need to access any information from the item (e.g. set their selected value depending on a value from the grid item, of course this will not apply to insert mode because there's no such value there).
If the problem persists please share the related code behind where you bind the dropdowns and some more information about the exception message so we can check it on our side.

Regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Boris
Top achievements
Rank 1
answered on 01 Nov 2012, 01:33 PM
Actually the crashes went away when I went back to using RadCombo boxes. 
I'm still having styling problems but that's a much lesser issue.
Tags
Grid
Asked by
Boris
Top achievements
Rank 1
Answers by
Marin
Telerik team
Boris
Top achievements
Rank 1
Share this question
or