We recommend reviewing what is submitted before posting, in case your idea has already been submitted by another community member. If it has been submitted, vote for that existing feature request (by clicking the up arrow) to increase its opportunity of being added to Cireson solutions.
For more information around feature requests in the Cireson Community click here.
ALways sort tab by first column
Best Answers
-
Nicholas_Velich Cireson Consultant Ninja IT Monkey ✭✭✭✭Hi Remy,
Yes, it is possible via custom.js with a little JavaScript/JQuery.
First, find the kendo grid element. That will look something like this, depending on the page you are on:
var thisKendoGrid = $('selector goes here').getKendoGrid();
Then you need to get the name of the column, like this:
var sortColumnName = thisKendoGrid.columns[index goes here, starting at 0 for the leftmost column].field;
Finally you would update the grid's datasource, like this:thisKendoGrid.dataSource.query({sort: { field: sortColumnName, dir: "asc" },});
Thanks,
Nick1
Answers
Yes, it is possible via custom.js with a little JavaScript/JQuery.
First, find the kendo grid element. That will look something like this, depending on the page you are on:
var thisKendoGrid = $('selector goes here').getKendoGrid();
Then you need to get the name of the column, like this:
var sortColumnName = thisKendoGrid.columns[index goes here, starting at 0 for the leftmost column].field;
Finally you would update the grid's datasource, like this:
Thanks,
Nick
Dear Nicholas,
Could you give a full example of code for this?
Kind Regards
Daniel