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

How to make relation between comboboxes in RadGrid

1 Answer 64 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rabih
Top achievements
Rank 1
Rabih asked on 12 Mar 2012, 11:37 AM
Hello,
i have a RadGrid :(Html as below)
<setsRC:SRadGrid ID="gdvOrgUnitTypes" runat="server" AllowFilteringByColumn="false"
GridLines="None" AutoGenerateColumns="False" AllowSorting="True" OnNeedDataSource="gdvOrgUnitTypes_NeedDataSource"
OnItemDataBound="gdvOrgUnitTypes_ItemDataBound" Width="450">
<MasterTableView AllowMultiColumnSorting="True" DataKeyNames="OrganizationUnitTypeID" CommandItemDisplay="Bottom" Name="gdvOrgUnitTypes">
<CommandItemSettings ShowAddNewRecordButton="false" />
<Columns>
<setsRC:SGridBoundColumn DataField="OrganizationUnitTypeName" HeaderText="Org. Unit Types" meta:resourcekey="OuTypeName" HeaderStyle-HorizontalAlign="Left"/>
<setsRC:SGridTemplateColumn ItemStyle-Width="280" HeaderText="Organization Units" meta:resourcekey="AvailableOUs" HeaderStyle-HorizontalAlign="Left">
<ItemTemplate>
<setsRC:SRadComboBox runat="server" ID="rcbOUsByType" />
</ItemTemplate>
</setsRC:SGridTemplateColumn>
</MasterTableView>
</setsRC:SRadGrid>

There are no Insert, Update or delete operations on the grid.
In each row there is a text value in the GridBoundColumn and a combobox inthe template column
The user only action is to select from the comboboxes
The comboboxes are following a certain hierarchy that is done by code. ( Company-->Entity-->Branch-->Department--> .....)
First row in grid is for company and second for entity and third for branch (each row Text + combobox) ......................
Currently everything is displayed in the comboboxes, i want to have the option when choosing a value from entity combobox to filter the branch combobox and department combobox.
also note that the data is not fixed eg: Companies have different hierarchies for example company B has Company-->entity-->Branch-->Department-->Sub department ...

Any help ?

          

1 Answer, 1 is accepted

Sort by
0
Antonio Stoilkov
Telerik team
answered on 15 Mar 2012, 09:16 AM
Hi Rabih,

You could implement the desired functionality by following the demo and code library below. The second example represents similar scenario when editing data but this could be adapted for your application needs.

Regards,
Antonio Stoilkov
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
Rabih
Top achievements
Rank 1
Answers by
Antonio Stoilkov
Telerik team
Share this question
or