My DataGrid is nested DataList (unresolved)

Source: Internet
Author: User
I think my example is probably the same as MSDN (Saucer Shi), and I think the problem is, why is the dlreplylist of my page "undefined value" before binding (that is, after clicking the Edit button)? The following figure (upper half): While the Saucer (Shi) version of the example, at the same breakpoint, DataList instance Itemslist is present (the second half)
Page frame:
<asp:datagrid width= "80%"
Datakeyfield= "PostID" id= "dgpostlist" runat= "Server"
allowpaging= "True" pagesize= "ten" autogeneratecolumns= "false"
Onpageindexchanged= "Trunpage" oneditcommand= "Editpost"
Ondeletecommand=deletepost Onupdatecommand=updatepost oncancelcommand=cancelpost>
<pagerstyle mode= "NumericPages" position= "Topandbottom" horizontalalign= "Center" ></pagerstyle>
<columns>
<asp:TemplateColumn>
<itemtemplate>
<table id= "Tbpostrecord" bgcolor= "#dfdfdf" width= "100%" >
... <div align= "right" >
<asp:imagebutton runat= "Server" id= "Imgbtedit" commandname= "edit" imageurl= "Images/edit.gif" alternatetext= "editing" ></asp:ImageButton>
<asp:imagebutton runat= "Server" id= "Imgbtdelete" commandname= "delete" imageurl= "Images/del.gif" alternatetext= " Delete "></asp:ImageButton>
......
<asp:datalist id= "dlreplylist" width= "100%" Repeatcolumns=1
Datakeyfield= "PostID" repeatdirection=vertical runat= "Server"
Oneditcommand= "Editreply" ondeletecommand=deletereply
Onupdatecommand=updatereply oncancelcommand=cancelreply

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.