Error while changing position of column with column groups

5 posts, 0 answers
  1. Shridhar
    Shridhar avatar
    4 posts
    Member since:
    Sep 2016

    Posted 14 Nov 2019 Link to this post

    Hi,

    I have a grid which has column groups, I am trying to change the position of a column on runtime on click of a button but it gives me error.

    Below is my code. I have read at few places that its not possible, is there any alternate way to achieve it.

    <ColumnGroups><br>                        <telerik:GridColumnGroup HeaderText="Group 1" Name="Group1"></telerik:GridColumnGroup><br>                        <telerik:GridColumnGroup HeaderText="Group 2" Name="Group2"></telerik:GridColumnGroup><br>                    </ColumnGroups><br>                    <ColumnGroups><br>                        <telerik:GridColumnGroup HeaderText="Group 4" Name="Group3" ParentGroupName="Group1"></telerik:GridColumnGroup><br>                        <telerik:GridColumnGroup HeaderText="Group 5" Name="Group4" ParentGroupName="Group1"></telerik:GridColumnGroup><br>                        <telerik:GridColumnGroup HeaderText="Group 6" Name="Group5" ParentGroupName="Group2"></telerik:GridColumnGroup><br>                    </ColumnGroups><br>                    <Columns><br>                        <telerik:GridBoundColumn HeaderText="PO Date"  ></telerik:GridBoundColumn><br>                        <telerik:GridBoundColumn HeaderText="Submittal Package" ></telerik:GridBoundColumn><br>                        <telerik:GridBoundColumn HeaderText="Returned Submittals" ColumnGroupName="Group3" ></telerik:GridBoundColumn><br>                        <telerik:GridBoundColumn HeaderText="Release Date" ColumnGroupName="Group3"></telerik:GridBoundColumn><br>                        <telerik:GridBoundColumn HeaderText="Confirmation Dwgs" ColumnGroupName="Group3"></telerik:GridBoundColumn><br>                        <telerik:GridBoundColumn HeaderText="Construction Dwgs" ColumnGroupName="Group4"></telerik:GridBoundColumn><br>                        <telerik:GridBoundColumn HeaderText="Inspect/Witness Test" ColumnGroupName="Group4"></telerik:GridBoundColumn><br>                        <telerik:GridBoundColumn HeaderText="Shipment" ColumnGroupName="Group5"></telerik:GridBoundColumn><br>                        <telerik:GridBoundColumn HeaderText="Weeks PO-Ship" ColumnGroupName="Group5"></telerik:GridBoundColumn><br>                        <telerik:GridBoundColumn HeaderText="O/M Manuals" ></telerik:GridBoundColumn><br>                        <telerik:GridBoundColumn HeaderText="O/M Manuals" ></telerik:GridBoundColumn><br>                        <telerik:GridBoundColumn HeaderText="Dynamic Column1"></telerik:GridBoundColumn><br>                        <telerik:GridBoundColumn HeaderText="Dynamic Column2"></telerik:GridBoundColumn><br>                        <telerik:GridBoundColumn HeaderText="Dynamic Column3"></telerik:GridBoundColumn><br><br>                    </Columns><br><br>                </MasterTableView><br>            </telerik:RadGrid>
  2. Shridhar
    Shridhar avatar
    4 posts
    Member since:
    Sep 2016

    Posted 18 Nov 2019 Link to this post

    Can anybody please help me here. I need urgent help in creating columns (with multi header) dynamically and position on an existing radgrid with multiple header columns
  3. Attila Antal
    Admin
    Attila Antal avatar
    440 posts

    Posted 19 Nov 2019 Link to this post

    Hi Shridhar,

    Unfortunately I do not see the server side code with the re-ordering at your side, therefore, I am unable to pin-point the errors, however, we have a Documentation Article describing how to Order columns programmatically: Reordering columns programmatically

    There is an important Note in the article saying "When using the OrderIndex property to reorder columns, make sure that you assign values so that no two columns have the same index and no index is omitted."

    For urgent support, I advise that you open a formal Support Ticket with us. Our support staff will guarantee 24 hours response time for customers holding a "DevCraft Complete" license.

    Kind regards,
    Attila Antal
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  4. Shridhar
    Shridhar avatar
    4 posts
    Member since:
    Sep 2016

    Posted 19 Nov 2019 Link to this post

    Thank you so much for your response.

    there is no issue right now on my server side code and i am able to progress to create multiple header grid from the back end.

    My question is that once the multiple header grid is created , what property shall i use to change the position of columns along with its group. Shall i change order index of each column under a column group.

    Will doing the above will shift columns along with its group

  5. Attila Antal
    Admin
    Attila Antal avatar
    440 posts

    Posted 21 Nov 2019 Link to this post

    Hi Shridhar,

    Thank you for the clarification.

    As you mentioned Multi Column headers, I remembered that this functionality does not support re-ordering of columns. Here is the official documentation article: Limitations - Reordering.

    "Column reordering is available at the same level of sinigle column headers. This means that multi-column headers cannot be reordered and columns can only be reordered within their own column group."

     

    With that said, you could only re-order the columns within the same group, or, if reordering one column, you must move all the other columns in the same group with it.

     

    Kind regards,
    Attila Antal
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top