如何隐藏网格视图列并可以以其他形式查看按钮 [英] how to hide grid view column and can view button in another form
问题描述
我的Web应用程序中有2种情况.
1.提出新的声明
2.编辑现有的声明
在第一种情况下,我创建了新的声明,并在gridview中显示了数据,但是现在我希望当我单击Edit_Existing_Claim的Button时,应该打开相同的表单(create_new_claims),但是gridview应该是可编辑的.
我可以在其中查看编辑按钮,单击该按钮则必须能够进行编辑,但是在创建新声明时,该按钮不应存在.
我在gridview中添加了编辑按钮,并将可见属性设置为false.
但是现在当我单击edit_existing_claims时如何查看该编辑按钮?
请告诉我在这种情况下可以遵循的步骤.
There are 2 scenarios in my web application.
1. Create New claims
2. Edit Existing claims
In first scenario, I created new claims, and showed data in gridview but now I want that when I click on Button for Edit_Existing_Claim then the same form (create_new_claims) should be opened but that gridview should be editable.
There I can view edit button, when I click on it then I must be able to edit, but in Creating new claims that button should not be there.
I added edit button in gridview and set the visible property false.
But now how can I view that edit button when I click on edit_existing_claims?
Please tell me the steps which I can follow for this scenario.
推荐答案
Gridview具有默认字段,例如< asp:commandfield xmlns:asp =#unknown">使用此字段,您可以在gridview列中生成编辑,更新,取消按钮.转到应用程序的源代码并在gridview中编写
<列>< asp:命令字段showitbutton ="true" showupdatebutton ="true" showcancelbutton ="true">
Gridview has default field like <asp:commandfield xmlns:asp="#unknown">.using this field you can generate edit,update,cancel buttons in gridview columns.go to source code of your app and write in gridview
<columns><asp:commandfield showeditbutton="true" showupdatebutton="true" showcancelbutton="true">
这篇关于如何隐藏网格视图列并可以以其他形式查看按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!