By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,908 Members | 2,055 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,908 IT Pros & Developers. It's quick & easy.

Datagrid Sorting

P: n/a
I have created a datagrid in my aspx with the 'AllowSorting' property to true.

When clicking on the column header, the page refreshes. However the sorting
is not done. Am I missing anything?

I populate the data if !postback.

Nov 19 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Hi there,

Do you implement sorting codes in DataGrid_SortCommand
event?

Elton Wang
el********@hotmail.com
-----Original Message-----
I have created a datagrid in my aspx with the 'AllowSorting' property to true.
When clicking on the column header, the page refreshes. However the sortingis not done. Am I missing anything?

I populate the data if !postback.

.

Nov 19 '05 #2

P: n/a
Yes. In fact, I made the sort through the sort event. However when I changed
the column label via the column create event, the columns were become
non-sortable.

"Elton Wang" wrote:
Hi there,

Do you implement sorting codes in DataGrid_SortCommand
event?

Elton Wang
el********@hotmail.com
-----Original Message-----
I have created a datagrid in my aspx with

the 'AllowSorting' property to true.

When clicking on the column header, the page refreshes.

However the sorting
is not done. Am I missing anything?

I populate the data if !postback.

.

Nov 19 '05 #3

P: n/a
What do you mean the columns become non-sortable,
DataGrid_SortCommand can't be fired or other? Could you
give more detailed in?

Elton Wang
el********@hotmail.com

-----Original Message-----
Yes. In fact, I made the sort through the sort event. However when I changedthe column label via the column create event, the columns were becomenon-sortable.

"Elton Wang" wrote:
Hi there,

Do you implement sorting codes in DataGrid_SortCommand
event?

Elton Wang
el********@hotmail.com
>-----Original Message-----
>I have created a datagrid in my aspx with

the 'AllowSorting' property to true.
>
>When clicking on the column header, the page
refreshes. However the sorting
>is not done. Am I missing anything?
>
>I populate the data if !postback.
>
>.
>

.

Nov 19 '05 #4

P: n/a
Yes.

The Data is populated in the ground (databound) on the page_load event.
Sorting is done in the SortCommand event. The custom labels are defined in
the ItemCreated event. In fact there were 5 colums to be displayed. Out of
which, I made 2 columns custom headers. These 2 columns display the text in a
non-underlined fashion so that I cannot click on it for sorting at runtime.

How can make these 2 columns again be sortable?

"Elton Wang" wrote:
What do you mean the columns become non-sortable,
DataGrid_SortCommand can't be fired or other? Could you
give more detailed in?

Elton Wang
el********@hotmail.com

-----Original Message-----
Yes. In fact, I made the sort through the sort event.

However when I changed
the column label via the column create event, the columns

were become
non-sortable.

"Elton Wang" wrote:
Hi there,

Do you implement sorting codes in DataGrid_SortCommand
event?

Elton Wang
el********@hotmail.com

>-----Original Message-----
>I have created a datagrid in my aspx with
the 'AllowSorting' property to true.
>
>When clicking on the column header, the page refreshes. However the sorting
>is not done. Am I missing anything?
>
>I populate the data if !postback.
>
>.
>

.

Nov 19 '05 #5

P: n/a
Do you assign SortExpression for these two columns?

Elton Wang
-----Original Message-----
Yes.

The Data is populated in the ground (databound) on the page_load event.Sorting is done in the SortCommand event. The custom labels are defined inthe ItemCreated event. In fact there were 5 colums to be displayed. Out ofwhich, I made 2 columns custom headers. These 2 columns display the text in anon-underlined fashion so that I cannot click on it for sorting at runtime.
How can make these 2 columns again be sortable?

"Elton Wang" wrote:
What do you mean the columns become non-sortable,
DataGrid_SortCommand can't be fired or other? Could you
give more detailed in?

Elton Wang
el********@hotmail.com

