User Profile & Activity

A Yousif Member
Page
of 29
Posted: September 30, 2010 2:59 PM

Hi Glenn,

The new build did fix the error when resizing the browser, however, now another crash occurs when posting the page.  It's another WebMenuBar client-side crash on this line:

var vcf51 =v9d256.XmlDt.documentElement;

The XmlDt object is null which is why it crashes. It also keeps the page from continuing with the post.

Posted: September 30, 2010 10:04 AM

When you allow add new row in WebGrid, it will show a new row at the top that says "click here to add a new row".
As I can see in your images, there is a checkbox. So you would like to remove that checkbox and add your own custom checkbox?

If yes, as I suggest before, you would need to get the new row object.
Once you obtained the cell element of checkbox, you can hide or remove the checkbox itself. Then add your own custom checkbox.

The answer to your first question is yes.  We want the top input row's check box to match our embedded check box that's shown in the actual data rows.  So this GetNewRow() will give me the "Add new row" row then.  I'll give it a try.

However, I don't understand why do you need this way. If you already embedded your custom checkbox into WebGrid, when you allow add a new row, the checkbox also automatically inserted in your new row.  

I don't understand what you're saying here.  Are you saying the WebGrid should automatically be using our custom check box?  That would be nice, but as you can see it's not.  So we'd like to replace that default one with ours to match our UI elements for consistency.

[EDIT] I tried to use this method you mention but it doesn't even exist under the RootTable object, i.e., I get the following standard error

'ISNet.WebUI.WebGrid.WebGridTable' does not contain a definition for 'GetNewRow' and no extension method 'GetNewRow' accepting a first argument of type 'ISNet.WebUI.WebGrid.WebGridTable' could be found (are you missing a using directive or an assembly reference?)

Where does the input row get initialized?  I put a breakpoint at OnInitializeRow but it never hit.  This event is for content rows only it seems.  I also tried OnInitializeCell but also does not break there.

Posted: September 30, 2010 8:39 AM

Thanks Glenn.  I'll try the build you provided and let you know the results.

The code is available in the first post for both the grid and menu hide/show functions.  As I mentioned earlier, all our client-side functions are queued up and then executed after the page loads.  On post backs, the queue of client-side functions is run in the AJAX pageLoaded method which is our override as I mentioned before.

But let me try the new build and go from there.  I'll post back with my results.

Posted: September 28, 2010 10:35 AM

Hi Glenn.  Well I tried your sample and it blows up too.  See attached video.  I commented out the "alert" command only.

Also, in the sample, you've basically nullified the UpdatePanel objects which we can't do in our application.  We must use UPs to update specific other sections of the page and we use a mix of controls with WebCombo, WebMenuBar and WebGrid from InterSoft.  Our grid/menus work in pairs so they go together.

Do you know if this error is "benign," i.e., won't impact the usability of the menu/grid controls?  I'll have to test it to see too.

How soon will a fix/patch be available for the WebMenuBar?

Posted: September 27, 2010 10:04 AM

Okay, thanks Yudi.  Would you please create a shared location internally for stuff like this so you can help each other out and we don't have to wait.

Also, it would be helpful if you guys can verify the attachments by downloading and unzipping it after you've attached it to ensure it's fine.  Thanks much.

Posted: September 27, 2010 8:41 AM

I'm not referring to the new row itself.  I'm talking about the row where you add the data, i.e., the input row.  Where it typically says "click here to add a new row..." as we'd like to add our custom check box.

Did you look at the image?  You can see our check box in the added rows but the standard one in the input row at the top.

Posted: September 23, 2010 8:00 AM

Thanks Glenn.  I'll give this a try.  Yes, most of our grids are accompanied by our custom menu bar which is derived from WebMenuBar.  We have the pair that interact with each other.  I the menu crash can be fixed very soon.  I'll post back when I've had a chance to look this over and try to implement your workaround in our code.

[EDIT] Glenn, the attached file is corrupted and cannot be unzipped.  I tried to unzip it with both WinRAR and WinZip.  Can you please reattach?  After you reattach, would you ensure the file is fine, by downloading it yourself and making sure you can unzip it?  Thanks.

[EDIT2] Glenn, in regards to the Ajax article you reference, we already use this methodology.  All our client-side script calls are registered and executed after the load has loaded.  We execute all our registered calls in our custom page request manager in the page load override, i.e., the PageRequestManager's instance add_pageLoaded.

Posted: September 21, 2010 2:49 PM

Hello Glenn,

We've finally at a point where I can update and check this out.  Unfortunately, even though the hide/show doesn not produce an error, we have run into other problems that need to be fixed right away please.

I've used the existing sample that's attached to reproduce the errors/problems identified below.  Please note that the sample uses the WebFlyPostBackManager but we cannot use this in our project but we're experiencing the same issues with UpdatePanels.

Use the steps the below and you should be able to see the problem.

Using the Show/Hide BUTTONS:
- click Show - shows the grid
- click Hide - hides the grid
- click Show - now resize and/or maximize the browser
- click Hide - now resize and/or maximize the browser

Now using the Show/Hide CHECK BOX:
- click Show/Hide - grid does not show
- click Show/Hide to uncheck, then check it again - no grid
- now try to resize and/or maximize the browser - you should get the javascript error at "var v4de16 =v1d291.parentNode.offsetWidth;" or similar

Reload the page fresh.
- click Show/Hide to check the check box - no grid

Once the check box is used, you run into several issues:
- the grid does not show
- the grid does now show if you use the buttons at this point
- any resizing of the browser crashes with the javascript error
Posted: September 16, 2010 8:58 AM

Hi Niven,

Thank you for following up.  It's not a minor issue for us, however, I do have a temporary workaround.  The workaround above did not work all the time.  For whatever reason, when we have another grid on the same page that show/hide, it restores the ROW's style to that message row.  So a grid with no data would come up fine with the workaround above, however, once we show the other grid, the line comes back on both grids which makes no sense.

Even debugging the page in F12 in IE, shows the borders are all set to 0px yet it still uses the ROW style.  Anyway, it occurred to me that maybe using a class may work and it does.  So for now, we use a class and assign it in JavaScript after the page/grids load.

We define our normal row, and now the one with no borders, classes like this:

.GridRow, .GridRowNoBorders
{
	background-color: White;
	font-family: Calibri;
	font-size: 9pt;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
	vertical-align: top;
}

.GridRowNoBorders
{
	border: solid 0px #000000;
}
And then on the client side, we assign once we find the NoData object, i.e.,
    var oNoDataContainer = document.getElementById(gridId + "_ND");
    if (jsg_PrismUtility.IsVo(oNoDataContainer))
    {
        if (oGrid.TotalLoadedRows == "0")
        {
            oNoDataContainer.className = arGridInfo[gridId].NoDataCssClassName;
        }
    }
Posted: September 15, 2010 8:34 AM

Has this problem been fixed in 2010 R1?  I just installed it yesterday and it doesn't look like it's been fixed.  I really hope you can get this fixed and add new styles specific to this message rather than apply styles from other rows that don't really apply.  Thanks.

All times are GMT -5. The time now is 10:42 PM.
Previous Next