User Profile & Activity

A Yousif Member
Page
of 29

I have forwarded this issue to WebCombo development team. A work item, #702, has been submitted regarding this minor glitch. ...

Yudi,

Will you update threads when an item has been fixed and is released in a build/patch?  Basically, how will I know when this (or any other) fix has been implemented?  Thank you.

Is there a workaround I can apply in the server-side code in the OnExport?  I have access to all the data in the data set.  What about the export itself, i.e., is there an API I can call and pass the data set to get the data in the format requested or something similar?  Thank you.

How do I export the visible rows?  My grid initially displays 3 parent rows.  I then expand several rows, but when I export, it only exports the 3 initial rows?  How do you recommend I get the export to include all the visible/expanded rows?

I do have the OnExport overriden already to help export the extra loaded rows from our normal grids, but am not sure how to customize it for a self-referencing grid.

Hello Handy,

Okay, that's what I was looking for.  I'll give that a try.  Thank you.

I just found why this is the way it is.  It looks like that even though the TotalLoadedRows is 3, in this example, there are more rows loaded as the children.  The 3 parent VISIBLE rows are not necessarily at positions 0, 1 and 2 respectively due to the children being at their respective positions.

Short of writing my own custom property to contain the total number of rows in the data set, how would I determine the ACTUAL number of rows loaded on the client side?  Even though I may only see 3 initially, there may be hundreds loaded as children.  So how do I get that number?

I need to know so I can loop through the correct number of items and get the items I need per the code above.  Thank you.

[EDIT] I found one more issue.  When we do expand a parent row, let's say it has 4 child rows, the TotalLoadedRows stays at 3 as it does not get updated to 7 which would be the correct number of loaded rows now.

I wanted to share the workaround I found for this and the cause of the problem.

When the Show() command is called, unfortunately, it doesn't correctly set the cmd object's OffsetElement which is crucial to WHERE the menu is placed when pulled down.  This was null and I had to force it to be set via the code below.

oMenuBar.SelectMenu(cmd.Menu);
cmd.Menu.OffsetElement = cmd._HtmlObj;
cmd.Menu.Show();

It would be ideal to have the Show() command do this to ensure the sub menu is correctly positioned.  I hope you'll provide a fix for this soon.   Thanks.

Thank you, but I would not consider this a "minor" glitch as it creates a big headache for the workaround we had to create.

Posted: May 14, 2010 3:12 PM

Hi Andi,

Okay, I'll try your method but it will be a few days before I get back to it.  In the meanwhile, here's how we get rid of the text.

ISNet.WebUI.WebGrid.WebGridTextItem oTextItem =
      new ISNet.WebUI.WebGrid.WebGridTextItem("CommonText/NoData"," ");
if (!this.LayoutSettings.TextSettings.TextItems.Contains(oTextItem))
{
      this.LayoutSettings.TextSettings.TextItems.Add(oTextItem);
}

Note that we do have to use a space because using "" does not work.  I'm confident your javascript solution should work as long as the nodes are consistenly in the same place on every grid.

Posted: May 14, 2010 8:16 AM

Hello Handy,

Well, we can't remove this from our grid configuration as it will remove the vertical lines from the grid.  See attached.

Can you guys add a skin and style setting specific to the message container so it can be formatted separately please?  This is an issue since it shares the style and does not "blank" it out when there's no data in the grid.

Unless you have a suggestion as to how we can achieve our vertical lines another way?  We use a different shade in the headers and in the grid rows which is why we have it set up this way.

Posted: May 13, 2010 12:54 PM

Andi,

I tried updating our skin file but it had no impact.  Here's our skin settings for the grid.  The changes I made are in blue and bolded.

    <LayoutSettings
            AllowAddNew="No" 
            AllowColumnFreezing="No" 
            AllowColumnMove="Yes" 
            AllowColumnSizing="Yes" 
            AllowContextMenu="true" 
            AllowDelete="No" 
            StatusBarVisible="true"
            AllowEdit="No" 
            AllowSelectColumns="Yes" 
            AllowSorting="No" 
            AllowExport="Yes" 
            PagingSize="10" 
            PagingMode="VirtualLoad" 
            VirtualLoadMode="LargeData" 
            VirtualPageSize="100" 
            Hierarchical="false" 
            AutoFitColumns="false" 
            GridLines="Vertical" 
            PersistRowChecker="true"
            RowHeaders="No" 
            AutoHeight="false" 
            AutoWidth="false" 
            RowHeightDefault="-1px" 
            AlternatingColors="true"
            UseRelativePositioning="true"
            GridLineColor="#d0d0d0" 
            AlwaysShowHelpButton="false" 
            ColumnFooterAggregateMode="CalculateAllData" 
            DisplayDetailsOnUnhandledError="false"
            >

        <TextSettings Language="UseCulture" 
            LocalizationFolder="~/CommonLibrary/WebGrid/V7_0_7200/Localization/" 
            UseWebResources="False">
        </TextSettings>

         <CheckedRowStyle CssClass="GridSelectedRow"></CheckedRowStyle>

        <FrameStyle BackColor="White" BorderColor="DarkGray" BorderStyle="none" 
            BorderWidth="0px" Overflow="Hidden" OverflowX="Hidden" OverflowY="Hidden">
        </FrameStyle>

        <GroupByBox>
            <Style CssClass="GridGroupByBox"></Style>
            <LabelStyle CssClass="GridGroupByBoxLabel"/>
        </GroupByBox>

        <GroupRowInfoStyle BackColor="#F1EFE2" BorderColor="White" BorderStyle="Solid" 
            BorderWidth="0px" 
            CustomRules="border-bottom-color: Silver; border-right-color: Silver" 
            Font-Names="Verdana" Font-Size="8pt" font-bold="True" forecolor="#676896">
            <BorderSettings>
                <Bottom Color="144, 145, 182"  Width="2px" />
                <Right Color="Silver" />
            </BorderSettings>
        </GroupRowInfoStyle>

        <AlternatingRowStyle CssClass="GridAlternatingRow" BorderStyle="Solid" BorderWidth="0px">
            <BorderSettings>
                <Right Color="#d0d0d0" Width="1px" />
            </BorderSettings>
        </AlternatingRowStyle>

        <FocusCellStyle BorderColor="DimGray" BorderStyle="Solid" BorderWidth="1px" />

        <RowStyle CssClass="GridRow" BorderStyle="Solid" BorderWidth="0px">
            <BorderSettings>
                <Right Color="#d0d0d0" Width="1px" />
            </BorderSettings>
        </RowStyle>

        <SelectedRowStyle CssClass="GridSelectedRow"/>

        <HeaderStyle CssClass="GridHeader" BorderStyle="Solid" BorderWidth="0px">
            <Padding Bottom="4px" Left="2px" Right="2px" Top="4px" />
            <BorderSettings>
                <Bottom Color="#f0f0f0" Width="0px" />
                <Right Color="#c0c0c0" Width="1px" />
            </BorderSettings>
        </HeaderStyle>
        
        <FooterStyle CssClass="GridFooter" />
        
        <StatusBarStyle CssClass="GridStatusBar">
        </StatusBarStyle>
        
    </LayoutSettings>
All times are GMT -5. The time now is 11:44 AM.
Previous Next