hello,
i have a button, a datagrid and a textbox
this is my code:
private void button1_Click(object sender, System.EventArgs e)
{
DataTable dt = getDevices();//returns a datatable
dtgEvents.DataSource = dt;
dtgEvents.Refresh();
}
my getDevices() method reads the value in the textbox and returns a datatable with the results from the database.
let's say when i have "server" in my textbox and i click on 'button1' the datatable returned has sound data in it and my datagrid gets populated correctly. when i have "client" in my textbox the datatable returned is corrupt for some reason and i get a big red X in my datagrid.
i've noticed that once the red X is there it's there to stay.. for example if i now type "server" in my textbox again and click on the button to rebind the datagrid it doesnt work.. how do i recover from the red X? it seems that once a datagrid gets the red X it's useless and cant be refreshed at runtime
anyone got any ideas?
shady
i have a button, a datagrid and a textbox
this is my code:
private void button1_Click(object sender, System.EventArgs e)
{
DataTable dt = getDevices();//returns a datatable
dtgEvents.DataSource = dt;
dtgEvents.Refresh();
}
my getDevices() method reads the value in the textbox and returns a datatable with the results from the database.
let's say when i have "server" in my textbox and i click on 'button1' the datatable returned has sound data in it and my datagrid gets populated correctly. when i have "client" in my textbox the datatable returned is corrupt for some reason and i get a big red X in my datagrid.
i've noticed that once the red X is there it's there to stay.. for example if i now type "server" in my textbox again and click on the button to rebind the datagrid it doesnt work.. how do i recover from the red X? it seems that once a datagrid gets the red X it's useless and cant be refreshed at runtime
anyone got any ideas?
shady