开发者

GridView with a custom button

Specifically, I am using DevExpress 10.1 for their APSxGridView. I have a grid with a command column. I plan on using two of the standards: new and edit. I would like to create a custom button that will take a value from within the current row and redirect to another page using that value as part of the query string.

I have seen some suggestions to create a hyperlink column to do this, but I would like to have all of these commands in a single column. I can see solutions for this if I weren't constrained by leaving all buttons within a single column. Is this something that maybe I could as开发者_如何转开发sign during HtmlDataCellPrepared?

Thanks.


If it's anything like the standard .net GridView I would create a template field. In a template field you can put whatever you want in there. I have done this when I need an asp.net control (a button, hyperlink, etc) instead of the standard grid buttons and commands. You can then access controls and the datasource during the OnRowDataBound event handler and customize the button during run time if need be.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