Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
sam #1
Sort datagrid
Hello Group,
I have a datagrid which needs to be sorted but the column
headers should not be clickable on certain conditions( say on the
"print version" of the page). The simple piece of code used is :
dgwip.allowsorting=true
dgWIP.DataSource = dvWIP
dvWIP.Sort = Me.SortColumn & " " & Me.SortOrder
dgWIP.DataBind()
**dgwip.allowsorting=false
Since, I need to sort the datagrid and disable the column headers
after the sort, I disable the allowsorting property after the databind
but that does not seem to do the job. Not sure, how to go about it.
Any help would be great!!
Thanks,
Sam.
sam Guest
-
sort in datagrid
Hi, I have some columns in my datagrid which are date type. I want to sort on them. What would be the best way to do it. Based on a article to... -
Datagrid sort
I have a datagrid that sorts. The sort doesn't seem to execute on my template column. It only works on my bound columns. -
bidirectional sort with datagrid
Can someone show me how to turn this into a bi-directional sort allowing ascending and descending using the default datagrid allowsorting attribute?... -
datagrid won't sort
I have a datagrid that won't sort. The event handler is firing and return label text, just not the sort. Here's my Sub Page_Load and Sub... -
Ado sort error-Ado Sort -Relate, Compute By, or Sort operations cannot be done on column(s) whose key length is unknown or exceeds 10 KB.
Ado Sort -Relate, Compute By, or Sort operations cannot be done on column(s) whose key length is unknown or exceeds 10 KB. hi, guys i have asp... -
Eric #2
Re: Sort datagrid
From your description, the special conditions that preclude sorting also
require a post back or new page. If you can track when this is true, then
you can disallow sorting. For example, the "Print Version" is obvoiusly a
special case rendering of the page, so you can track it and disallow sorting
when it is true.
"sam" <sri_san@mailcity.com> wrote in message
news:5ca7db4a.0409270520.da20980@posting.google.co m...> Hello Group,
> I have a datagrid which needs to be sorted but the column
> headers should not be clickable on certain conditions( say on the
> "print version" of the page). The simple piece of code used is :
>
> dgwip.allowsorting=true
> dgWIP.DataSource = dvWIP
> dvWIP.Sort = Me.SortColumn & " " & Me.SortOrder
> dgWIP.DataBind()
> **dgwip.allowsorting=false
>
> Since, I need to sort the datagrid and disable the column headers
> after the sort, I disable the allowsorting property after the databind
> but that does not seem to do the job. Not sure, how to go about it.
>
> Any help would be great!!
>
>
> Thanks,
> Sam.
Eric Guest
-
malin@o2.pl #3
Sort Datagrid
Hi
I have one question, can i sort DataGrid with two parameters ?
that's mind if i have three columns in dataggrid: First Name, Last
Name, Office
John, Smith, New York
John, Johnson, Oklahoma
Jeff, Jhonson, New York
Mug, Gates, New York
and when i click sort to Office i have sorted data but i have on more
Offices with this same Name, so i want when i sorted by Office the
second parameters sort with example Last Name.
The result i want:
Mug, Gates, New York
Jeff, Jhonson, New York
John, Smith, New York
John, Johnson, Oklahoma
Big tx for all answers
malin
malin@o2.pl Guest
-
Alvin Bruney - ASP.NET MVP #4
Re: Sort Datagrid
This functionality isn't built in, you will have to custom build it. One
approach is to use the dataview object and pass in the multi-column sort
critieria
--
Regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ [url]www.lulu.com/owc[/url]
Forth-coming VSTO.NET
-------------------------------------------------------
<malin@o2.pl> wrote in message
news:1125318434.777853.55260@o13g2000cwo.googlegro ups.com...> Hi
>
>
> I have one question, can i sort DataGrid with two parameters ?
> that's mind if i have three columns in dataggrid: First Name, Last
> Name, Office
>
> John, Smith, New York
> John, Johnson, Oklahoma
> Jeff, Jhonson, New York
> Mug, Gates, New York
>
> and when i click sort to Office i have sorted data but i have on more
> Offices with this same Name, so i want when i sorted by Office the
> second parameters sort with example Last Name.
>
> The result i want:
>
> Mug, Gates, New York
> Jeff, Jhonson, New York
> John, Smith, New York
> John, Johnson, Oklahoma
>
> Big tx for all answers
> malin
>
Alvin Bruney - ASP.NET MVP Guest



Reply With Quote

