Home>

I am developing with c # (Visual Studio).

Currently trying to display two data in tabcontrol, but it doesn't work
I use defaultview and defaultviewfilter because I want to sort and display the data.
The code written to display data in the second datagridview after displaying the data in the first datagridview will stop if the child list of the 'field (DB name)' cannot be created.
Are there any restrictions when using rowfiltwer?
Please reply

Here is the code
ds order = new order ();

The following processing is performed after calling ds when loading the form
The first display code
{
string extract 1 = "number LIKE '%" + txt number.Text + "%'";
Extract 1 + = "AND level = '" + "2" + "'";
string extract 2 = "order number DESC";
ds.T Order.DefaultView.RowFilter = Extract 1;
ds.T Order.DefaultView.Sort = Extract 2;
dgvT order.DataSource = ds.T order.DefaultView;

}

Code for the second display
{
string extract 1 = "number LIKE '%" + txt number.Text + "%'";
Extract 1 + = "AND level = '" + "2" + "'";
string extract 2 = "order number DESC";
ds.T line.DefaultView.RowFilter = Extract 1;
ds.T line.DefaultView.Sort = Extract 2;
dgvT line.DataSource = ds.T line.DefaultView;

}

  • Answer # 1

    An error occurred when using Rowfilter with multiple datasets in tabcontrol
    It seems to have been able to avoid bugs by changing to a specification that does not use tabs.