Notifications
Announcements
No record found.
Hi Friends,
I want call the "Group by this column" option when the form is loaded and show the grid to the user grouped by that particular column in x++ code. Can you provide some hint for the code and the place where the code can written.
Hi Martin,
On the FormGridControl there is a method named groupBy(controlName). Use this method to add a groupBy of the grid.
Add this code on the init method of the form.
Get the grid control and control to group by in the OnInitialize event handler of the form.
Thanks,
Girish S.
Hi, You can add group by in ExecuteQuery method of form datasource
Check this article
dev.goshoom.net/.../
Hi Girish,
Thanks for the reply.
I tired GroupBy method the way you suggested. Actually the parameter to be passed for the method GroupBy is string.
when I tried to pass the control name, it gives error saying 'The required type is string but the actual type is formstringcontrol'
what string should I pass in the parameter?
Regards
Martin
Just type the control name in double quotes.
FormGridControl.addGroupBy("ControlName1");
Are you able to solve this?
Use name method to get the name of the particular control.
I tried in the standard form it's not working. I tried it in different method also it's not working.
Its working on custom form where its open with group by enabled and also, I think it works on latest version only.
I think it works only for custom form only not for standard forms.
Its working in custom forms, but its not producing same results as manual grouping
Can you provide more details on how the results are different
I think it won't work in standard form. It will work only in custom form.
If you find any solution to this in future, please post it here so it will be useful for others.
Is it the requirement to call it by x++ code only? Because this can be simply done by Feature management. Please check this blog.
sathishd365.wordpress.com/.../
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Abhilash Warrier 669 Super User 2025 Season 2
André Arnaud de Cal... 449 Super User 2025 Season 2
Martin Dráb 384 Most Valuable Professional