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

Nesting WebContol forms

3 Answers 46 Views
Grid
This is a migrated thread and some comments may be shown as answers.
sircutbreaker
Top achievements
Rank 1
sircutbreaker asked on 06 Nov 2012, 11:27 AM
I have a radgrid with a webusercontrol as the form.. in that form, there is another radgrid with yet another webusercontrol as the form... when i go into edit mode in that one, I want to make the (update/cancel) buttons disappear from the first one... How can I do this?

https://www.evernote.com/shard/s9/sh/da95d18c-b3ac-4e2b-89b4-17f9e91951d6/fa7c7ca22fdc41ec37bda2d9816211d5/res/bcfe8a11-1275-4510-9756-dbf32ee22dcf/skitch.png

3 Answers, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 09 Nov 2012, 11:58 AM
Hello Jeffrey,

I am experiencing difficulties understanding your issue. Could you please elaborate more on what do you mean by "as the form"? Do you mean ItemTemplate? Additionally it would be best if you could send us your aspx code.

Regards,
Angel Petrov
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
sircutbreaker
Top achievements
Rank 1
answered on 09 Nov 2012, 12:02 PM
I have a grid with a webusercontol. When I go to edit, that usercontrol has another radgrid in it.  I want to know how I can determine when I put that radgrid into edit mode so that I can make the first set of buttons (Update, Insert, Cancel) not visible... When I take the second grid out of edit mode, I want to make the buttons visible again.

Does that make sense?
0
Angel Petrov
Telerik team
answered on 12 Nov 2012, 05:00 PM
Hi Jeffrey,

One way to implement the logic is by hooking up to the Pre_Render of the RadGrid. You have to check if both grids are in edit mode. This can be accomplished by checking if EditIndexes of the RadGrid is greater than 0. If both grids meet this condition you just have to select the update and cancel button of the outer grid and set Visible to false. If not, you should set Visible to true. Attached is a project which demonstrates this approach.

Kind regards,
Angel Petrov
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
sircutbreaker
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
sircutbreaker
Top achievements
Rank 1
Share this question
or