1.i想要firstand secong webgrid的复选框ID [英] 1.i want checkbox ids of firstand secong webgrid

查看:93
本文介绍了1.i想要firstand secong webgrid的复选框ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

@using(Html.BeginForm(View1,Login,FormMethod.Post))

{

@using (Html.BeginForm("View1", "Login", FormMethod.Post))
{



@ grid.GetHtml(

htmlAttributes:new {id =gridT,width =1200px},

列:grid.Columns(

grid.Column(systables.tabname,表名),

grid.Column( systables.object_id,对象ID),



grid.Column(格式:@< text>< input type =checkboxname =ids value =@ item.systables.object_id/> ;,标题:选择),

grid.Column(格式:( item)=>

{

WebGrid subGrid = new WebGrid(来源:item.syscolumns);

return subGrid.GetHtml(

htmlAttributes:new {id =subT},

columns:subGrid.Columns(

subGrid.Column( tabname,表名),

subGrid.Column(object_id,Object Id),

subGrid.Column(column_id,Column Id),

subGrid.Column(colname,Column Name),

subGrid.Column(coltype,column Type)



@ * subGrid.Column(格式:@< text>< input type =checkboxvalue =@ syscolumns.object_id/> ;, header:选择)* @



);

})





< input type =submitvalue =点击class =btn btn-default btn-primary/>




@grid.GetHtml(
htmlAttributes: new { id = "gridT", width = "1200px" },
columns: grid.Columns(
grid.Column("systables.tabname", "Table Name"),
grid.Column("systables.object_id", " Object Id"),

grid.Column(format: @<text><input type="checkbox" name="ids" value="@item.systables.object_id" />, header: "Select"),
grid.Column(format: (item) =>
{
WebGrid subGrid = new WebGrid(source: item.syscolumns);
return subGrid.GetHtml(
htmlAttributes: new { id = "subT" },
columns: subGrid.Columns(
subGrid.Column("tabname", "Table Name"),
subGrid.Column("object_id", " Object Id"),
subGrid.Column("column_id", "Column Id"),
subGrid.Column("colname", "Column Name"),
subGrid.Column("coltype", "column Type")

@*subGrid.Column(format: @<text><input type="checkbox" value="@syscolumns.object_id" />, header: "Select")*@
)
);
})
)
)
<input type="submit" value="Click" class="btn btn-default btn-primary" />



}


}

推荐答案

2。我有2个webgrids,当我检查第一个网格的行然后它删除并移动到第二个网格。

当我检查第二个网格的行然后它删除并继续到第一个网格。
2. I am having 2 webgrids , when i check the rows of a first grid then it delete and moves on to the second grid.
and when i check the rows of a second grid then it delete and moves on to the first grid.


这篇关于1.i想要firstand secong webgrid的复选框ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