listview Sorting in ajax update panel not working in firefox

sunkrajesh

Newcomer
Joined
Dec 7, 2008
Messages
1
I have used a list view in Ajax Update panel. And iam using this listview in a user control. and this user control is placed in a Master Page.I have implemented sorting for list view . For the intial page load, complete data appearsin both IE and Firefox. I have three links for Sorting, based on which data changes. This works fine in Internet explorer, but in Firefox, sorting is not working.

When i debug, I saw that for initial page load data is getting loaded in both IE and firefox.But, when sorting link or any other link is clicked, this method is not fired in firefox.I used the condition Ispostback. In case of Internet Explorer, when it is not Ispostback, the debug point is going to the footer control page load of master page and comming back to the sort method and sorting is implemented. But in case of Firefox, the debug point is going to the footer control page load in master page, but it is not comming back.So the method is not firing.can any tell why this is not working in firefox.

The code for the above scenario:



if (!IsPostBack)

{

LoadAllData();

}

protected void lvWorkItems_Sorting(object sender, ListViewSortEventArgs e)

{

string sortExpression = e.SortExpression + " " + "ASC";

if (ViewState["datatab"] != null)

{

DataTable dtProductsqq = (DataTable)ViewState["datatab"];

DataView sortdataview = new DataView(dtProductsqq);

sortdataview.Sort = sortExpression;

lvWorkItems.DataSource = sortdataview;

lvWorkItems.DataBind();

}

}
 
If it works in IE and not in Firefox you can be almost certain it's a JavaScript problem and not a problem in the server side code.

If you have written your own Javascript that's most likely where the problem is. If you haven't written any JavaScript it could be a bug in the the update panel and I think you best bet is asking in www.asp.net forums.
 
Back
Top