I have an Ultrawebgrid as defined below, that is in an UpdatePanel. I have AutoGenerateColumns set to true. My problem is this: when I click on a column header to sort, it adds the columns in twice, the data filled columns and empty columns, so I have duplicated columns. Ok, I turn off AutoGenerateColumns and no data will fill the table. I am databinding an SQL Dataset. There is no editing, so the grid is databound each time the page loads. How can I eliminate the "extra" columns.
<igtbl:UltraWebGrid ID="igCARAll" runat="server" DisplayLayout-AutoGenerateColumns="true"EnableAppStyling="True" StyleSetName="Office2007Blue" StyleSetPath="~/ig_res/" DisplayLayout-CellPaddingDefault="5"DisplayLayout-Pager-AllowPaging="true" DisplayLayout-Pager-PageSize="100" DisplayLayout-Pager-PagerAppearance="Both"Height="350px" Width="100%" DisplayLayout-AllowSortingDefault="Yes" ><Bands><igtbl:UltraGridBand><AddNewRow View="NotSet" Visible="NotSet"></AddNewRow></igtbl:UltraGridBand></Bands><DisplayLayout BorderCollapseDefault="Separate" CellPaddingDefault="5" Name="igCARAll"RowHeightDefault="20px" Version="4.00" HeaderClickActionDefault="SortSingle"><FrameStyle></FrameStyle><Pager Alignment="Left" AllowPaging="True" PagerAppearance="Both" PageSize="100"QuickPages="3" StyleMode="Numeric" MinimumPagesForDisplay="2"><PagerStyle HorizontalAlign="Left" VerticalAlign="Middle" /><ComboStyle HorizontalAlign="Left" VerticalAlign="Middle"></ComboStyle></Pager> <ActivationObject BorderColor="" BorderWidth=""> </ActivationObject></DisplayLayout></igtbl:UltraWebGrid>
Hello dbishop9,
I have created a sample based on your description but I was unable to reproduce this behavior.
I am attaching the sample in this post.
You can test and modify it if it is not representing your exact scenario.
Inform me if some changes should be made to the sample or attach your own sample that I can test locally.
I am looking forward to hearing from you.
Thanks Alex. Your sample worked as expected. However, the problem was in the databinding, which I did not include any code-behind or you would have seen the problem there, no doubt. Prior to using the Ultrawebgrid, I was calling the LoadData method from the page init method to databind each time the page initiated (since it is a non-editable grid). When I went to the Ultrawebgrid, I neglected to move the method call from the page init method to the page load's "if not ispostback" section so it would only databind once when the page first loads, since sorting is done client-side. Once I made the correction, the duplication went away. Thanks much.