通过隐藏字段值如何使用jquery在ASP.NET中绑定gridview

问题描述:

1。当我通过Jquery点击gridview时,我得到了

cell的特定列的值。 (exp:如果我单击一行然后我使用Jquery获得val变量中的单元格值&

在Hiddenfield中传递这些val)



2.查看Jquery函数我在隐藏字段中有单元格值。



3.所以,这些隐藏字段值如何在ASP.NET中绑定网格,而不使用任何

服务器端点击事件。



我尝试过:



将数据绑定到gridview asp.net中的JQuery或JSON - ASP.NET,C#.NET,VB.NET,JQuery,JavaScript,Gridview,SQL Server,Ajax,SSRS,XML示例 [ ^ ]

1. When I am click in gridview through Jquery I got the value of perticular column of
cell. (exp: if i click a row then i get cell value in val variable using Jquery &
pass these val in Hiddenfield)

2. look in Jquery function i have cell value in hidden field.

3. So, these hidden field value How to bind a grid in ASP.NET, without using any
serverside click event.

What I have tried:

Bind data to gridview with JQuery or JSON in asp.net - ASP.NET,C#.NET,VB.NET,JQuery,JavaScript,Gridview,SQL Server,Ajax,SSRS, XML examples[^]

GridView 是一个服务器端数据控件,它可以让你在服务器上操作时更轻松因为您可以利用它提供的内置功能。将客户端代码与服务器控件混合起来会很麻烦。如果您想使用 AJAX 来填充表单,那么您可能希望手动生成html,或者使用您可以轻松管理的客户端网格。例如:使用ASP.NET Web窗体和JSON Web创建jqGrid服务[^] [ ^ ]



更多参考资料:

将jqGrid与ASP.NET Web窗体一起使用 - 第一部分 [ ^ ]

使用ASP.NET Web窗体使用jqGrid - 第2部分 [ ^ ]



当然,您可以通过快速搜索来找到更多示例:google:)
GridView is a server-side data control and it would make your life easier when manipulating it at the server because you can take advantage of the built-in features it offers. It would be a pain to mix your client-side code with server controls. If you want to use AJAX to populate your form, then you might want to generate the html by hand or perhaps use a client-side grid that you can easily manage. For example: Creating a jqGrid with ASP.NET Web Forms and a JSON Web Service[^][^]

More references:
Using jqGrid with ASP.NET Web Forms - Part I[^]
Using jqGrid with ASP.NET Web Forms - Part 2[^]

And of course, you can find more examples by doing a quick search ta google :)