Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
865
WARP Panel with UltraWebGrid and ASP.Net Validator
posted

Here’s the scenario:

 

I’m using Infragistics NetAdvantage 2006 Vol 3 and Visual Studio 2003.   I have a page with the following elements:

 

-         WARP panel

-         Inside the WARP panel, a hierarchical UltraWebGrid, with two bands.  The first band represents a category number (eg: 1, 2, 3, etc).

-         In the second band, one of the columns is a DropDownList type.  The selected value represents the category number.

 

 

When the user changes the category for any given file, the ValueListSelChangeHandler associated with the DropDownList is called.  In this handler, some code is executed to handle the category change – for brevity’s sake, I will exclude the code – and then performs a postback using the igtbl_doPostBack method.  After the igtbl_doPostBack is triggered, the application updates the datasource to handle the category change and then re-binds the grid.  So, for example, if I have a grid that looks like this:

 

Category 1

File #1_1          1

            File #2_1          1

 

Category 2

            File #1_2          2

            File #2_2          2

            File #3_2          2

 

And I want to move File #1_1 from Category 1 to Category 2.  Then, this is how it will look:

 

Category 1

            File #2_1          1

 

Category 2

File #1_1          1

            File #1_2          2

            File #2_2          2

            File #3_2          2

 

Here’s the problem.  I can get it work beautifully IF there’s no ASP.Net Validator (RequiredField, Custom, Range, doesn’t matter) on the page.  Once I put a Validator control on the page, nothing happens when I change the category the first time.  However, if I try changing the category again afterwards, it works, as well as any subsequent attempts to change categories for other files.

 

So, it looks as if the ASP.Net Validator interferes with the WARP panel on the first attempt to change a category.

 

This problem does not occur if I take out the WARP panel.  I suppose I could do this without the WARP panel.  However, I would really like to use the WARP panel to avoid the screen flashes one gets when doing normal postbacks.

 

My questions are as follows:

-         Has anyone encountered this before?

-         If so, is this a bug, and is there a workaround?

 

 

           

 

 

  • 865
    posted

    OK, I think I have a solution for this.  Not sure if this is the best one, but here goes:

    Replace the following line:

    igtbl_doPostBack(gridName);

    with this:

    window.__doPostBack('<% grid.UniqueId %>', '');

    Believe it or not, this works!