How to disable sorting a column
How to disable sorting a column
As default sorting apply to all column. How to make disable sorting on a column? Thanks for your help.
Re: How to disable sorting a column
Hi,
set
in the init function of your table within the hooks dir,
set
Code: Select all
$options->AllowSorting=0;
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: How to disable sorting a column
What about these code fragments for hooks/TABLENAME-tv.js inside $j(document).ready(function(){...});:
Disable sorting in TV for all columns:
Disable sorting in TV for one column:
Disable sorting in TV for all columns:
Code: Select all
$j("a.TableHeader").each(function () { $j(this).parent().text($j(this).text()) });
Code: Select all
let cn = "subject"; // column name
$j("th." + AppGini.currentTableName() + "-" + cn + " > a.TableHeader").each(function () { $j(this).parent().text($j(this).text()) });
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: How to disable sorting a column
Mr Jan, you always make AG user smiling. Many thanks.
Re: How to disable sorting a column
Thank you for your nice and friendly words
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: How to disable sorting a column
Disable sorting column on parent table is OK. Now, how to disable sorting column on children table? Thanks in advanced for your help.
Re: How to disable sorting a column
And again, see my post
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: How to disable sorting a column
I think soewandi was and is asking about disabling sorting for ONE column, not for the whole table. But perhaps I did not understand his question right.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: How to disable sorting a column
Yes, I mean disable sorting on one or more column. Disable all column from project setting.
Re: How to disable sorting a column
May I ask again? I've tried to find solution by myself but get nothing. So, how to disable sorting column (all column) on children table? Thanks in advanced for your help.
Re: How to disable sorting a column
Simple solution as a starting point for your own development. Briefly tested but not tested for all scenarios:
In hooks/TABLENAME-dv.js each time your children tab tables have been (lazy-) loaded* ...
* Attention: this implicitly means that you have to do this also after a refresh of the children-tab table. This implicitly means you will have to do this also after creating a new record (which forces a reload automatically).
Before
After
Note that I have not only removed the link but also unset the "hand"-cursor. The sorting-icon remains according to the configured sorting in your project.
In hooks/TABLENAME-dv.js each time your children tab tables have been (lazy-) loaded* ...
Code: Select all
$j("th[onclick][onclick!='']").attr("onclick", null).css("cursor", "unset");
Before
After
Note that I have not only removed the link but also unset the "hand"-cursor. The sorting-icon remains according to the configured sorting in your project.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: How to disable sorting a column
Thank you Mr Jan for your time. I've tried but still sorting. Actually, how to disable all function of Child Table, including sorting, updating or inserting if a condition demand of that. Where do I can find information about Child Table?