>-----Original Message-----
>Yes. In fact, I made the sort through the sort event.

However when I changed
>the column label via the column create event, the columns
were become
>non-sortable.
>
>"Elton Wang" wrote:
>
>> Hi there,
>>
>> Do you implement sorting codes in

DataGrid_SortCommand >> event?
>>
>> Elton Wang
>> el********@hotmail.com
>>
>> >-----Original Message-----
>> >I have created a datagrid in my aspx with
>> the 'AllowSorting' property to true.
>> >
>> >When clicking on the column header, the page

refreshes.
>> However the sorting
>> >is not done. Am I missing anything?
>> >
>> >I populate the data if !postback.
>> >
>> >.
>> >
>>
>.
>

.

Nov 19 '05 #6

P: n/a
Yes I did. In fact the following are the event code I use.

private void DataGrid_Inspection_SortCommand(object source,
System.Web.UI.WebControls.DataGridSortCommandEvent Args e)
{
DataView dvInspection = new DataView();
dvInspection.Table = (DataTable)Cache["Inspection"];
dvInspection.Sort = e.SortExpression;
DataGrid_Inspection.DataSource = dvInspection;
DataGrid_Inspection.DataBind();
}

private void DataGrid_Inspection_ItemCreated(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Header )
{
e.Item.Cells[0].Text = "Structure";
e.Item.Cells[1].Text = "Area";
}
}
"Elton Wang" wrote:
Do you assign SortExpression for these two columns?

Elton Wang
-----Original Message-----
Yes.

The Data is populated in the ground (databound) on the

page_load event.
Sorting is done in the SortCommand event. The custom

labels are defined in
the ItemCreated event. In fact there were 5 colums to be

displayed. Out of
which, I made 2 columns custom headers. These 2 columns

display the text in a
non-underlined fashion so that I cannot click on it for

sorting at runtime.

How can make these 2 columns again be sortable?

"Elton Wang" wrote:
What do you mean the columns become non-sortable,
DataGrid_SortCommand can't be fired or other? Could you
give more detailed in?

Elton Wang
el********@hotmail.com
>-----Original Message-----
>Yes. In fact, I made the sort through the sort event.
However when I changed
>the column label via the column create event, the columns were become
>non-sortable.
>
>"Elton Wang" wrote:
>
>> Hi there,
>>
>> Do you implement sorting codes in DataGrid_SortCommand >> event?
>>
>> Elton Wang
>> el********@hotmail.com
>>
>> >-----Original Message-----
>> >I have created a datagrid in my aspx with
>> the 'AllowSorting' property to true.
>> >
>> >When clicking on the column header, the page
refreshes.
>> However the sorting
>> >is not done. Am I missing anything?
>> >
>> >I populate the data if !postback.
>> >
>> >.
>> >
>>
>.
>

.

Nov 19 '05 #7

P: n/a
If you really have some special reason to change Column
header, Instead of using
if (e.Item.ItemType == ListItemType.Header )
{
e.Item.Cells[0].Text = "Structure";
e.Item.Cells[1].Text = "Area";
}

to use
DataGrid_Inspection.Columns[0].HeaderText = "Structure";
DataGrid_Inspection.Columns[1].HeaderText = "Area";

Elton Wang
el********@hotmail.com

-----Original Message-----
Yes I did. In fact the following are the event code I use.

private void DataGrid_Inspection_SortCommand(object source,System.Web.UI.WebControls.DataGridSortCommandEven tArgs e)
{
DataView dvInspection = new DataView();
dvInspection.Table = (DataTable)Cache["Inspection"];
dvInspection.Sort = e.SortExpression;
DataGrid_Inspection.DataSource = dvInspection;
DataGrid_Inspection.DataBind();
}

private void DataGrid_Inspection_ItemCreated(object sender,System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Header )
{
e.Item.Cells[0].Text = "Structure";
e.Item.Cells[1].Text = "Area";
}
}
"Elton Wang" wrote:
Do you assign SortExpression for these two columns?

