OnColumnResize Client Side Event, Removing Columns and PostBack

11 replies. Last post: August 9, 2012 11:41 PM by Hans Kristian
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Ahmed DajaniMember

I am dynamically adding columns to my grid.

1. I am able to right click a column and choose "Remove this colum." Sometimes it works and removes, other times it doesn't. Have you ever had this behavior?

2. I'd like to be able to refresh the grid everytime a column is resized so I can do some processing on the server. If I do a grid refresh inside the OnColumnResize client side event, it seems the width of the column is still not set to the new width. When client event can I use to post back after OnColumnResize?

Thanks.

My Grid looks like this:

<ISWebGrid:WebGrid ID="myGrid" runat="server" Height="560px" Width="100%" UseDefaultStyle="true" EnableWebResources="Always"
                           DataSourceID="odsAccountLineList" CustomSchemaRetrieval="UseWebGrid">
            <RootTable GridLineStyle="NotSet" DataKeyField="account_line_id">
            </RootTable>
            <LayoutSettings DisplayDetailsOnUnhandledError="true"
                            InProgressUIBehavior="ChangeCursorToHourGlass" StatusBarVisible="true"
                            NewRowLostFocusAction="AlwaysUpdate"
			                RowLostFocusAction="AlwaysUpdate" 
                            AllowColumnMove="Yes"
			                AllowFilter="No" 
                            AllowGrouping="No" 
                            AllowSelectColumns="Yes" 
                            AllowSorting="No"
			                GroupByBoxVisible="false" 
                            AutoHeight="false" 
                            AutoWidth="true" 
                            PagingMode="None"
                            AllowEdit="Yes" 
                            AllowDelete="Yes"
                            AllowMultipleSelection="Yes"
                            UseRelativePositioning="true">
                <AlternatingRowStyle CustomRules="text-overflow: ellipsis; overflow-x: hidden" BackColor="LightGray" Wrap="false" Font-Size="8pt" Font-Names="Arial Monospaced"></AlternatingRowStyle>
                <RowStyle CustomRules="text-overflow: ellipsis; overflow-x: hidden" BackColor="White" Font-Size="8pt" Wrap="false" Font-Names="Arial Monospaced"></RowStyle>
                <ClientSideEvents OnRowContextMenu="myGrid_OnRowContextMenu" OnColumnContextMenu="myGrid_OnColumnContextMenu" 
                    OnColumnResize="myGrid_OnColumnResize" />
		    </LayoutSettings>
        </ISWebGrid:WebGrid>

Thanks.

All times are GMT -5. The time now is 11:39 PM.
Previous Next