How to remove last row from DataView before binding it to a DataGrid?
-
I have a DataView. I am Sorting the DataView and then removing the last row before binding it to dataGrid.
dvViewOrder = new DataView(dtViewOrder); dvViewOrder.Sort = "VOD_ProductCategory ASC"; if (dtViewOrder.Rows.Count >= 2) dtViewOrder.Rows.RemoveAt(dtViewOrder.Rows.Count - 1); OrderList.DataSource = dvViewOrder; OrderList.DataBind();
Even tough I am removing it afte sorting. It is removing a row and then sorting. Can anyone help:( Mads -
I have a DataView. I am Sorting the DataView and then removing the last row before binding it to dataGrid.
dvViewOrder = new DataView(dtViewOrder); dvViewOrder.Sort = "VOD_ProductCategory ASC"; if (dtViewOrder.Rows.Count >= 2) dtViewOrder.Rows.RemoveAt(dtViewOrder.Rows.Count - 1); OrderList.DataSource = dvViewOrder; OrderList.DataBind();
Even tough I am removing it afte sorting. It is removing a row and then sorting. Can anyone help:( Mads