Hello,
I am working with a usercontrol to add/edit items in a RadGrid row
But each item/row can have associated another table in which I would like to be able to insert/edit so what i should see at the usercontrol is like another radgrid control. I have read in the live examples that this can be done with hierarchy and DetailTable, but I donĀ“t know how to 'draw' this table in the usercontrol so the items are binded to the employee detail showed in the usercontrol.
This is my UserControl
Thank you very much.
I am working with a usercontrol to add/edit items in a RadGrid row
<EditFormSettings UserControlName="EmployeeDetails.ascx" EditFormType="WebUserControl"> |
<EditColumn UniqueName="EditCommandColumn1"> |
</EditColumn> |
</EditFormSettings> |
This is my UserControl
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EmployeeDetails.ascx.cs" Inherits="telerik_webGrid.EmployeeDetails" %> |
<table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="1" rules="none" |
style="BORDER-COLLAPSE: collapse"> |
<tr class="EditFormHeader"> |
<td colspan="2"><b>Employee Details</b></td> |
</tr> |
<tr> |
<td colspan="2"><b>Personal Info:</b></td> |
</tr> |
<tr> |
<td> |
<table id="Table3" cellspacing="1" cellpadding="1" width="100%" border="0"> |
<tr> |
<td></td> |
<td></td> |
</tr> |
<tr> |
<td>Country:</td> |
<td> |
<asp:TextBox id="TextBox7" runat="server" |
Text='<%# DataBinder.Eval( Container, "DataItem.Country" ) %>'> |
</asp:textbox></td> |
</tr> |
<tr> |
<td>City:</td> |
<td> |
<asp:TextBox id="TextBox8" runat="server" |
Text='<%# DataBinder.Eval( Container, "DataItem.City") %>' |
tabIndex=1> |
</asp:textbox></td> |
</tr> |
<tr> |
<td>Region:</td> |
<td> |
<asp:TextBox id="TextBox9" runat="server" |
Text='<%# DataBinder.Eval( Container, "DataItem.Region") %>' |
tabIndex=2> |
</asp:textbox></td> |
</tr> |
<tr> |
<td>Home Phone:</td> |
<td> |
<asp:TextBox id="TextBox10" runat="server" |
Text='<%# DataBinder.Eval( Container, "DataItem.HomePhone") %>' |
tabIndex=3> |
</asp:textbox></td> |
</tr> |
<tr> |
<td>Birth Date:</td> |
<td> |
<asp:TextBox id="TextBox11" runat="server" |
Text='<%# DataBinder.Eval( Container, "DataItem.BirthDate") %>' |
tabIndex=4> |
</asp:textbox></td> |
</tr> |
<tr> |
<td>Title Of Courtesy</td> |
<td> |
<asp:dropdownlist id="ddlTOC" runat="server" tabindex="7"></asp:dropdownlist></td> |
</tr> |
</table> |
</td> |
<td> |
<table id="Table1" cellspacing="1" cellpadding="1" width="300" border="0"> |
<tr> |
<td>Notes: |
</td> |
</tr> |
<tr> |
<td> |
<asp:TextBox id=TextBox1 Text='<%# DataBinder.Eval( Container, "DataItem.Notes") %>' runat="server" TextMode="MultiLine" Rows="5" Columns="40" tabIndex=5> |
</asp:textbox></td> |
</tr> |
<tr> |
<td>Address:</td> |
</tr> |
<tr> |
<td> |
<asp:TextBox id=TextBox6 Text='<%# DataBinder.Eval( Container, "DataItem.Address") %>' runat="server" TextMode="MultiLine" Rows="2" Columns="40" tabIndex=6> |
</asp:textbox></td> |
</tr> |
</table> |
</td> |
</tr> |
<tr> |
<td colspan="2"><b>Company Info:</b></td> |
</tr> |
<tr> |
<td> |
<table id="Table4" cellspacing="1" cellpadding="1" width="300" border="0"> |
<tr> |
<td>FirstName:</td> |
<td> |
<asp:TextBox id=TextBox2 Text='<%# DataBinder.Eval( Container, "DataItem.FirstName") %>' runat="server" tabIndex=8> |
</asp:textbox></td> |
</tr> |
<tr> |
<td>Last Name:</td> |
<td> |
<asp:TextBox id=TextBox3 Text='<%# DataBinder.Eval( Container, "DataItem.LastName") %>' runat="server" tabIndex=9> |
</asp:textbox></td> |
</tr> |
<tr> |
<td>Hire Date:</td> |
<td> |
<asp:TextBox id=Textbox5 Text='<%# DataBinder.Eval(Container, "DataItem.HireDate") %>' runat="server" tabIndex=10> |
</asp:textbox></td> |
</tr> |
<tr> |
<td>Title:</td> |
<td> |
<asp:TextBox id=TextBox4 Text='<%# DataBinder.Eval( Container, "DataItem.Title") %>' runat="server" tabIndex=11> |
</asp:textbox></td> |
</tr> |
</table> |
</td> |
<td></td> |
</tr> |
<tr> |
<td colspan="2"><b>Tests</b></td> |
</tr> |
<tr> |
<td> |
<table id="Table5" cellspacing="1" cellpadding="1" width="300" border="0"> |
<tr> |
<td> |
<!--HERE SHOULD BE THE TABLE --> |
</td> |
</tr> |
</table> |
</td> |
<td></td> |
</tr> |
<tr> |
<td align="right" colspan="2"> |
<asp:button id="btnUpdate" text="Update" runat="server" CommandName="Update" Visible='<%# !(DataItem is Telerik.Web.UI.GridInsertionObject) %>'></asp:button> |
<asp:button id="btnInsert" text="Insert" runat="server" CommandName="PerformInsert" Visible='<%# DataItem is Telerik.Web.UI.GridInsertionObject %>'></asp:button> |
|
<asp:button id="btnCancel" text="Cancel" runat="server" causesvalidation="False" commandname="Cancel"></asp:button></td> |
</tr> |
Thank you very much.