DataGrid sort problem
-
Hello, here is my problem. I have a DataGrid control with some columns. My question is about two of them. When I enter a value in any cell of the first column I want to calaculate (by expression) the value of the second column by using the value of the first column in the same row. OK, I have a function which does that and works fine, but when I click to sort the DataGrid it doesn't work correct. I use DataView to navigate through the records in a DataTable. All of the columns are in this DataTable. Where do I make a mistake? Can somebody help?
-
Hello, here is my problem. I have a DataGrid control with some columns. My question is about two of them. When I enter a value in any cell of the first column I want to calaculate (by expression) the value of the second column by using the value of the first column in the same row. OK, I have a function which does that and works fine, but when I click to sort the DataGrid it doesn't work correct. I use DataView to navigate through the records in a DataTable. All of the columns are in this DataTable. Where do I make a mistake? Can somebody help?
what did u use to sort the table, i use this: xDataSet.xtable.DefaultView.RowFilter= " xcolumnname LIKE '%" + txt_zoeken.Text+ "%' "; dataGridView1.DataSource = xDataSet.xtable.DefaultView; but i dont know how to sort the whole table in ones, i only sort in one column. let me know i u find how to do this thx grz
-
what did u use to sort the table, i use this: xDataSet.xtable.DefaultView.RowFilter= " xcolumnname LIKE '%" + txt_zoeken.Text+ "%' "; dataGridView1.DataSource = xDataSet.xtable.DefaultView; but i dont know how to sort the whole table in ones, i only sort in one column. let me know i u find how to do this thx grz