PC Review


Reply
Thread Tools Rate Thread

alternate sorting for grid view

 
 
=?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=
Guest
Posts: n/a
 
      24th May 2007
i have 4 small gridviews all using the same data source. I want to set the
initial sort on load to be different for each. I this i should be using a
view. However, i'm not sure how to start the process . i'm looking for the
default view in the datasource, but cna't find it. and help or articals would
be appreciated.

--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
 
Reply With Quote
 
 
 
 
=?Utf-8?B?U2VyZ2V5IFBvYmVyZXpvdnNraXk=?=
Guest
Posts: n/a
 
      25th May 2007
Not sure whether you could do it declaratively - but can be easily achieved
programmatically, for example:
Dim table As DataTable = MyDataTableRetrievalMethod
MyGrid1.DataSource = New DataView(table, "", "Field1",
DataViewRowState.CurrentRows)
MyGrid1.DataBind()
....
MyGridN.DataSource = New DataView(table, "", "FieldN Desc",
DataViewRowState.CurrentRows)
MyGridN.DataBind()

"WebBuilder451" wrote:

> i have 4 small gridviews all using the same data source. I want to set the
> initial sort on load to be different for each. I this i should be using a
> view. However, i'm not sure how to start the process . i'm looking for the
> default view in the datasource, but cna't find it. and help or articals would
> be appreciated.
>
> --
> thanks (as always)
> some day i''m gona pay this forum back for all the help i''m getting
> kes

 
Reply With Quote
 
=?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=
Guest
Posts: n/a
 
      25th May 2007
I think this is wher ei may be hanging up on the method i'm attempting:
MyDataTableRetrievalMethod. given i have datasource how do i create this
method?

or sould the whole thing be done programaticly?

--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes


"Sergey Poberezovskiy" wrote:

> Not sure whether you could do it declaratively - but can be easily achieved
> programmatically, for example:
> Dim table As DataTable = MyDataTableRetrievalMethod
> MyGrid1.DataSource = New DataView(table, "", "Field1",
> DataViewRowState.CurrentRows)
> MyGrid1.DataBind()
> ...
> MyGridN.DataSource = New DataView(table, "", "FieldN Desc",
> DataViewRowState.CurrentRows)
> MyGridN.DataBind()
>
> "WebBuilder451" wrote:
>
> > i have 4 small gridviews all using the same data source. I want to set the
> > initial sort on load to be different for each. I this i should be using a
> > view. However, i'm not sure how to start the process . i'm looking for the
> > default view in the datasource, but cna't find it. and help or articals would
> > be appreciated.
> >
> > --
> > thanks (as always)
> > some day i''m gona pay this forum back for all the help i''m getting
> > kes

 
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
sorting a grid view that is bound to a generic collection allan.s.palmer@gmail.com Microsoft ASP .NET 0 19th Jul 2007 04:38 AM
grid view sorting problem =?Utf-8?B?YmJkb2J1ZGR5?= Microsoft C# .NET 1 7th Jun 2007 03:53 PM
Alternate Row Color for entire grid B. Microsoft C# .NET 2 17th May 2007 08:50 PM
Sorting the Grid view by column bbawa1@yahoo.com Microsoft ASP .NET 1 13th Apr 2007 10:03 AM
grid view sorting and paging puja Microsoft C# .NET 1 3rd Jul 2006 06:21 AM


Features
 

Advertising
 

Newsgroups
 


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