Elton Wang
>-----Original Message-----
>Yes.
>
>The Data is populated in the ground (databound) on the

page_load event.
>Sorting is done in the SortCommand event. The custom

labels are defined in
>the ItemCreated event. In fact there were 5 colums to be
displayed. Out of
>which, I made 2 columns custom headers. These 2
columns display the text in a
>non-underlined fashion so that I cannot click on it
for sorting at runtime.
>
>How can make these 2 columns again be sortable?
>
>
>
>"Elton Wang" wrote:
>
>> What do you mean the columns become non-sortable,
>> DataGrid_SortCommand can't be fired or other? Could

you >> give more detailed in?
>>
>> Elton Wang
>> el********@hotmail.com
>>
>>
>> >-----Original Message-----
>> >Yes. In fact, I made the sort through the sort event. >> However when I changed
>> >the column label via the column create event, the

columns
>> were become
>> >non-sortable.
>> >
>> >"Elton Wang" wrote:
>> >
>> >> Hi there,
>> >>
>> >> Do you implement sorting codes in

DataGrid_SortCommand
>> >> event?
>> >>
>> >> Elton Wang
>> >> el********@hotmail.com
>> >>
>> >> >-----Original Message-----
>> >> >I have created a datagrid in my aspx with
>> >> the 'AllowSorting' property to true.
>> >> >
>> >> >When clicking on the column header, the page
>> refreshes.
>> >> However the sorting
>> >> >is not done. Am I missing anything?
>> >> >
>> >> >I populate the data if !postback.
>> >> >
>> >> >.
>> >> >
>> >>
>> >.
>> >
>>
>.
>

.

Nov 19 '05 #8

P: n/a
Yes, I have a reason for doing so.

At design-time, I cannot create columns because when the data is populated,
that column appears in the page with no data, and the new fields are added to
the right side of it.

However, when I remove the columns at design time, I cannot use:
DataGrid_Inspection.Columns[0].HeaderText = "Structure"
because the compiler says that the index is out or range (because no columns
exist).

In fact, I use:
DataGrid_Inspection.Columns[0].HeaderText = "Structure"
after binding the data. Still it is giving an error saying that the column
is undefined.
"Elton Wang" wrote:
If you really have some special reason to change Column
header, Instead of using
if (e.Item.ItemType == ListItemType.Header )
{
e.Item.Cells[0].Text = "Structure";
e.Item.Cells[1].Text = "Area";
}

to use
DataGrid_Inspection.Columns[0].HeaderText = "Structure";
DataGrid_Inspection.Columns[1].HeaderText = "Area";

Elton Wang
el********@hotmail.com

-----Original Message-----
Yes I did. In fact the following are the event code I use.

private void DataGrid_Inspection_SortCommand(object

source,
System.Web.UI.WebControls.DataGridSortCommandEven tArgs e)
{
DataView dvInspection = new DataView();
dvInspection.Table = (DataTable)Cache["Inspection"];
dvInspection.Sort = e.SortExpression;
DataGrid_Inspection.DataSource = dvInspection;
DataGrid_Inspection.DataBind();
}

private void DataGrid_Inspection_ItemCreated(object

sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Header )
{
e.Item.Cells[0].Text = "Structure";
e.Item.Cells[1].Text = "Area";
}
}
"Elton Wang" wrote:
Do you assign SortExpression for these two columns?

