make gridview editable onasp:按钮服务器控件单击 [英] make gridview editable onasp:button server control click

查看:77
本文介绍了make gridview editable onasp:按钮服务器控件单击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个文本框和按钮控件。用户将在文本框中输入数字,然后单击按钮。应该将大量行添加到gridview,gridview应该同时处于编辑模式。我已经编写了添加行的代码但是我无法在按钮单击同一按钮时编辑gridview。如何使gridview可编辑onasp:按钮服务器控件单击

Hi,
I have a textbox and button control. User will enter number in textbox and click button. That much number of rows should get added to gridview and gridview should be in edit mode at the same time. I have written the code for adding row but I cant make the gridview editable on the button click of the same button. How to make gridview editable onasp:button server control click

推荐答案

你只需要设置 GridView.EditIndex [ ^ ]属性(从零开始)到您想要处于编辑模式的行。

You just need to set the GridView.EditIndex[^] property (zero-based) to the row you'd like to be in edit mode.
GridView1.EditIndex =2;


这篇关于make gridview editable onasp:按钮服务器控件单击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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