I have a table that shows the following:
Id DivisionId LocationId
-------------------------------------
1 4 10
2 4 11
3 4 12
4 4 13
The Division Name and Location Name are stored in seperate tables and I can resolve these name easily using linqtosql (see below how i've done this with DivisionName)
<
Columns>
<telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID" UniqueName="ID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Division.DivisionName" HeaderText="DivisionName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LocationID" HeaderText="LocationID">
</telerik:GridBoundColumn>
</Columns>
However, when you click edit/add, i need to be able to show the division names in a dropdown and the user simply selects the option (i also need to do this for location too, but i can replicate this functionality once i know how to do it)
I'm new to linqtosql and the radgrid so please bear that in mind when replying
I've looked at the linqtosql Crud opertations and i'm a little confused.
is there an edit tag, and can i put a dropdown in it and bind it to the division name
if so do you have any example code please?
I've tried using this but it doesn't work
<EditItemTemplate>
<telerik:RadComboBox DataTextField="Division.DivisionName" DataField="Division.DivisionName" ID="ddlDivisionName" runat="server" >
</telerik:RadComboBox>
<telerik:RadComboBox DataTextField="Location.LocationName" DataField="Location.LocationName" ID="ddlLocationName" runat="server" >
</telerik:RadComboBox>
</EditItemTemplate>
Thanks!