DataBinding could not find a row in the list that is suitable for all bindings

  • Thread starter Thread starter MajorTom
  • Start date Start date
M

MajorTom

Hello

I need help. I have a datagrid that have a dataview as datasource.

in the keyup event of one textbox I use dataview.rowfilter = some.text;

when the condition of my rowfilter return some rows, everything works fine.

At the point that the rows returned by the rowfilter is cero (0), the
datagrid don't get the rows even if I use a new rowfilter with results, the
datagrid is empty all the time and if I try to use the datagrid I get the
error:

DataBinding could not find a row in the list that is suitable for all
bindings

please help

MajorTom
 
I was just looking through the docs on DataView.RowFilter in MSDN, they have
done the binding after the rowfilter is set. So maybe when you filter the
rows the bindings are not getting updated. Maybe if you refresh the binding
or set the databinding again it might work.

for eg. //Set row filter
// datagrid.Datasource = dataview;
 
Thanks for your replied

I use

this.dataGrid1.DataSource = this.ds1MascotasVisitas;
this.dataGrid1.DataSource = dataView1;

and now the datagrid show the records but I get the same error when I tried
to navigate the grid.

(I check the dataview and is working fine with the filter, only the datagrid
lost the records)

I also have some textboxes that are binding to the same dataview.

If you need more information or some code, let me know

Thanks

MajorTom
 
Hello,

everything is OK know

I have a datetimepicker and the databinding to the value properties, I
change to the text properties and is working as expected

Thank for your help

MajorTom

PD: I don't have to assign the datasource again
 
Back
Top