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

multiple row selection on Master/Detail Grids

1 Answer 98 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ashish
Top achievements
Rank 1
Ashish asked on 20 Oct 2011, 12:30 AM
I want to create interface similar to this example http://demos.telerik.com/aspnet-ajax/grid/examples/programming/selectedvalue/defaultcs.aspx

How can i add following thing in above example
1. Multiple row selection on master grid 
example.. if i select customer ALFKI and ANATR on master grid
detail grid display order belong to above two customer
2. display multiple selected order ID in label or textbox  

 Thanks

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 20 Oct 2011, 07:45 AM
Hello Ashish,

The RadGrid Supports MasterDetail table structure with which you can achieve same functionality. You can find the working example from here.

For the second requirement hook the ItemCommand and try the following code snippet.
C#:
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
 {
  if (e.CommandName == "RowClick" && e.Item.OwnerTableView.Name=="Detail")
    {
       string id = (e.Item as GridDataItem).GetDataKeyValue("TerritoryID").ToString();
       TextBox1.Text += id;
    }   
  }

Thanks,
Shinu.
Tags
Grid
Asked by
Ashish
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or