want to generate
-
hai all, here i have a code to generate serial no in datagridview. If e.RowIndex >= 0 AndAlso e.ColumnIndex = SLNo.Index Then e.Value = e.RowIndex + 1 ' + 1 is becuase RowIndex is a zero based End If using above code,serial nos are displayed in ascending order. but i want to display the serial nos in descending order. so how to display the serial nos in descending order.
-
hai all, here i have a code to generate serial no in datagridview. If e.RowIndex >= 0 AndAlso e.ColumnIndex = SLNo.Index Then e.Value = e.RowIndex + 1 ' + 1 is becuase RowIndex is a zero based End If using above code,serial nos are displayed in ascending order. but i want to display the serial nos in descending order. so how to display the serial nos in descending order.
-
hai bardy, The datas only displayed from sql.I genarate serial no automatically using above code.It comes in ascending order.but i want to display in descending order.
-
hai bardy, The datas only displayed from sql.I genarate serial no automatically using above code.It comes in ascending order.but i want to display in descending order.
Well I'm assuming that you pull the data from Sql into a DataSet then bind it to the GridView. You can get the Total number of rows from the DataSet (int TotalRows = ds.Rows.Count) then when you set the serial No just go (TotalRows - e.RowIndex), that should be in Descending order. Hope this helps.