ralphtrent
Programmer
Hello
I have the following code.
The output is not what I would expect. I get 4 empty rows. Why is that? I save my desireded records in the drf object before I do the clear so I am not sure why the values go away?
Any help?
I have the following code.
Code:
internal DataTable Filter(string Field, object Value, DataTable Source)
{
DataRow[] drf = Source.Select(Field + " = " + Value);
Source.Rows.Clear();
foreach (DataRow dr in drf)
{
Source.ImportRow(dr);
}
return Source;
}
Any help?