自定义asp网格视图,使用复选框i want to group selected rows。(将普通网格行分组,并在编辑模式下将其绑定回)[英] Custom asp grid view , Using checkbox i want to group selected rows. (Grouping a normal grid rows and bind it back in edit mode)

本文是小编为大家收集整理的关于自定义asp网格视图,使用复选框i want to group selected rows。(将普通网格行分组,并在编辑模式下将其绑定回)的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我有执行 DML 操作的 asp:grid 视图.我已经创建了它.使用以下代码.网格包含文本框、下拉菜单、链接按钮.此图像是编辑模式.

现在我想要的是我选择 2 个复选框并单击组按钮将出现一个弹出屏幕,它将形成类似这样的东西

安全类型或安全模型(单选按钮) 2.安全类型和安全模型
单击完成,所选项目将返回到网格并形成所选行的组,并且将创建外部复选框.



<asp:GridView ID="gvExpression" AutoGenerateColumns="False" BorderColor="White" BorderStyle="Ridge" CellSpacing="1" CellPadding="3" GridLines="Both" BackColor="White" BorderWidth="2px" EmptyDataText="无可用数据." runat="服务器" OnRowEditing="gvExpression_RowEditing" OnRowCancelingEdit=" OnRowCancelingEdit="span>gvExpression_RowCancelingEdit" OnRowUpdating="gvExpression_RowUpdating" OnRowDataBound="gvExpression_RowDataBound" DataKeyNames="ID"><列><asp:模板字段><项目模板><asp:CheckBox ID="chkGroup" runat="服务器"/></itemtemplate> <asp:BoundField DataField="ID" HeaderText="ID"只读="true"span> Visible="false"><asp:TemplateField HeaderText="文件名"><HeaderStyle Horizo​​ntalAlign="Left" Width="200px"/><itemstyle Horizo​​ntalalign="Left" width="200px"/><项目模板><%#Eval("FiledName")%> <asp:LinkBut​​ton ID="btnApplyFunction" runat="server" CommandName="ApplyFunction" Text="ApplyFunction"/></itemtemplate> <编辑项目模板><asp:TextBox ID="txtFieldName" Text='<%#Eval("FiledName")%>' runat="服务器"/></edititemtemplate> <asp:TemplateField HeaderText="Operators"><HeaderStyle Horizo​​ntalAlign="Left" Width="30px"/><itemstyle Horizo​​ntalalign="Left"/><项目模板><%#Eval("运算符")%></itemtemplate> <编辑项目模板><asp:DropDownList ID="ddlOperator" runat="服务器"></edititemtemplate> <asp:TemplateField HeaderText="Value"><HeaderStyle Horizo​​ntalAlign="Left" Width="100px"/><itemstyle Horizo​​ntalalign="Left" width="100px"/><项目模板><%#Eval("Value")%> </itemtemplate> <编辑项目模板><asp:TextBox ID="txtValue" Text='<%#Eval("Value")%>' runat="服务器"/></edititemtemplate> <asp:模板字段><项目模板><asp:LinkBut​​ton ID="btnedit" runat="server" CommandName="编辑" Text="编辑"/></itemtemplate> <编辑项目模板><asp:LinkBut​​ton ID="btnupdate" runat="server" CommandName="更新" Text="保存"/><asp:LinkBut​​ton ID="btncancel" runat="server" CommandName="取消" Text="Cancel"/></edititemtemplate> </> <%#eval("FiledName")%> 
<tr align="center"><td align="center"><asp:Button ID="btnAdd" runat="服务器" Text="添加" OnClick="btnAdd_Click"/></td> <td align="center"><asp:Button ID="btnDelete" runat="服务器" OnClick="btnDelete_Click" Text="删除"/></td> <td align="center"><asp:Button ID="btnGroup" runat="服务器" OnClick="btnGroup_Click" Text="Group"/></td> </tr>div>
解决方案
通过任何搜索引擎搜索 VBlend Winform 控件.
VBlend 控件提供了各种自定义控件,例如带有复选框的 GridView,允许选择多个数据行.

