在下拉列表中选择值时,如何将gridview的所有行都设置为可编辑模式 [英] How do I get all the rows of gridview to be editable mode while selecting value in dropdownlist

查看:122
本文介绍了在下拉列表中选择值时,如何将gridview的所有行都设置为可编辑模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 GridView 外面有一个 DropDownList ,还有一个 GridView 和两个按钮 s。更新并保存选择 DropDownList 的值 GridView 的所有行应更改为编辑模式,输入值后必须保存在数据库中。那么,请帮帮我。



我尝试过的事情:



I am having one DropDownList out side the GridView, and one GridView and two Buttons. Update and Save on selecting the value of DropDownList all the rows of GridView should change to edit mode and after entering values must be saved in database. So, please help me.

What I have tried:

<div>
    
        <asp:DropDownList ID="DropDownList2" runat="server">
        
        <br />
        <br />
    
        <asp:GridView ID="GridView1" runat="server">
        
    
        <asp:Button ID="Button1" runat="server" Text="Update" />
         
        <asp:Button ID="Button2" runat="server" Text="Save" />
         
</div>

推荐答案

这里 - 批量编辑使用CheckBoxes在ASP.Net GridView中更新多行 [ ^ ]



这不完全是你实现的方式。但逻辑是一样的。请仔细阅读以理解。
Here - Bulk Edit Update Multiple Rows in ASP.Net GridView using CheckBoxes[^]

It is not exactly the way you implemented. But the logic is same. Just read through to understand.


这篇关于在下拉列表中选择值时,如何将gridview的所有行都设置为可编辑模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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