Editing in nested datagrids - ASP.NET and VB

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:DataGrid DataSource='..' id="dgrdContents"
OnEditCommand="dgrdContents_EditCommand"
OnUpdateCommand="dgrdContents_Updatecommand"
OnCancelCommand="dgrdContents_CancelCommand" Runat="Server">
<Columns>
…..
</Columns>
</asp:DataGrid>
</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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top