datagrid: binding databiew RRS feed

  • Question

  • I am trying to bind two dataviews of the same datatable to two datagrids.

                DataView dv = ds.datatable.DefaultView;
                dv.RowFilter = "Type=1";
               Grid1.DataContext = dv;

                DataView dv1 = ds.datatable.DefaultView;
                dv1.RowFilter = "Type=2";
               Grid2.DataContext = dv1;

    Problem is that second rowfilter is affecting the first dataview and I am seeing same data on both the grids. How do I fix this problem?

    Thanks a lot

    Friday, September 11, 2009 8:25 PM

All replies

  • Did you try to Clone the ds to ds1 and than create the DataViews?
    Monday, September 14, 2009 12:19 PM