First off I am sorry for writing this post as I know that has been asked before but I can not find the post about this issue.
I have an Ultra web grid and it has 2 bands. The grid itself works great but at the bottom of the grid it show my data source. Please see the attached document for a screen shot. Outlined in red is what I would like to hide. I know it is possible, but I can not seem to figure it out.
Can anyone tell me the property name to set to hide this portion of the grid to the end users?
Any help would be greatly appreciated.
Sorry for the poor quality of the picture.
Thanks,
Pat
This is the "Add New box," which you can hide altogether by setting the grid's DisplayLayout.AddNewBox.Hidden property to true.
After I set the AddNewBox.Hidden property to True, it did remove the box from the screen, but it also seemed to disable the igtbl_addNew() function in javascript. When I clicked on a button that calls this function is comes back with a script error "Object expected".
So is there anyway to get both results. To hide the AddNewBox but keep the ability to have the igtbl_addNew() function still enabled?
Hiding the add new box isn't supposed to have any impact on the ability to add new rows programmatically in this fashion. Make sure that your grid's DisplayLayout.AllowAddNewDefault property is set to Yes and that the AllowAddNew property of the band is set to NotSet, or that the AllowAddNew property of your individual band is set to Yes (regardless of the value of DisplayLayout.AllowAddNewDefault).
I should of started this post saying that we are currently on a very old version of infragistics. Our UltraWebGrids are on version 2.0. The grids have been working great until we decided for update our user interface and that is where we are now seeing this issue. I am hoping to upgrade our infragistics version later this year, but for now it is not in the scope of this project.
Below is the html that I am using to create the ultrawebgrid.
<IGTBL:ULTRAWEBGRID id="uwgCreditCard" runat="server" height="305px" width="648px" tabindex="1"> <Bands> <igtbl:UltraGridBand></igtbl:UltraGridBand> </Bands> <DisplayLayout AllowDeleteDefault="Yes" ColWidthDefault="100%" AllowAddNewDefault="Yes" RowHeightDefault="20px" Version="2.00" ViewType="Hierarchical" SelectTypeRowDefault="Single" NullTextDefault="--" BorderCollapseDefault="Separate" AllowColSizingDefault="Free" RowSelectorsDefault="No" Name="uwgCreditCard" CellClickActionDefault="RowSelect" AllowUpdateDefault="Yes"> <AddNewBox Hidden="False"> <Style BorderWidth="1px" BorderStyle="Solid" BackColor="LightGray"> <BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White"></BorderDetails> </Style> </AddNewBox> <Pager> <Style BorderWidth="1px" BorderStyle="Solid" BackColor="LightGray"> <BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White"></BorderDetails> </Style> </Pager> <HeaderStyleDefault CssClass="gridHeaderDefault"> <BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White"></BorderDetails> </HeaderStyleDefault> <GroupByRowStyleDefault CssClass="gridGroupByRowDefault"></GroupByRowStyleDefault> <RowSelectorStyleDefault CssClass="gridRowSelectorsDefault"></RowSelectorStyleDefault> <FrameStyle Width="812px" Height="324px" CssClass="gridFrameDefault"></FrameStyle> <FooterStyleDefault CssClass="gridFooterDefault"></FooterStyleDefault> <ClientSideEvents AfterCellUpdateHandler="SetDirtyFlag" DblClickHandler="DblClick" AfterRowDeletedHandler="AfterDelete" BeforeRowDeletedHandler="BeforeDelete" AfterExitEditModeHandler="SetDirtyFlag"></ClientSideEvents> <RowExpAreaStyleDefault CssClass="gridRowExpAreaDefault"></RowExpAreaStyleDefault> <SelectedHeaderStyleDefault CssClass="gridSelectedHeaderDefault"></SelectedHeaderStyleDefault> <EditCellStyleDefault CssClass="gridEditCellDefault"></EditCellStyleDefault> <SelectedGroupByRowStyleDefault CssClass="gridSelectedGroupByRowDefault"></SelectedGroupByRowStyleDefault> <SelectedRowStyleDefault CssClass="gridSelectedRowDefault"></SelectedRowStyleDefault> <RowAlternateStyleDefault CssClass="gridRowAlternateDefault"></RowAlternateStyleDefault> <RowStyleDefault CssClass="gridRowDefault"> <BorderDetails WidthLeft="0px" WidthTop="0px"></BorderDetails> </RowStyleDefault> </DisplayLayout></IGTBL:ULTRAWEBGRID>
Like you suggested in your earlier post you suggest to set the "AddNewBox Hidden" attribute to true. When I did this it did hide the AddNewBox on the screen but seem to disable my javascript. Please see below of a sample of the javascript that what would get called:
{
The igtbl_addNew() function always returns as null and I get a javascript error that says "Object Expected".
Then in one of your later posts you suggest to make sure the display layout allowaddnewdefault to "yes" . As you will see that is the case. Next you also suggest setting the the "AllowAddNew" property to notset. I could not find this property. Maybe I am missing it. Or you suggest setting the allowaddnew property at the band level. I am not sure how you would do this.
Any help that anyone can provide would be greatly appricated.
Thank You,
UltraWebGrid 2.0 is a very old version of the control. It's part of a retired version of the toolset, meaning that it is no longer supported by Infragistics.
This behvaior does not occur in more recent releases of WebGrid - even with the AddNewBox hidden, I can add rows to WebGrid through the igtbl_addNew() method in JavaScript. I cannot identify exactly when this change was made. With this in mind, I see two possible reasons for the difference in behavior: