Using the Web Forms GridView Control
Số trang: 1
Loại file: pdf
Dung lượng: 21.45 KB
Lượt xem: 1
Lượt tải: 0
Xem trước 1 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Sử dụng Web Forms GridView Control Khi bạn nhìn vào truy cập vào cơ sở dữ liệu trong các chương trước, bạn đã học được cách sử dụng Windows Các hình thức kiểm soát DataGridView. Web Forms có một điều khiển tương tự gọi là GridView.
Nội dung trích xuất từ tài liệu:
Using the Web Forms GridView Control Using the Web Forms GridView ControlWhen you looked at accessing databases in previous chapters, you learned how to use theWindows Forms DataGridView control. Web Forms have a similar control calledGridView. It has some differences because Microsoft designed it to be used in aMicrosoft ASP.NET environment, but the overall purpose is the same; to display and editrows retrieved from a data source. One difference is related to fetching and displayinglarge volumes of data. In a Web Forms application, it is very likely that the clientapplication (or the browser) will be remote from the database that is being used. It isimperative that you use network bandwidth wisely (this has been stated several timesalready, but it is very important and worth repeating), and you should not waste resourcesretrieving vast amounts of data that the user does not want to see. The Web FormsGridView control supports paging, which allows you to fetch data on demand as the userscrolls up and down through a DataSet.Like the Windows Forms DataGridView control, the Web Forms GridView control isdesigned to be used while it is disconnected from the database. You can create anSqlDataSource object to connect to a database, populate a DataSet, and then disconnectfrom the database. You can bind the DataSet in a SqlDataSource control to the GridViewcontrol. Unlike a Windows Forms GridView control, the information in a Web FormsGridView control is presented in a grid of read-only text (rendered as an HTML table inthe browser). However, properties of the Web Forms GridView control allow a user toenter edit mode, which changes a selected row into a set of text boxes that the user canuse to modify the data that is presented. You will use this technique in the exercises inthis chapter.
Nội dung trích xuất từ tài liệu:
Using the Web Forms GridView Control Using the Web Forms GridView ControlWhen you looked at accessing databases in previous chapters, you learned how to use theWindows Forms DataGridView control. Web Forms have a similar control calledGridView. It has some differences because Microsoft designed it to be used in aMicrosoft ASP.NET environment, but the overall purpose is the same; to display and editrows retrieved from a data source. One difference is related to fetching and displayinglarge volumes of data. In a Web Forms application, it is very likely that the clientapplication (or the browser) will be remote from the database that is being used. It isimperative that you use network bandwidth wisely (this has been stated several timesalready, but it is very important and worth repeating), and you should not waste resourcesretrieving vast amounts of data that the user does not want to see. The Web FormsGridView control supports paging, which allows you to fetch data on demand as the userscrolls up and down through a DataSet.Like the Windows Forms DataGridView control, the Web Forms GridView control isdesigned to be used while it is disconnected from the database. You can create anSqlDataSource object to connect to a database, populate a DataSet, and then disconnectfrom the database. You can bind the DataSet in a SqlDataSource control to the GridViewcontrol. Unlike a Windows Forms GridView control, the information in a Web FormsGridView control is presented in a grid of read-only text (rendered as an HTML table inthe browser). However, properties of the Web Forms GridView control allow a user toenter edit mode, which changes a selected row into a set of text boxes that the user canuse to modify the data that is presented. You will use this technique in the exercises inthis chapter.
Gợi ý tài liệu liên quan:
-
Giáo trình Lập trình hướng đối tượng: Phần 2
154 trang 271 0 0 -
Kỹ thuật lập trình trên Visual Basic 2005
148 trang 261 0 0 -
Bài thuyết trình Ngôn ngữ lập trình: Hệ điều hành Window Mobile
30 trang 261 0 0 -
Giáo trình Lập trình cơ bản với C++: Phần 1
77 trang 230 0 0 -
Bài giảng Một số hướng nghiên cứu và ứng dụng - Lê Thanh Hương
13 trang 221 0 0 -
Giáo án Tin học lớp 11 (Trọn bộ cả năm)
125 trang 214 1 0 -
NGÂN HÀNG CÂU HỎI TRẮC NGHIỆM THIẾT KẾ WEB
8 trang 202 0 0 -
Bài tập lập trình Windows dùng C# - Bài thực hành
13 trang 177 0 0 -
Giáo trình Lập trình C căn bản: Phần 1
64 trang 169 0 0 -
Bài giảng Nhập môn về lập trình - Chương 1: Giới thiệu về máy tính và lập trình
30 trang 162 0 0