本帖最后由 Xiaonn 于 2015-3-18 10:37 编辑
我感觉在表中这个 HyperLinkField 好用点,
如果你要用 LinkButtonField,前台如下:
<x:Grid ID="Grid1" Title="User List" ShowBorder="false" AutoScroll="true" AutoHeight="true" runat="server" ShowHeader="false" EnableTextSelection="true"
DataKeyNames="id,customername,customeraddress,shiptype,costtype,formshiptype,saler" EnableRowNumber="True" EnableColumnLines="True">
<Columns>
<xinkButtonField CommandName="Open" Text="打开页面" HeaderText="打开页面" Width="40px" />
</Columns>
</x:Grid>
后台如下:
protected void Grid1_RowCommand(object sender, FineUI.GridCommandEventArgs e) //删除
{
if (e.CommandName == "Open")
{
object[] keys = Grid1.DataKeys[e.RowIndex];
PageContext.RegisterStartupScript(Window1.GetShowReference("./O_Form_AddDetail.aspx?Name=" +keys[0]ToString() , "打开"));
}
}
|