S
subha
Hi All
I am trying to nest a datagrid inside a repeater control. I find
problems editing the datagrid. The code is attached below. All
examples that I read in the web involved code-behind concepts which i
am not very aware of.
Any help on this subject would be highly appreciated.
Thanks
Subha
HTML…
<asp:Repeater id="rptCat" runat="server">
<ItemTemplate>
<%# Container.DataItem("ItemCategoryName")%>
<asp:Repeater DataSource='<%# FilterCat(
Container.DataItem("ItemCategoryID") )%>' RunAt ="Server" >
<ItemTemplate>
<%# Container.DataItem("ItemSubCategoryName") %>
<asp
ataGrid DataSource='..' id="dgrdContents"
OnEditCommand="dgrdContents_EditCommand"
OnUpdateCommand="dgrdContents_Updatecommand"
OnCancelCommand="dgrdContents_CancelCommand" Runat="Server">
<Columns>
…..
</Columns>
</asp
ataGrid>
</ItemTemplate>
</asp:Repeater>
</ItemTempllate>
</asp:Repeater>
VB Code part…
Sub dgrdContents_EditCommand( s As Object, e As
DataGridCommandEventArgs )
dgrdContents.EditItemIndex = e.Item.ItemIndex
BindDataGrid
End Sub
I get the following error…
Compiler Error Message: BC30451: Name 'dgrdContents' is not declared.
I am trying to nest a datagrid inside a repeater control. I find
problems editing the datagrid. The code is attached below. All
examples that I read in the web involved code-behind concepts which i
am not very aware of.
Any help on this subject would be highly appreciated.
Thanks
Subha
HTML…
<asp:Repeater id="rptCat" runat="server">
<ItemTemplate>
<%# Container.DataItem("ItemCategoryName")%>
<asp:Repeater DataSource='<%# FilterCat(
Container.DataItem("ItemCategoryID") )%>' RunAt ="Server" >
<ItemTemplate>
<%# Container.DataItem("ItemSubCategoryName") %>
<asp
OnEditCommand="dgrdContents_EditCommand"
OnUpdateCommand="dgrdContents_Updatecommand"
OnCancelCommand="dgrdContents_CancelCommand" Runat="Server">
<Columns>
…..
</Columns>
</asp
</ItemTemplate>
</asp:Repeater>
</ItemTempllate>
</asp:Repeater>
VB Code part…
Sub dgrdContents_EditCommand( s As Object, e As
DataGridCommandEventArgs )
dgrdContents.EditItemIndex = e.Item.ItemIndex
BindDataGrid
End Sub
I get the following error…
Compiler Error Message: BC30451: Name 'dgrdContents' is not declared.