Elton Wang
>-----Original Message-----
>Yes.
>
>The Data is populated in the ground (databound) on the
page_load event.
>Sorting is done in the SortCommand event. The custom
labels are defined in
>the ItemCreated event. In fact there were 5 colums to be displayed. Out of
>which, I made 2 columns custom headers. These 2 columns display the text in a
>non-underlined fashion so that I cannot click on it for sorting at runtime.
>
>How can make these 2 columns again be sortable?
>
>
>
>"Elton Wang" wrote:
>
>> What do you mean the columns become non-sortable,
>> DataGrid_SortCommand can't be fired or other? Could you >> give more detailed in?
>>
>> Elton Wang
>> el********@hotmail.com
>>
>>
>> >-----Original Message-----
>> >Yes. In fact, I made the sort through the sort event. >> However when I changed
>> >the column label via the column create event, the
columns
>> were become
>> >non-sortable.
>> >
>> >"Elton Wang" wrote:
>> >
>> >> Hi there,
>> >>
>> >> Do you implement sorting codes in
DataGrid_SortCommand
>> >> event?
>> >>
>> >> Elton Wang
>> >> el********@hotmail.com
>> >>
>> >> >-----Original Message-----
>> >> >I have created a datagrid in my aspx with
>> >> the 'AllowSorting' property to true.
>> >> >
>> >> >When clicking on the column header, the page
>> refreshes.
>> >> However the sorting
>> >> >is not done. Am I missing anything?
>> >> >
>> >> >I populate the data if !postback.
>> >> >
>> >> >.
>> >> >
>> >>
>> >.
>> >
>>
>.
>

.

Nov 19 '05 #9

P: n/a
It looks like very complicated case.

Since you can't assign column's HeaderText, how do you
assign column's SortExpression? Without SortExpression,
the column is non-sortable.

I was just wondering before data was pulled out, you don't
know its structure, do you? Or it changes from time to
time.
-----Original Message-----
Yes, I have a reason for doing so.

At design-time, I cannot create columns because when the data is populated,that column appears in the page with no data, and the new fields are added tothe right side of it.

However, when I remove the columns at design time, I cannot use:DataGrid_Inspection.Columns[0].HeaderText = "Structure"
because the compiler says that the index is out or range (because no columnsexist).

In fact, I use:
DataGrid_Inspection.Columns[0].HeaderText = "Structure"
after binding the data. Still it is giving an error saying that the columnis undefined.
"Elton Wang" wrote:
If you really have some special reason to change Column
header, Instead of using
if (e.Item.ItemType == ListItemType.Header )
{
e.Item.Cells[0].Text = "Structure";
e.Item.Cells[1].Text = "Area";
}

to use
DataGrid_Inspection.Columns[0].HeaderText = "Structure";
DataGrid_Inspection.Columns[1].HeaderText = "Area";

Elton Wang
el********@hotmail.com

>-----Original Message-----
>Yes I did. In fact the following are the event code I use. >
>private void DataGrid_Inspection_SortCommand(object

source,
>System.Web.UI.WebControls.DataGridSortCommandEven tArgs e) >{
>DataView dvInspection = new DataView();
>dvInspection.Table = (DataTable)Cache["Inspection"];
>dvInspection.Sort = e.SortExpression;
>DataGrid_Inspection.DataSource = dvInspection;
>DataGrid_Inspection.DataBind();
>}
>
>
>
>private void DataGrid_Inspection_ItemCreated(object

sender,
>System.Web.UI.WebControls.DataGridItemEventArgs e)
>{
> if (e.Item.ItemType == ListItemType.Header )
> {
> e.Item.Cells[0].Text = "Structure";
> e.Item.Cells[1].Text = "Area";
> }
>}
>
>
>"Elton Wang" wrote:
>
>> Do you assign SortExpression for these two columns?
>>
>> Elton Wang
>> >-----Original Message-----
>> >Yes.
>> >
>> >The Data is populated in the ground (databound) on the >> page_load event.
>> >Sorting is done in the SortCommand event. The custom >> labels are defined in
>> >the ItemCreated event. In fact there were 5 colums to
be
>> displayed. Out of
>> >which, I made 2 columns custom headers. These 2

columns
>> display the text in a
>> >non-underlined fashion so that I cannot click on it

for
>> sorting at runtime.
>> >
>> >How can make these 2 columns again be sortable?
>> >
>> >
>> >
>> >"Elton Wang" wrote:
>> >
>> >> What do you mean the columns become non-sortable,
>> >> DataGrid_SortCommand can't be fired or other?
Could you
>> >> give more detailed in?
>> >>
>> >> Elton Wang
>> >> el********@hotmail.com
>> >>
>> >>
>> >> >-----Original Message-----
>> >> >Yes. In fact, I made the sort through the sort

event.
>> >> However when I changed
>> >> >the column label via the column create event,

the >> columns
>> >> were become
>> >> >non-sortable.
>> >> >
>> >> >"Elton Wang" wrote:
>> >> >
>> >> >> Hi there,
>> >> >>
>> >> >> Do you implement sorting codes in
>> DataGrid_SortCommand
>> >> >> event?
>> >> >>
>> >> >> Elton Wang
>> >> >> el********@hotmail.com
>> >> >>
>> >> >> >-----Original Message-----
>> >> >> >I have created a datagrid in my aspx with
>> >> >> the 'AllowSorting' property to true.
>> >> >> >
>> >> >> >When clicking on the column header, the page
>> >> refreshes.
>> >> >> However the sorting
>> >> >> >is not done. Am I missing anything?
>> >> >> >
>> >> >> >I populate the data if !postback.
>> >> >> >
>> >> >> >.
>> >> >> >
>> >> >>
>> >> >.
>> >> >
>> >>
>> >.
>> >
>>
>.
>

.

Nov 19 '05 #10

P: n/a
I cannot hardcode the statements.

My sql string will be different; my columns will be different.

All what I'm looking is that I want some data displayed from a table with
custom headers and being able to sort on all of those columns.

"Elton Wang" wrote:
It looks like very complicated case.

Since you can't assign column's HeaderText, how do you
assign column's SortExpression? Without SortExpression,
the column is non-sortable.

I was just wondering before data was pulled out, you don't
know its structure, do you? Or it changes from time to
time.
-----Original Message-----
Yes, I have a reason for doing so.

At design-time, I cannot create columns because when the

data is populated,
that column appears in the page with no data, and the new

fields are added to
the right side of it.

However, when I remove the columns at design time, I

cannot use:
DataGrid_Inspection.Columns[0].HeaderText = "Structure"
because the compiler says that the index is out or range

(because no columns
exist).

In fact, I use:
DataGrid_Inspection.Columns[0].HeaderText = "Structure"
after binding the data. Still it is giving an error

saying that the column
is undefined.
"Elton Wang" wrote:
If you really have some special reason to change Column
header, Instead of using
if (e.Item.ItemType == ListItemType.Header )
{
e.Item.Cells[0].Text = "Structure";
e.Item.Cells[1].Text = "Area";
}

to use
DataGrid_Inspection.Columns[0].HeaderText = "Structure";
DataGrid_Inspection.Columns[1].HeaderText = "Area";