本文地址:https://www.itbaoku.cn/post/1355766.html

问题描述

i have asp:grid view which is doing DML operations. I have created it. using follwoing code. Grid contains Textboxs,dropdown, link buttons.this image is the edit mode.

Now i what i want is i select 2 check boxs and click Group button one Pop screen will appear which will form Something like this

Security Type or Security Model (Radio buttons ) 2.Security Type and Security Model
Click Done so the selected Item will come back to Grid and Form a Gruop of Selected Rows and Outer check box will be created.



<asp:GridView ID="gvExpression" AutoGenerateColumns="False" BorderColor="White" BorderStyle="Ridge"         CellSpacing="1" CellPadding="3" GridLines="Both" BackColor="White" BorderWidth="2px"         EmptyDataText="No data available." runat="server" OnRowEditing="gvExpression_RowEditing"         OnRowCancelingEdit="gvExpression_RowCancelingEdit" OnRowUpdating="gvExpression_RowUpdating"         OnRowDataBound="gvExpression_RowDataBound" DataKeyNames="ID">         <columns>             <asp:TemplateField>                 <itemtemplate>                     <asp:CheckBox ID="chkGroup" runat="server" />                 </itemtemplate>                          <asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="true" Visible="false">             <asp:TemplateField HeaderText="Filed Name">                 <HeaderStyle HorizontalAlign="Left" Width="200px" />                 <itemstyle horizontalalign="Left" width="200px" />                 <itemtemplate>                     <%#Eval("FiledName")%>                     <asp:LinkButton ID="btnApplyFunction" runat="server" CommandName="ApplyFunction" Text="ApplyFunction" />                 </itemtemplate>                 <edititemtemplate>                     <asp:TextBox ID="txtFieldName" Text='<%#Eval("FiledName")%>' runat="server" />                 </edititemtemplate>                          <asp:TemplateField HeaderText="Operators">                 <HeaderStyle HorizontalAlign="Left" Width="30px" />                 <itemstyle horizontalalign="Left" />                 <itemtemplate>                     <%#Eval("Operators")%></itemtemplate>                 <edititemtemplate>                     <asp:DropDownList ID="ddlOperator" runat="server">                                      </edititemtemplate>                          <asp:TemplateField HeaderText="Value">                 <HeaderStyle HorizontalAlign="Left" Width="100px" />                 <itemstyle horizontalalign="Left" width="100px" />                 <itemtemplate>                     <%#Eval("Value")%>                 </itemtemplate>                 <edititemtemplate>                     <asp:TextBox ID="txtValue" Text='<%#Eval("Value")%>' runat="server" />                 </edititemtemplate>                          <asp:TemplateField>                 <itemtemplate>                     <asp:LinkButton ID="btnedit" runat="server" CommandName="Edit" Text="Edit" />                 </itemtemplate>                 <edititemtemplate>                     <asp:LinkButton ID="btnupdate" runat="server" CommandName="Update" Text="Save" />                     <asp:LinkButton ID="btncancel" runat="server" CommandName="Cancel" Text="Cancel" />                 </edititemtemplate>                      </columns>            <%#Eval("FiledName")%>  <div>     <tr align="center">         <td align="center">             <asp:Button ID="btnAdd" runat="server" Text="Add" OnClick="btnAdd_Click" />         </td>         <td align="center">             <asp:Button ID="btnDelete" runat="server" OnClick="btnDelete_Click" Text="Delete" />         </td>         <td align="center">             <asp:Button ID="btnGroup" runat="server" OnClick="btnGroup_Click" Text="Group" />         </td>     </tr></div>

推荐答案

Search For VBlend Winform controls through any search engine.
VBlend controls provides various custom controls like GridView with checkboxes which allows to select multiple data rows .