H
Haile
I have a DataGrid with AllowSorting set to true and
several sort expressions defined for bound columns. In
the event handler a Response.Write() command reports that
the event has fired twice on every single click to the
sort link.
ASPX Code:
<asp:datagrid id="dg1" onsortcommand="dg1SortCommand" ...
<asp:boundcolumn ... sortexpression="lastName ASC" ...
CodeBehind (cs):
protected void dg1SortCommand( .. source, .. e )
{
// update DataView
// dg1.DataBind()
Response.Write("clicked sort column:"+(String)
e.SortExpression;
}
When this is run, one click causes the event handler to
write the "clicked..." message twice. What is causing it
to fire the second time?
I would appreciate any assistance.
Best,
Haile
several sort expressions defined for bound columns. In
the event handler a Response.Write() command reports that
the event has fired twice on every single click to the
sort link.
ASPX Code:
<asp:datagrid id="dg1" onsortcommand="dg1SortCommand" ...
<asp:boundcolumn ... sortexpression="lastName ASC" ...
CodeBehind (cs):
protected void dg1SortCommand( .. source, .. e )
{
// update DataView
// dg1.DataBind()
Response.Write("clicked sort column:"+(String)
e.SortExpression;
}
When this is run, one click causes the event handler to
write the "clicked..." message twice. What is causing it
to fire the second time?
I would appreciate any assistance.
Best,
Haile