单击gridview中单个单元格的事件 [英] click event for a individual cells in gridview

查看:220
本文介绍了单击gridview中单个单元格的事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用asp.net3.5 c#。我想为 GridView 中的单元格生成单击事件。我实际上使用 DataTable 并将其分配给 GridView

I am working with asp.net3.5 c#. I want to make the click event for a cell in a GridView. I'm actually using a DataTable and assign this to GridView.

我想单元格的点击事件。可能吗?如果可能的话,请指导我如何解决这个问题。

I want click event for a cell. Is it possible? If it is possible please guide me how to solve that please.

推荐答案

您必须为单元格注册点击事件会将其发送回服务器进行处理。找到此可能会帮助您实现单元格点击

You would have to register a click event for the cell which would post it back to server for your processing.Found Thiswhich might help you in achieving the cell click

这里是通过在 RowDataBound 事件的单元格中添加onclick属性完成的,但我不完全确定是你想要的,但可能有帮助。

Here its been done by adding the onclick attribute to the cell in the RowDataBound Event, I am not entirely sure if this is what you want but might be helpful.

这篇关于单击gridview中单个单元格的事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