I have a grid that has 6 columns on it by default. I then allow the user to add/remove other columns at run time. The add works well however if they add a column and then attempt to remove that column only the Header for the column actuall get removed.
Eaxmple the user selects a checkbox that adds State column to a grid. I add the column, set the datafield and uniquename. ReBind the grid and all is good. The user the deselects the State checkbox so I attempt to remove the column by finding that column with the unique name, do a Remove (I have also tried getting column and using RemoveAt) and a rebind. The header for State is now gone but all the actual rows are still populated with the state data. If the then attempt to add State again a new column is created with the state info and the previous column now shows System.Collection.Dataobject still with no header.
Any assitance would be welcome.
Thanks
Eaxmple the user selects a checkbox that adds State column to a grid. I add the column, set the datafield and uniquename. ReBind the grid and all is good. The user the deselects the State checkbox so I attempt to remove the column by finding that column with the unique name, do a Remove (I have also tried getting column and using RemoveAt) and a rebind. The header for State is now gone but all the actual rows are still populated with the state data. If the then attempt to add State again a new column is created with the state info and the previous column now shows System.Collection.Dataobject still with no header.
Any assitance would be welcome.
Thanks