Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. bbijan

    Get data from DataGrid after sorting

    I actually found an easy way of deleting the row: After this: BindingManagerBase bm = DataGrid1.BindingContext[DataGrid1.DataSource, DataGrid1.DataMember]; DataRow dr = ((DataRowView)bm.Current).Row; since dr is the row I want to delete I just use the Delete() method: dr.Delete()...
  2. bbijan

    Get data from DataGrid after sorting

    The importRow() works fine, but o use: DataTable.Rows[rowIndex].Delete() I need to get the row index, but the problem is getting the correct index after sorting. Any ideas?
  3. bbijan

    Get data from DataGrid after sorting

    That works! Is there a way of getting the index/rownumber of the selected row, it has to be the correct index even if the column is sorted by clicking the header. I want't to use the row index to move a row from DataGrid1 to DataGrid2, and delete that row from DataGrid1. Thanks.
  4. bbijan

    Get data from DataGrid after sorting

    AllowSorting = true for the DataGrid. I have clicked the top rows, which means row containing the coulmns name, the rows would be sorted by that column asc or desc. Doesn't this means that the DataGrid is sorted. Since I've been dealing with this problem for 2 days now, I'm really desperate...
  5. bbijan

    Get data from DataGrid after sorting

    Hi all I have encountered the same problem getting the correct values after sorting in a colunm. I have a button which runs the following code given in the previous reply: DataRowView drv; drv = ((DataView)DataGrid1.DataSource)[DataGrid1.CurrentRowIndex]; MessageBox.Show(drv[colIndex])...

Part and Inventory Search

Back
Top