|
i set the dataSource to datagridview
DatTbl = CustomerManger.SelectCustomersAllDT();
ds.Tables.Add(DatTbl);
DatTbl.TableName = "Customers";
dgvCustomers.DataSource = null;
dgvCustomers.DataSource = ds;
dgvCustomers.DataMember = "Customers";
then is selectionChange event i Select another data in list and before set it to listbox datasource .. datasource of datagrid change and all columns and data of customer cleared and replaced by Notices ???????
private void dgvCustomers_SelectionChanged(object sender, EventArgs e)
{
NoticList NL=NoticeManager.SelectNoticesbyCustCD(newCust.CustId);
}
if i comment this line datasource of datagrid view doesn't change
|
|
|
|
|
I don't know. You probably need to show more code.
And you don't need the DataSet, you can use the DataTable (or preferably its DefaultView) as the DataSource.
|
|
|
|