请教高手们:asp.net+c#中,有一个DataGrid,绑定了n行n列,现在我要实现的是每一个cell都生成一个链接,并将本身值传到下一页,该如何做?
多谢个位,帮帮忙,马上要交任务了,还没实现。
帮帮忙!

解决方案 »

  1.   

    不能在DataGrid的属性生成器里做,因为数据是动态绑定的。
      

  2.   

    <DIV align="center">
    <asp:DataGrid id="dgAllNews" runat="server" Width="579px" AllowCustomPaging="true" PageSize="26" AllowPaging="false" CellPadding="3" AutoGenerateColumns="False" DataKeyField="Aid" OnItemCommand="NewsBehavior">
    <Columns>
    <asp:ButtonColumn Text="删除" CommandName="Delete"></asp:ButtonColumn>
    <asp:HyperLinkColumn Text="修改" DataNavigateUrlField="Aid" DataNavigateUrlFormatString="editNewsDetail.aspx?Aid={0}"></asp:HyperLinkColumn>
    </Columns>
    </asp:DataGrid></DIV>
      

  3.   

    把ButtonColumn全换成HyperLinkColumn