After pointing a List of DataGrid, the record has been sorted, after the order change, how new records are accessed?

xiaoxiao2021-03-06  39

Modify the value of the DataTable corresponding to the current row. As follows: DATAROWVIEW DRV = (DATAROWVIEW) this.bindingContext [this.ds, this.ds.tables [0] .Tablename] .current; you can change the data, you can also get DataRow DROW = Drv.Row; Current object Contains the value of the current item in the data source. To use the value of the current item, you must convert the item to the Type of the object included in DataSource. For example, DataTable includes a DataRowView object. To determine the type of the current object, use the GetType and Tositring methods.

Note When DataSource is DataSet, DataViewManager or DataTable, it is actually bound to DataView. Therefore, each Current object is DataRowView object.

转载请注明原文地址:https://www.9cbs.com/read-64849.html

New Post(0)