PC Review


Reply
Thread Tools Rate Thread

Datagrid (Winform) / Datatable / Sorting problem

 
 
Daniel
Guest
Posts: n/a
 
      30th Nov 2003
I would like use a datagrid to display the content of my datatable in the
same order it appears in my datatable. My datatable has no key value.

I begin by clearing my existing datable using the datatable.clear method,
then I fill my datatable using the dataadapter.fill method,
then I add some rows at different location in my datatable using
datatable.Rows.InsertAt method,
finally, I bind my datatable to my datagrid using
datagrid.SetDataBinding(myDataset,"mytable")

When I execute the code for the very first time, it works well. However, if
I execute it again, the datagrid shows the content sorted by the column as
it appears from left to right. The datagrid.refresh method doesn't change
nothing.

Any help will be appreciated.

Thanks.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
datagrid dataset dataview datatable sorting Nathan Franklin Microsoft VB .NET 0 19th Jan 2006 05:15 AM
Sorting DataGrid via SqlCeResultSet verses DataTable? Jen Microsoft Dot NET Compact Framework 3 3rd Oct 2005 10:42 PM
Sorting datagrid-dataview-datatable =?Utf-8?B?c3ViVA==?= Microsoft ADO .NET 2 27th May 2004 03:56 PM
Datagrid (Winform) / Datatable / Sort problem Daniel Microsoft ADO .NET 0 30th Nov 2003 04:59 PM
WINFORM DataGrid/DataTable cell data change andrewcw Microsoft C# .NET 1 20th Oct 2003 08:24 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:43 AM.