Datagridview sort after columns added

Datagridview sort after columns added

Page 1 of 1

0 Replies - 982 Views - Last Post: 28 May 2009 - 01:51 PM Rate Topic: -----

#1 antomira  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 20-May 09

Datagridview sort after columns added

Post icon  Posted 28 May 2009 - 01:51 PM

Hello,

I have a datagrid that is bound to dataset. After the binding, I add some columns that I programmatically populate. I allow the user to sort the datagrid. However, there are two things happening:

1. When the user clicks on one of the columns that is part of the dataset, the datagridview is sorted but I lose the contents on the columns that I added

2. The user tries to sort on any of the columns that were not part of the dataset (columns that were added after the fact) and the datagridview does nothing.

Any suggestions with this would be greatly appreciated. I'm not posting the code since I think the question is straight-forward but if anyone wants to see the code, I can post it.

Thanks

Antonio

Is This A Good Question/Topic? 0
  • +

Page 1 of 1