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

radgrid in a radgrid user control edit form

1 Answer 34 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 09 Jul 2012, 04:16 PM
I have run into an interesting problem.  I have a RadGrid that uses a user control for the edit mode. In the RadGrid some of the information I want to display would be best displayed in a RadGrid.  I want to give the user the ability to do CRUD on this grid while in the CRUD of the parent.  When I get the display going though (Retrieve) and I try to bind the data from code behind I get the created columns PLUS every column from my data source.  Is this a known issue?  To put it simply:

Create a RadGrid (RadGrid1) in an .aspx page.
Set the RadGrid1.MasterTableView.EditFormSettings.UserControlName to a user control
In the user control create a RadGrid (RadGrid2)
Set the bindings for the data source for RadGrid2 and what I am seeing is the full data source plus

When you click on edit and RadGrid2 has data then it looks like to me that there is no way to filter the data other than to filter the data source.

Also when I click on Add New Item for the RadGrid2 it affects the buttons being displayed in the RadGrid1.  So if I am in update mode in RadGrid1 and I click on Add New for RadGrid2 then the Insert button appears for RadGrid1.

It also looks like the dataItem get's reset in RadGrid2 as well which means I loose my data source object when I click on Add New for RadGrid2.

I know I'm not showing code and that's mainly because there are two radgrids with CRUD operations and the amount of code is some 500 lines per radgrid so I thought it would be a bit excessive.  If you need code just let me know and I will mock something up for you.

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 12 Jul 2012, 08:40 AM
Hi,

 Regarding the number of shown columns  - if it is different than the one you expect you can check whether you have set AutoGenerateColumns="false" for the second grid.

As for the other issue they are certainly not expected so it will be better if you can share some code regarding the configuration of the grids and how you put each one in edit or insert mode so we can check it on our side.

Greetings,
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.
Tags
Grid
Asked by
Kevin
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or