Elton Wang
el********@hotmail.com
>-----Original Message-----
>Yes I did. In fact the following are the event code I use. >
>private void DataGrid_Inspection_SortCommand(object
source,
>System.Web.UI.WebControls.DataGridSortCommandEven tArgs e) >{
>DataView dvInspection = new DataView();
>dvInspection.Table = (DataTable)Cache["Inspection"];
>dvInspection.Sort = e.SortExpression;
>DataGrid_Inspection.DataSource = dvInspection;
>DataGrid_Inspection.DataBind();
>}
>
>
>
>private void DataGrid_Inspection_ItemCreated(object
sender,
>System.Web.UI.WebControls.DataGridItemEventArgs e)
>{
> if (e.Item.ItemType == ListItemType.Header )
> {
> e.Item.Cells[0].Text = "Structure";
> e.Item.Cells[1].Text = "Area";
> }
>}
>
>
>"Elton Wang" wrote:
>
>> Do you assign SortExpression for these two columns?
>>
>> Elton Wang
>> >-----Original Message-----
>> >Yes.
>> >
>> >The Data is populated in the ground (databound) on the >> page_load event.
>> >Sorting is done in the SortCommand event. The custom >> labels are defined in
>> >the ItemCreated event. In fact there were 5 colums to be
>> displayed. Out of
>> >which, I made 2 columns custom headers. These 2
columns
>> display the text in a
>> >non-underlined fashion so that I cannot click on it
for
>> sorting at runtime.
>> >
>> >How can make these 2 columns again be sortable?
>> >
>> >
>> >
>> >"Elton Wang" wrote:
>> >
>> >> What do you mean the columns become non-sortable,
>> >> DataGrid_SortCommand can't be fired or other? Could you
>> >> give more detailed in?
>> >>
>> >> Elton Wang
>> >> el********@hotmail.com
>> >>
>> >>
>> >> >-----Original Message-----
>> >> >Yes. In fact, I made the sort through the sort
event.
>> >> However when I changed
>> >> >the column label via the column create event, the >> columns
>> >> were become
>> >> >non-sortable.
>> >> >
>> >> >"Elton Wang" wrote:
>> >> >
>> >> >> Hi there,
>> >> >>
>> >> >> Do you implement sorting codes in
>> DataGrid_SortCommand
>> >> >> event?
>> >> >>
>> >> >> Elton Wang
>> >> >> el********@hotmail.com
>> >> >>
>> >> >> >-----Original Message-----
>> >> >> >I have created a datagrid in my aspx with
>> >> >> the 'AllowSorting' property to true.
>> >> >> >
>> >> >> >When clicking on the column header, the page
>> >> refreshes.
>> >> >> However the sorting
>> >> >> >is not done. Am I missing anything?
>> >> >> >
>> >> >> >I populate the data if !postback.
>> >> >> >
>> >> >> >.
>> >> >> >
>> >> >>
>> >> >.
>> >> >
>> >>
>> >.
>> >
>>
>.
>

.

Nov 19 '05 #11

P: n/a

As I think there might be some way to do it.

You may try that after pulling data but before binding
data source to datagrid.

For example, you got data in a datatable, tbl.

BoundColumn boundCol;
foreach (DataColumn col in tbl.Columns){
boundCol = new BoundColumn();
boundCol.HeaderText = col.ColumnName
boundCol.SortExpression = col.ColumnName
DataGrid_Inspection.Columns.Add(boundCol);
}

Then you can bind data.

Hope it helps,

Elton Wang
el********@hotmail.com
-----Original Message-----
I cannot hardcode the statements.

My sql string will be different; my columns will be different.
All what I'm looking is that I want some data displayed from a table withcustom headers and being able to sort on all of those columns.
"Elton Wang" wrote:
It looks like very complicated case.

Since you can't assign column's HeaderText, how do you
assign column's SortExpression? Without SortExpression,
the column is non-sortable.

I was just wondering before data was pulled out, you don't know its structure, do you? Or it changes from time to
time.
>-----Original Message-----
>Yes, I have a reason for doing so.
>
>At design-time, I cannot create columns because when the
data is populated,
>that column appears in the page with no data, and the
new fields are added to
>the right side of it.
>
>However, when I remove the columns at design time, I

cannot use:
>DataGrid_Inspection.Columns[0].HeaderText = "Structure"
>because the compiler says that the index is out or
range (because no columns
>exist).
>
>In fact, I use:
>DataGrid_Inspection.Columns[0].HeaderText = "Structure"
>after binding the data. Still it is giving an error

