DataGrid clickable row

橙三吉。 提交于 2019-12-25 03:58:25

问题


I'm looking for a way for my users to click on a row on my DataGrid where if that click anyway they would pick up the UniqueID column, and then open an new page which would be called "uniqueidview.aspx" that uses the UniqueID as it's primary key in a MySQL query. I'm able to do the MySQL part but i can't find a walk-through or guide on how to do this using a DataGrid, i've found a few using DataView, any help would be awesome. Thanks!


回答1:


4 Guys From Rolla posted an article Creating a Row-Selectable DataGrid Control many years back. In the article, clicking on the row would put the grid into edit mode.

You might be able to use that as a starting point, and modify it to do what you're looking to do.

Are you using an actual DataGrid (from .NET 1.1), or do you mean the GridView (2.0+)?

If you're actually talking about GridView, here's another link:

Developing a row-clickable GridView



来源:https://stackoverflow.com/questions/8197592/datagrid-clickable-row

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!