An ASP.NET Developer Finds jQuery very useful when working with GridView:green_heart:


An ASP.NET Developer Finds jQuery very useful when working with GridView
GridView withjQuery

The GridView control is a most popular control in ASP.NET to show values from a Data Source to an HTML table. Each column of a GridView represents a field, while each row represents a record. It supports the following features:

Binding to data source controls, such as DataTables.

Built-in sort capabilities.

Built-in update and delete capabilities.

Built-in paging capabilities.

Built-in row selection capabilities.

Programmatic access to the GridView object model to dynamically set properties, handle events, and soon.

Customizable appearance through themes andstyles.

The GridView can be created with just one line of code in the.aspx page:

<asp:GridView ID="gridView" runat="server"></asp:GridView>

And in the.aspx.cs page you can access this GridView by it’s ‘id’, and set the data source value like this:

gridView.DataSource = dataTable; gridView.DataBind();

Here dataTable is an object of DataTable.cs class of Dot Net Framework. To fill it with values from the database you use SqlDataAdapter class.

GridView withjQuery

If you are an ASP.NET developer then you will find jQuery very useful in your GridView. It can be used to create great feature with just a few lines of code. All you have to do is add the jQuery to your.aspx page and start making some great features in GridView.

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script> <script type="text/javascript">
$(document).ready(function () {
// write code here
});
</script>

Here in this article I have selected some of the very finest jQuery + GridView tutorial which every ASP.NET Web Developer should read. It will help them to use these tutorials when they are working with GridView.

1. Check/Uncheck All GridView Checkboxes WithjQuery
An ASP.NET Developer Finds jQuery very useful when working with GridView
Check Uncheck all GridView Checkboxes withjQuery

You can add a checkbox on the header row of the GridView. When this checkbox is clicked then all the child checkboxes are automatically clicked by jQuery. This feature helps users to quickly select all the checkboxes instead of manually selecting them one by one.

2. Bind GridView with jQuery AJAX Step by Step ― No PagePostback
An ASP.NET Developer Finds jQuery very useful when working with GridView
Bind GridView with jQueryAJAX

The .ajax() method of GridView helps in doing asynchronous operations in GridView. Here it includes binding data from data source with no page postback. This asynchronous binding operation from jQuery is very fast because only a part of the page is updated.

3. Bind GridView with Paging using jQuery Load with No PageRefresh
An ASP.NET Developer Finds jQuery very useful when working with GridView
Binding GridView with jQueryAJAX

The .load() method of jQuery is another method to do AJAX method. In this tutorial the jQuery’s load method is used to Bind a GridView with data from the database so that there is no page postback.

4. Bind GridView Using jQuery Load In ASP.NET With No PageReload
An ASP.NET Developer Finds jQuery very useful when working with GridView
Bind GridView using jQuery Load in ASP.NET with No PageReload

A single GridView can be used in multiple pages and this prevents code duplication in a website. In this tutorial jQuery Load method is used to show a GridView in multiple page that also has options to filter the GridView data. All these operations are done with no page postback.

Conclusion

Every ASP.NET website use GridView in some place or the other, and there is no better use of jQuery in GridView than in other controls of ASP.NET. I hope you like this article and let me know of any queries you have regarding GridView or jQuery.

本文前端(javascript)相关术语:javascript是什么意思 javascript下载 javascript权威指南 javascript基础教程 javascript 正则表达式 javascript设计模式 javascript高级程序设计 精通javascript javascript教程

代码区博客精选文章
分页:12
转载请注明
本文标题:An ASP.NET Developer Finds jQuery very useful when working with GridView
本站链接:https://www.codesec.net/view/627953.html


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 前端(javascript) | 评论(0) | 阅读(49)