Đang chuẩn bị liên kết để tải về tài liệu:
Creating and Using a DataViewManager Object

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Creating and Using a DataViewManager Object To create a DataViewManager, you use one of the following constructors: DataViewManager() DataViewManager | Creating and Using a DataViewManager Object To create a DataViewManager you use one of the following constructors DataViewManager DataViewManager DataSet myDataSet where myDataSet specifies the DataSet used by the DataViewManager object. This sets the DataSet property of the new DataViewManager object to myDataSet. Let s take a look at an example of creating and using a DataViewManager. Assume you have a DataSet named myDataSet which contains a DataTable populated with rows from the Customers table. The following example creates a DataViewManager object named myDVM passing myDataSet to the constructor DataViewManager myDVM new DataViewManager myDataSet The next example sets the Sort and RowFilter properties that will be used later when a DataView for the Customers DataTable is created myDVM.DataViewSettings Customers .Sort CustomerlD myDVM.DataViewSettings Customers .RowFilter Country UK Note The previous code doesn t actually create a DataView it merely sets the properties of any DataView created in the future that views rows from the Customers DataTable. The following example actually creates a DataView by calling the CreateDataView method of the myDVM DataViewManager passing the customersDT DataTable to CreateDataView DataView customersDV myDVM.CreateDataView customersDT The Sort and RowFilter properties of the customersDV DataView are set to CustomerlD and Country UK respectively. These are the same settings as those set earlier in the DataViewSettings property. Listing 13.4A shows a complete example that creates and uses the DataViewManager shown in this section. Listing 13.4A USINGDATAVIEWMANAGER.CS UsingDataViewManager.es illustrates the use of a DataViewManager object using System using System.Data using System.Data.SqlClient class UsingDataViewManager public static void Main SqlConnection mySqlConnection new SqlConnection server localhost database Northwind uid sa pwd sa SqlCommand mySqlCommand mySqlConnection.CreateCommand mySqlCommand.CommandText SELECT

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.