Ario.Paxaz Posted October 2, 2023 Share Posted October 2, 2023 Hi, How to reverse the column number with multiselect in unidbgrid. Regards. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 2, 2023 Share Posted October 2, 2023 Hello, RTL = True ? Quote Link to comment Share on other sites More sharing options...
Ario.Paxaz Posted October 2, 2023 Author Share Posted October 2, 2023 Yes Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 2, 2023 Share Posted October 2, 2023 20 minutes ago, Ario.Paxaz said: Yes And? Were you able to? Quote Link to comment Share on other sites More sharing options...
Ario.Paxaz Posted October 2, 2023 Author Share Posted October 2, 2023 I want to move these two columns. The row number should be the first column and the selection column should be in the second position. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 2, 2023 Share Posted October 2, 2023 Ok, I will try to check. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 3, 2023 Share Posted October 3, 2023 11 hours ago, Ario.Paxaz said: The row number should be the first column and the selection column should be in the second position. Hello, You can try to use this approach: 1. UniDBGrid.ClientEvents.UniEvents -> function beforeInit(sender, config) { config.checkColumnMoved = false; } 2. UniDBGrid.ClientEvents.ExtEvents -> function columnschanged(ct, eOpts) { var cols = ct.getGridColumns(); if (cols && cols.length>1 && ct.grid.checkColumnMoved == false) { if (ct.getGridColumns()[0].xtype == 'checkcolumn' && ct.getGridColumns()[1].xtype == 'rownumberer') { ct.grid.checkColumnMoved = true; ct.move(0, 1); } } } Quote Link to comment Share on other sites More sharing options...
Ario.Paxaz Posted October 3, 2023 Author Share Posted October 3, 2023 Hi, I use the following code for the click title of the column that has a checkbox. It interferes with the code you sent. function viewready(sender, eOpts) { col = sender.getColumnManager().getColumns()[0]; if (col && col.xtype == 'checkcolumn' && !col.dataIndex) { col.dataIndex = -3; } } Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 4, 2023 Share Posted October 4, 2023 Hello, Well, try this then: function viewready(sender, eOpts) { col = sender.getColumnManager().getColumns()[1]; if (col && col.xtype == 'checkcolumn' && !col.dataIndex) { col.dataIndex = -3; } } Quote Link to comment Share on other sites More sharing options...
Ario.Paxaz Posted October 8, 2023 Author Share Posted October 8, 2023 Quote Well, try this then: Hello The problem still persists, When the column check box is activated, the title of the click is also called Also, when the data is reloaded in the grid, the number column changes. Regards. Sample2.rar Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 8, 2023 Share Posted October 8, 2023 Ok, I will check. Quote Link to comment Share on other sites More sharing options...
Ario.Paxaz Posted October 14, 2023 Author Share Posted October 14, 2023 Hi Did you find a solution? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 23, 2023 Share Posted October 23, 2023 On 10/14/2023 at 11:37 PM, Ario.Paxaz said: Did you find a solution? Hello, Yes, Here's a workaround. 1. Remove previous codes from events. 2. MainForm.Script -> Ext.override(Ext.grid.Panel, { reconfigure: function() { this.callParent(arguments); var cols = this.getColumnManager().getColumns(); if (cols[0].xtype == 'checkcolumn' && cols[1].xtype == 'rownumberer') { var _col = cols[0]; this.headerCt.move(0, 1); Ext.defer(function () { _col.dataIndex = -3 }, 1000); } } }); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.