After setting Sorted porperty of combo box to true, data in the combo does
not appear.
I have combo bound to Datatable.
What is the reason for that?

--
Regards,
Lalit Bhatia

Re: Sorting in Combo Box by Tim

Tim
Sat Jun 18 08:28:00 CDT 2005

Are you seeing an ArgumentException? The help indicates that this exception
should be thrown when "an attempt was made to sort a ComboBox that is
attached to a data source."
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscomboboxclasssortedtopic.asp

Try creating a DataView, using the DataTable, and set the sort order using
the DataView objects Sort property. Then assign the DataView object to the
DataSource property of the ComboBox.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatadataviewclasssorttopic.asp

Make sure that the Sorted property of the ComboBox is set back to "false".

--
Tim Wilson
.Net Compact Framework MVP

"Lalit Bhatia" <xyz@abc.com> wrote in message
news:OZGOV57cFHA.3932@TK2MSFTNGP12.phx.gbl...
> After setting Sorted porperty of combo box to true, data in the combo does
> not appear.
> I have combo bound to Datatable.
> What is the reason for that?
>
> --
> Regards,
> Lalit Bhatia
>
>