I have a Gridview
and RadioButtonList
like this;
As you can see my Gridview
can Enable for Editing, and some columns are DropdownLis开发者_如何学JAVAt
when editing. (also when it was bound)
I have 2 radiobutton in my RadioButtonList
. Görüntüleme (It means View
) and Düzenleme (It means Edit
).
What I want is, If Düzenleme
selected, normal Gridview can bind. (I can do that.) If Görüntüleme
selected, Gridview can't has EnableEdit and I want all columns should be normal column. (GridViewDataTextColumn
) So, people can only view the gridview.
The point is,
How can I change Gridview's EnalbleEdit
and all column changed to GridViewDataTextColumn
?
I found the solution.
For ASP.NET Gridview
Just change
GridView1.AutoGenerateEditButton = False
For Devexpress ASPxGridview
Just change
(ASPxGridView.Columns["#"] as GridViewCommandColumn).EditButton.Visible = false
精彩评论