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

[Solved] RadGrid gives exception in master detail format

1 Answer 161 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Laurence
Top achievements
Rank 1
Laurence asked on 08 Jun 2009, 12:00 PM
I have a master detail relation and have Template column. My requirement is to have all detail rows in edit mode by default and use only a single button for update. To fill data I have used the NeedDataSource event of the grid. What happens is, the grid loads correctly showing proper data under proper headers (master view). I am able to get all rows in edit mode by default using ItemCreated event, where I set e.Item.Edit=true for the relevant items. When I click the update button, I get following error. An error has occurred because a control with id 'ctl00$cntContents$MasterGrid$ctl00$ctl07$Detail20$ctl04$ctl09' could not be located or a different control is assigned to the same ID after postback. If the ID is not assigned, explicitly set the ID property of controls that raise postback events to avoid this error. I am sure that I am missing something, because I get this error on any type of post back (i.e. other buttons / menu's etc.. which are outside the grid). Also in the template column I have placed different types of controls which get invisible if not required. Types of controls included are - RadColorPicker, RadComboBox, ASP .NET labels, Some other third party components too. Is it that other custom controls wont work with Telerik grid ? Any kind of help on this will be very much appreciated. Thanks.

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 11 Jun 2009, 12:07 PM
Hello Laurence,

It is difficult to pinpoint the reason for the behavior you are experiencing. In addition, RadGrid's template columns can contain any telerik or asp.net controls as well as any other third party controls as long as the latter have been implemented correctly.

The error you are getting most probably is due to some of the controls not being able to restore their ViewState because their ID is missing or has been dynamically changed at an inappropriate point in the page life cycle. 

If the problem persists, I'd suggest that you provide more details on how to reproduce the issue or at best isolate the problem in a small test project and send it to us through a formal support ticket so that we can debug it on our side and get back to you with further information.

I hope this helps.

Regards,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
Tags
Grid
Asked by
Laurence
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or