4 Answers, 1 is accepted
You can achieve this using UserControl edit form as shown in the following help article.
Different edit forms on edit and insert
Thanks
Shinu.
Also, i would like to know that can i bind a text field of a column in detail table to a column value in parent Master Table.
<
MasterTableView AllowMultiColumnSorting="True" Width="100%" CommandItemDisplay="Top" DataKeyNames="ID">
<DetailTables>
<radG:GridTableView Width="80%" AutoGenerateColumns="false" HierarchyLoadMode="ServerBind"
runat="server" CommandItemDisplay="Top" PageSize="3" Name="Roles" DataKeyNames="PartyID">
<ParentTableRelation>
<radG:GridRelationFields DetailKeyField="PartyID" MasterKeyField="ID" />
</ParentTableRelation>
<Columns>
<radG:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn1">
</radG:GridEditCommandColumn>
<radG:GridBoundColumn SortExpression="PartyID" Visible="false" DataField="PartyID"UniqueName="PartyID">
</radG:GridBoundColumn>
<radG:GridBoundColumn SortExpression="PartyName" Visible="false" DataField="PartyName" UniqueName="PartyName">
</radG:GridBoundColumn>
<radG:GridBoundColumn SortExpression="Role" HeaderText="Role" DataField="Role" UniqueName="Role">
</radG:GridBoundColumn>
<radG:GridBoundColumn SortExpression="Component" HeaderText="Component" DataField="Component"UniqueName="Component">
</radG:GridBoundColumn>
<radG:GridButtonColumn ConfirmText="Delete this product?" ButtonType="ImageButton"CommandName="Delete" Text="Delete" UniqueName="DeleteColumn1"></radG:GridButtonColumn>
</Columns>
<EditFormSettings EditFormType="template">
<FormTemplate>
<asp:TextBox id="txtMasterTableColumnName" runat="server" Width="161px" CssClass="ContentFontReadOnly" Text='<%#Bind("Name") %>'></asp:TextBox>
</FormTemplate>
</EditFormSettings>
<PagerStyle Mode="numericPages" PagerTextFormat="" />
</radG:GridTableView>
</DetailTables>
<Columns>
<radG:GridBoundColumn SortExpression="ID" Visible="false" DataField="ID" UniqueName="ID"></radG:GridBoundColumn>
<radG:GridBoundColumn SortExpression="Name" HeaderText="Party Involved" DataField="Name" UniqueName="Name"></radG:GridBoundColumn>
</Columns>
</MasterTableView>
Now, in above code, i require binding of a textbox in formatemplate of a detail table with a column in master table called "Name".
Can this be achieved ?
You can achieve this if your are binding both the Master and detail table with the same DataSource.
Update/Insert/Delete in hierarchy
Princy.
Thanks but i am using a dataset ( created from a xml) to load both parent and child grid table views. So the only option to bind controls is by using <%#Bind("")%> syntax in controls value.
So what to do in this case ?