Question

I have problem with perfomance in my website.

I am using NHibernate to retrieve my database tables and AspxGridView as component from DevExpress. After debug I found problem connecting with dual calling Page_Load event.

What can I do?? May be devexpress gridview after initialize make ajax request to server and page life cycle run again?

sample:

protected Page_Load(Object sender, EventArgs e)
{
   if (!IsPostBack)
   {
     grid.DataSource = GetValuesFromHibernate();
     grid.DataBind();
   }
}

Call Page_Load: 2

Thank you.

Was it helpful?

Solution

The AJAX feature of ASP.NET creates an ordinary page life cycle call. So the code you posted will not work with the AspXGridView Control of DevExpress.

The solution is to build/query the Data only once and populate the Grid with it every time the page is called.

Here is a code sample which uses the Session to do so:

http://community.devexpress.com/forums/p/68052/231725.aspx#231725

OTHER TIPS

DevExpress has a very good support center. Ask your questions. After their answer publish it here. I'm using DevEx too :-)

I didn't any solutions, but when I try to write again project code. It's work great.

Thanks guys.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top