saying that the column
>is undefined.
>
>
>"Elton Wang" wrote:
>
>> If you really have some special reason to change
Column >> header, Instead of using
>> if (e.Item.ItemType == ListItemType.Header )
>> {
>> e.Item.Cells[0].Text = "Structure";
>> e.Item.Cells[1].Text = "Area";
>> }
>>
>> to use
>> DataGrid_Inspection.Columns[0].HeaderText = "Structure"; >> DataGrid_Inspection.Columns[1].HeaderText = "Area";
>>
>> Elton Wang
>> el********@hotmail.com
>>
>>
>> >-----Original Message-----
>> >Yes I did. In fact the following are the event code I use.
>> >
>> >private void DataGrid_Inspection_SortCommand(object
>> source,
>>System.Web.UI.WebControls.DataGridSortCommandEven tArgs
e)
>> >{
>> >DataView dvInspection = new DataView();
>> >dvInspection.Table = (DataTable)Cache["Inspection"];
>> >dvInspection.Sort = e.SortExpression;
>> >DataGrid_Inspection.DataSource = dvInspection;
>> >DataGrid_Inspection.DataBind();
>> >}
>> >
>> >
>> >
>> >private void DataGrid_Inspection_ItemCreated(object
>> sender,
>> >System.Web.UI.WebControls.DataGridItemEventArgs e)
>> >{
>> > if (e.Item.ItemType == ListItemType.Header )
>> > {
>> > e.Item.Cells[0].Text = "Structure";
>> > e.Item.Cells[1].Text = "Area";
>> > }
>> >}
>> >
>> >
>> >"Elton Wang" wrote:
>> >
>> >> Do you assign SortExpression for these two

columns? >> >>
>> >> Elton Wang
>> >> >-----Original Message-----
>> >> >Yes.
>> >> >
>> >> >The Data is populated in the ground (databound) on the
>> >> page_load event.
>> >> >Sorting is done in the SortCommand event. The

custom
>> >> labels are defined in
>> >> >the ItemCreated event. In fact there were 5
colums to
>> be
>> >> displayed. Out of
>> >> >which, I made 2 columns custom headers. These 2
>> columns
>> >> display the text in a
>> >> >non-underlined fashion so that I cannot click on

it >> for
>> >> sorting at runtime.
>> >> >
>> >> >How can make these 2 columns again be sortable?
>> >> >
>> >> >
>> >> >
>> >> >"Elton Wang" wrote:
>> >> >
>> >> >> What do you mean the columns become non- sortable, >> >> >> DataGrid_SortCommand can't be fired or other?

Could
>> you
>> >> >> give more detailed in?
>> >> >>
>> >> >> Elton Wang
>> >> >> el********@hotmail.com
>> >> >>
>> >> >>
>> >> >> >-----Original Message-----
>> >> >> >Yes. In fact, I made the sort through the sort >> event.
>> >> >> However when I changed
>> >> >> >the column label via the column create event,

the
>> >> columns
>> >> >> were become
>> >> >> >non-sortable.
>> >> >> >
>> >> >> >"Elton Wang" wrote:
>> >> >> >
>> >> >> >> Hi there,
>> >> >> >>
>> >> >> >> Do you implement sorting codes in
>> >> DataGrid_SortCommand
>> >> >> >> event?
>> >> >> >>
>> >> >> >> Elton Wang
>> >> >> >> el********@hotmail.com
>> >> >> >>
>> >> >> >> >-----Original Message-----
>> >> >> >> >I have created a datagrid in my aspx with
>> >> >> >> the 'AllowSorting' property to true.
>> >> >> >> >
>> >> >> >> >When clicking on the column header, the page >> >> >> refreshes.
>> >> >> >> However the sorting
>> >> >> >> >is not done. Am I missing anything?
>> >> >> >> >
>> >> >> >> >I populate the data if !postback.
>> >> >> >> >
>> >> >> >> >.
>> >> >> >> >
>> >> >> >>
>> >> >> >.
>> >> >> >
>> >> >>
>> >> >.
>> >> >
>> >>
>> >.
>> >
>>
>.
>

.

Nov 19 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.