2

Can you please provide me with a sample syntax for it?

Something like this?

var qry = (ds.table.Select(s => s.col, string.Empty, DataViewRowState.ModifiedCurrent));

thanks

dugas
  • 12,025
  • 3
  • 45
  • 51
user1215811
  • 55
  • 1
  • 5

1 Answers1

1

MSDN Documentation on querying the DataRowView.

DataTable table = new DataTable();
table.Columns.Add("A", typeof(int));

table.Rows.Add(1);
table.Rows.Add(2);
table.Rows.Add(3);
table.AcceptChanges();
DataView view = new DataView(table);

table.Rows[1][0] = -2;
table.Rows[2][0] = -3;

view.RowStateFilter = DataViewRowState.ModifiedCurrent;

var query = from DataRowView rowView in view
            select rowView;
dugas
  • 12,025
  • 3
  • 45
  • 51
  • thank you thedugas but your first answer did'nt help. sorry if my question is misleading but this code worked for me. var query = (table.Select("TRUE", string.Empty, DataViewRowState.CurrentRows).Select(s => new { col = s.Field("col") })); – user1215811 Mar 22 '12 at 03:27