Sherzod Posted October 19, 2019 Share Posted October 19, 2019 35 minutes ago, eduardosuruagy said: Just look at the video at the beginning of this topic, I need to click on the option to mark all records, which is not working. When I put any function to sort the grid this option to mark all the records stops working since I can't remove the sorting grid option, except you have another option that works along with the selection of the records. Please tell me, what do you want to achieve in general - without using extra codes ? Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 19, 2019 Author Share Posted October 19, 2019 30 minutes ago, Sherzod said: Por favor, diga-me, o que você deseja alcançar em geral - sem usar códigos extras ? I wish I could mark all the records by clicking on the column, like this one in the video, and I also need to sort the grid. See that if I remove the sort code it does nothing. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 19, 2019 Share Posted October 19, 2019 On 10/15/2019 at 11:17 PM, Sherzod said: On 10/15/2019 at 10:56 PM, eduardosuruagy said: any news? In your case, just try without this: // UniDBGrid1.ClientEvents.ExtEvents.Add( // 'headerclick=function headerclick(ct, column, e, t, eOpts)'#13#10'{'#13#10' ' + // ''+Self.Name+'.'+UniDBGrid1.DataSource.DataSet.Name+'.getStore().sort(column.dataIndex);'#13 + #10'}'); I already gave you a solution for your test case, it seems you have not checked. Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 19, 2019 Author Share Posted October 19, 2019 6 minutes ago, Sherzod said: Eu já lhe dei uma solução para o seu caso de teste, parece que você não verificou. This I already did, but how do I sort the records when clicking on any column of the grid? If I remove this option it does not order. If you have another way of doing it that would be great. Is there any way to click a button and mark all grid records? No need to click on the selection column. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 19, 2019 Share Posted October 19, 2019 1 minute ago, eduardosuruagy said: This I already did, but how do I sort the records when clicking on any column of the grid? If I remove this option it does not order. If you have another way of doing it that would be great. In your testcase you have: 1. Use it: UniDBGrid1.ClientEvents.UniEvents.Add( 'store.afterCreate=function store.afterCreate(sender)'#13#10'{'#13#10''+ ' sender.setRemoteSort(false);'#13#10'}'); 2. Don't use: // UniDBGrid1.ClientEvents.ExtEvents.Add( // 'headerclick=function headerclick(ct, column, e, t, eOpts)'#13#10'{'#13#10' ' + // ''+Self.Name+'.'+UniDBGrid1.DataSource.DataSet.Name+'.getStore().sort(column.dataIndex);'#13 + #10'}'); Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 19, 2019 Share Posted October 19, 2019 And those columns that you want to sort locally: UniDBGrid.Columns[xx].Sortable = True Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 19, 2019 Author Share Posted October 19, 2019 2 minutes ago, Sherzod said: In your testcase you have: 1. Use it: UniDBGrid1.ClientEvents.UniEvents.Add( 'store.afterCreate=function store.afterCreate(sender)'#13#10'{'#13#10''+ ' sender.setRemoteSort(false);'#13#10'}'); 2. Don't use: // UniDBGrid1.ClientEvents.ExtEvents.Add( // 'headerclick=function headerclick(ct, column, e, t, eOpts)'#13#10'{'#13#10' ' + // ''+Self.Name+'.'+UniDBGrid1.DataSource.DataSet.Name+'.getStore().sort(column.dataIndex);'#13 + #10'}'); Perfect, thank you so much ... I mean I don't need this code to sort? UniDBGrid1.ClientEvents.ExtEvents.Add ( 'headerclick = function headerclick (ct, column, e, t, eOpts)' # 13 # 10 '{' # 13 # 10 '' + '' + Self.Name + '.' + UniDBGrid1.DataSource.DataSet.Name + '. GetStore (). Sort (column.dataI ndex);' # 13 + # 10 '}'); Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 19, 2019 Share Posted October 19, 2019 2 minutes ago, eduardosuruagy said: I mean I don't need this code to sort? Yes you do not need, if you are using: 5 minutes ago, Sherzod said: UniDBGrid1.ClientEvents.UniEvents.Add( 'store.afterCreate=function store.afterCreate(sender)'#13#10'{'#13#10''+ ' sender.setRemoteSort(false);'#13#10'}'); 2 minutes ago, Sherzod said: And those columns that you want to sort locally: UniDBGrid.Columns[xx].Sortable = True Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 19, 2019 Author Share Posted October 19, 2019 7 minutes ago, Sherzod said: Sim, você não precisa se estiver usando: One more question, I have a css code that changes the color of the line that is positioned the cursor, but note that in grid 1 this color only appears when I mark the record, has it appear even if the record is not checked? .x-grid-item-selected { color: #404040; background-color: #ffefbb; } Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 19, 2019 Share Posted October 19, 2019 2 minutes ago, eduardosuruagy said: One more question, I have a css code that changes the color of the line that is positioned the cursor, but note that in grid 1 this color only appears when I mark the record, has it appear even if the record is not checked? UniDBGrid.Options -> dgCheckSelectCheckOnly = False Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 19, 2019 Author Share Posted October 19, 2019 13 minutes ago, Sherzod said: UniDBGrid.Options -> dgCheckSelectCheckOnly = False I was thinking of another option, because if I uncheck dgCheckSelectCheckOnly, when I'm marking records and clicking anywhere else on the grid, all other records I've checked are automatically cleared. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 19, 2019 Share Posted October 19, 2019 14 minutes ago, eduardosuruagy said: I was thinking of another option, because if I uncheck dgCheckSelectCheckOnly, when I'm marking records and clicking anywhere else on the grid, all other records I've checked are automatically cleared. Well there must be a balance... \FMSoft\Framework\uniGUI\Demos\Desktop\GridMultiSelect Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 19, 2019 Author Share Posted October 19, 2019 3 minutes ago, Sherzod said: Well there must be a balance... \FMSoft\Framework\uniGUI\Demos\Desktop\GridMultiSelect OK, Obrigado!! 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.