User Profile & Activity

John Bonin Member
Page
of 18
Posted: October 25, 2012 6:53 AM

Yudi,

  that hides the textbox.  Thanks

 

 

Posted: October 24, 2012 7:24 AM

Is there a element called webgrid1_Moz assocated with the webGrid?  I have no elements with that name on my pages.  Is there code within webGrid:

<input onkeydown="WGUI.TBKDMZ()" onkeypress="WGUI.TBKPMZ()" id="ctl00_MainContent_WebGrid1_Moz" style="position: absolute; top: -500px; left: -500px;" type="text">

 

Also you need to use XHTML doc type

 

I'll try to see if I can modify a sample to show it, but as you can cleary see in my image it does appear.

 

 

Posted: October 23, 2012 6:44 AM

Yudi,

 

   I have used the <br /> in the column headers but then when you use the Select Columns function to show/hide columns the names in the context menu shows the actual <br /> tag as part of the name.

I will look at your sample as soon as I can, but I have 2 major releases this month and can not spend much time with this function.  At this point is to buggy to include!

 

thanks

Posted: October 18, 2012 7:00 AM

Here are screenshots that show the problem with the headers styles depending upon the location.

1. Grid1.png - this screenshot shows the grid header when the <headerStyle.. is located in the <RootTable definition as in...

<RootTable TableHeaderVisible="False" DataKeyField="CHALLENGE_ID" PreviewRowVisible="True">
                                <PreviewRowSettings DataMember="DESCRIPTION" DefaultExpanded="false" LoadOnDemand="True" Indentation="0px">
	                                <Style ForeColor="Black"  >
	                                </Style>
	                            </PreviewRowSettings>
                                <HeaderStyle BackColor="#2b5584" BorderColor="#2b5584" BorderStyle="Solid" BorderWidth="1px" Cursor="Hand"
                                    Font-Names="Verdana" Font-Size="8pt" ForeColor="White" Font-Bold="true" HorizontalAlign="Center" CustomRules="height:auto">
                                    <BorderSettings>
                                        <Left Color="#2b5584" />
                                        <Top Color="#2b5584" />
                                    </BorderSettings>
                                </HeaderStyle>

2. Grid2.png - shows the header when the <HeaderStyle is located in the <LayoutSettings as in..

<LayoutSettings AllowFilter="Yes" AllowGrouping="Yes" AllowSorting="Yes" PagingMode="VirtualLoad" VirtualLoadMode="Custom"
                                GroupByBoxVisible="False" AllowColumnFreezing="No" AllowColumnMove="Yes" AllowExport="No" AlwaysShowHelpButton="false"  
                                AllowSelectColumns="Yes" RowLostFocusAction="NeverUpdate" AutoFilterSuggestion="True" FilterBarVisible="false"  
                                HideColumnsWhenGrouped="No" InProgressUIBehavior="ChangeCursorToHourGlass" PagingSize="50"  
                                ShowFilterStatus="True" RestoreRowSelection="RootTableOnly" VirtualPageSize="50" PagingExportMode="ExportAllData" 
                                AllowMultipleSelection="No" GroupRowInfoFormatDefault="[caption] : [value] ([count])" ColumnFooters="Yes" 
                                HeaderClickAction="SortSingle" ShowColumnAction="true" RowHeaders="No" CellClickAction="CellSelect"> 
                                <HeaderStyle BackColor="#2b5584" BorderColor="#2b5584" BorderStyle="Solid" BorderWidth="1px" Cursor="Hand"
                                    Font-Names="Verdana" Font-Size="8pt" ForeColor="White" Font-Bold="true" HorizontalAlign="Center" CustomRules="height:auto">
                                    <BorderSettings>
                                        <Left Color="#2b5584" />
                                        <Top Color="#2b5584" />
                                    </BorderSettings>
                                </HeaderStyle>                                                                                                                                
                            </LayoutSettings>

Look at the column headers for the difference.  As for the other issues I will try to work up a sample.

 

 

Posted: October 17, 2012 7:41 AM

Ok, I see what the problem is...

In my grid defintion I am using the <headerStyle... under the <RootTable defintion and not in the layout settings, so when I save the layout the header style is not saved.  If I move the <headerStyle to the Layout settings than the header style is saved and restored. 

BUT

There is a difference in how the styles are applied based upon their location.  When I use the <HeaderStyle under <RootTable, my header text is wrapped on those columns where the width of the column is less than the text.  When used in the Layout settings, the header text is not wrapped.

 

Another problem is when the grid is first loaded and the layout and structure are applied in the WebGrid1_InitializeLayout event if I try to expand a preview row, it reloads the whole grid again via a postback and doesn't expand the preview row, unless I first click on a columns header to sort it, then the preview row will expand.

And the WebGrid1_InitializeRow event errors out if you try to modify a template field with error saying column doesn't exisit.

 

This is an important function for us.

 

Posted: October 16, 2012 6:52 AM

Your sample only has the WebGridTableStructure.xml and not the WebGridTableLayout.xml.  I have saved both the layout and structure and when I retsore them, the header styles are NOT restored. 

Posted: October 15, 2012 8:10 AM

Hi,

  Your sample uses the Save/LoadLayoutFromXml function and this will restore the styles of the grid BUT it doesn't restore the columns that were displayed (when using Select Columns), or the sort order or grouping.  For this you need to use SaveTablesStructuretoXML/LoadTablesStructureFromXML, which doesn't load the header styles.  I've tried loading the structure than the layout (and reverse) but it does restore the grid to the condition the user had it set at when they saved the layout.

How can I get the table structure inlcuding styles, sorting, grouping and columns to the way the user has set the grid when they saved it?

 

Posted: October 11, 2012 6:40 AM

Hi Yudi,

  I am using saveTablesStructureToXml and restoring using LoadTablesStructureFromXml method, but on restoring the Header Style IS NOT applied, the style goes back to the default style and NOT the style that is described in the Header Style.

Posted: September 27, 2012 7:10 AM

I tried this code on client side and it doesn't work.  I tried this on the sample that I uploaded in a previous message.

Posted: September 26, 2012 7:17 AM

Hi Bernard,

 

   The code you supplied does remove the items, but I do get a JS error which follows:

 

Line: 7
Error: 'ClientToolBar.1' is null or not an object

Line 7 is:

v3da31.ClientToolBar[1].Enable("cmdSpellChecker")

Thanks

All times are GMT -5. The time now is 12:55 PM.
Previous Next