开发者

In ASP.NET, i have a DataGridView Control, how can i add a edd button and how to plud code to that without use GUI, only through Programmee

In ASP.NET,开发者_StackOverflow i have a DataGridView Control, how can i add a edd button and how to plud code to edit, without useing GUI, only through Program


You can use the commandfield class and can manually add the edit colum from in the code as below:

 CommandField field = new CommandField();
 field.ButtonType = ButtonType.Button;
 field.ShowEditButton = true;
 GridView1.Columns.Add(field);

Then handle the edit row event of the gridview. you can set all sorts of properties in the commandfield object like you do from the gui.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