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

Third level hierarchical grid, Detail table[1], Insert via RadWindow.

5 Answers 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Stas
Top achievements
Rank 2
Stas asked on 19 May 2008, 09:09 PM

Hi

I have a three level hierarchal grid on a MasterPage

Mentor - master

- Relationship - datail[0]

- - RelationshipSurvey -detail[1]

The Insert happens by RadWindow.

For the ‘ – Ralationship’ I pass a QueryString to RadWindow as

RadGridMentor_ItemCreated

((GridItem)(e.Item.OwnerTableView.ParentItem)).ItemIndex.ToString();

On and then return back on

protected override void RaisePostBackEvent (IPostBackEventHandler sourceControl, string eventArgument)

{
    if (sourceControl is RadAjaxManager)
      {
GridTableView nestedTableViewRel = (RadGridMentor.MasterTableView.Items[Int32.Parse(eventArgument)] as GridDataItem).ChildItem.NestedTableViews[0];
                nestedTableViewRel.Rebind();
      }
}

How can I Identify a third level detail table ‘ - - RelationshipSurvey’ from which expand command fired.

And rebind it on protected override void RaisePostBackEvent

Like:

 GridTableView nestedTableViewSurvey = ((RadGridMentor.MasterTableView.Items[Int32.Parse(eventArgument)] as GridDataItem).ChildItem.NestedTableViews[0]).Items[1].ChildItem.NestedTableViews[1];
nestedTableViewSurvey.Rebind();

Thank you
//Stas

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 20 May 2008, 07:04 AM
Hi,

Check out the following help document link.
Distinguish grid rows in hierarchy on ItemCreated/ItemDataBound

Shinu.
0
Stas
Top achievements
Rank 2
answered on 20 May 2008, 11:08 AM
Hi Shinu,

Thank you for reply,
Probably I need to clarify my question.
I'm using a technic  - Editing RadGrid records with RadWindow.
It is very well describe here http://www.telerik.com/help/aspnet-ajax/grdwindowediting.html .
But the online example is only for a MasterTable.

My question is how I can achieve the Insert using RadWindow on the different hierarchy level from the detail tables and the rebind the initiator detail table?

//Stas

0
Nikita Gourme
Top achievements
Rank 1
answered on 21 May 2008, 11:39 AM
I chose more convenient and simple solution than using RadWindow for editing hierarchical grid - the new PopUp edit form feature for RadGrid for ASP.NET AJAX. Check it out here.

Nikita
0
Stas
Top achievements
Rank 2
answered on 21 May 2008, 10:19 PM
Pop up is a great new feature.

But in my case Edit and Insert has absolutely different fields.

On Insert I let user user to submit survey with many field on it, where on Edit user can alter only a program stage for example.

This is why I do Insert on the separate page and Edit on the grid level.

If anyone knows how to accomplish this scenario via Pop up, i think it will be very interesting for many others.

//Stas
0
Nikita Gourme
Top achievements
Rank 1
answered on 22 May 2008, 01:27 PM
I see your point here. How about passing the id of the nested table from the client to the server in order to refresh it after the window insert form is closed? The approach will most probably be quite similar to the one presented in this code library using context menu in hierarchical grid:

http://www.telerik.com/community/code-library/submission/b311D-kmaah.aspx

Nikita
Tags
Grid
Asked by
Stas
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 1
Stas
Top achievements
Rank 2
Nikita Gourme
Top achievements
Rank 1
Share this question
or