Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
565
replace/reload the datasource before apply grouping (or other event) feature
posted

Hi,

Here is my problem ( I hope i will explain it clearly ) :

I have a grid with grouping, sorting, column moving and filtering features enabled.

When i group by some columns, i need to display multiple values on the grouped line and apply some custom rules in order to sorting the data. Out-of-the-box , its not possible to do it from the grid (or i didn't find the way). So what i was thinking was to replace the whole datasource before any grouping or any other event apply. When could i plug any custom code to reload the whole datasource ?

I've tried to call a custom function from the groupedColumnsChanging and groupedColumnsChanged with instructions like

$('grid').iggrid('options','datasource', MyNewDataSource);

but it doesn't alter the datasource . It remains the same .

Where/when do i have to have to inject the new datasource in order to use it in the groupBy ?

Thank you in advance 

 

  • 18204
    Offline posted

    Hello LawsonQc,

    Thank you for posting in our forums!

    You can see a sample of how to make custom comparison functions for grouping your rows in our online samples here:

    http://igniteui.com/grid/grouping-customization

    The following sample shows how you can provide custom summary data for the grouped rows.

    http://igniteui.com/grid/grouping

    The igGrid is not designed to switch out datasources in such a way.  The state of the grouping would be reset with the new datasource.  If the above samples do not help you achieve what you need, please submit a new product idea.

    You can suggest new product ideas for future versions (or vote for existing ones) at http://ideas.infragistics.com.

    There are many benefits to submitting a product idea:

    - Direct communication with our product management team regarding your product idea.
    - Notifications whenever new information regarding your idea becomes available.
    - Ability to vote on your favorite product ideas to let us know which ones are the most important to you.  You will have ten votes for this and can change which ideas you are voting for at any time.
    - Allow you to shape the future of our products by requesting new controls and products altogether.
    - You and other developers can discuss existing product ideas with members of our Product Management team.

    Steps to create your idea:

    1. Log into the Infragistics Product Idea site at http://ideas.infragistics.com (creating a new login if needed).
    2. Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)
    3. Add your product idea and be sure to be specific and provide as much detail as possible.
        • Explain the context in which a feature would be used, why it is needed, why it can’t be accomplished today, and who would benefit from it. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. Be convincing!
        • Include a link to this thread in your idea so product management will be able to look back at this case.

    The Product Idea site puts you in the driver’s seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.

    Thank you for contacting Infragistics.