eduardosuruagy Posted September 30, 2019 Share Posted September 30, 2019 I am using dbgrid selection and when I use I add this event to it the selection stops working. 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 '}'); Follows the fonts and a gif. UniGui - DBGridMemo.rar Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted September 30, 2019 Author Share Posted September 30, 2019 How do I click a line and make it a different color? When you use the checkbox, this option stops working. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 30, 2019 Share Posted September 30, 2019 3 hours ago, eduardosuruagy said: 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 '}'); What do you expect from this code? Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted September 30, 2019 Author Share Posted September 30, 2019 3 minutes ago, Sherzod said: O que você espera desse código? Sort records when I click on a column Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 30, 2019 Share Posted September 30, 2019 Your code gives the following errors: Uncaught TypeError: Cannot read property 'getStore' of undefined at ctor.OnHeaderclick ((index):37) at ctor.fire (ext-all.js:20) at ctor.doFireEvent (ext-all.js:20) at ctor.doFireEvent (ext-all.js:20) at ctor.b.doFireEvent (ext-all.js:20) at ctor.fireEventArgs (ext-all.js:20) at ctor.<anonymous> (ext-all.js:20) at ctor.fire (ext-all.js:20) at ctor.doFireEvent (ext-all.js:20) at ctor.doFireEvent (ext-all.js:20) Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted September 30, 2019 Author Share Posted September 30, 2019 43 minutes ago, Sherzod said: in which code? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 1, 2019 Share Posted October 1, 2019 10 hours ago, eduardosuruagy said: in which code? 15 hours ago, eduardosuruagy said: 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...
eduardosuruagy Posted October 1, 2019 Author Share Posted October 1, 2019 7 hours ago, Sherzod said: I got this code here from the forum, this link: http://forums.unigui.com/index.php?/topic/6225-dbgrid-clientside-sorting/& How could you see these errors? Because for me it works normal and has no errors. What would be another alternative to this code? Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 1, 2019 Author Share Posted October 1, 2019 ??? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 1, 2019 Share Posted October 1, 2019 12 minutes ago, eduardosuruagy said: ??? Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 1, 2019 Author Share Posted October 1, 2019 5 minutes ago, Sherzod said: it works normal, server side is very slow, you even indicated this code to me. How did you find this error? because for me the mistake does not happen. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 1, 2019 Share Posted October 1, 2019 Just now, eduardosuruagy said: How did you find this error? because for me the mistake does not happen. Open your browser console. Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 1, 2019 Author Share Posted October 1, 2019 2 minutes ago, Sherzod said: Abra o console do navegador. I just saw, the most error works. How can I adjust this? Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 2, 2019 Author Share Posted October 2, 2019 18 hours ago, Sherzod said: Abra o console do navegador. Even though I put this code below when I click the column to select all records the grid enters the procedure and orders the first column. procedure TMainForm.UniDBGrid1TitleClick (Column: TUniDBGridColumn); begin ClientDataSet1.IndexFieldNames: = Column.FieldName; end; Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 3, 2019 Author Share Posted October 3, 2019 On 01/10/2019 at 15:07, Sherzod said: Abra o console do navegador. Is there any alternative? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 3, 2019 Share Posted October 3, 2019 2 minutes ago, eduardosuruagy said: Is there any alternative? I am trying to find a solution ... Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 3, 2019 Author Share Posted October 3, 2019 6 minutes ago, Sherzod said: Estou tentando encontrar uma solução ... Thanks!! Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 15, 2019 Author Share Posted October 15, 2019 On 03/10/2019 at 09:30, Sherzod said: Estou tentando encontrar uma solução ... any news? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 15, 2019 Share Posted October 15, 2019 18 minutes ago, 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'}'); Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 15, 2019 Author Share Posted October 15, 2019 11 minutes ago, Sherzod said: No seu caso, tente sem o seguinte: It works, but takes column sorting Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 15, 2019 Share Posted October 15, 2019 1 minute ago, eduardosuruagy said: It works, but takes column sorting Excuse me, then remind me, what do you want in fact? Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 15, 2019 Author Share Posted October 15, 2019 5 minutes ago, Sherzod said: Com licença, depois me lembre, o que você quer de fato? I'd like to mark all the records, like this one in the animation at the beginning of this post. Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 18, 2019 Author Share Posted October 18, 2019 On 15/10/2019 at 15:33, Sherzod said: Com licença, depois me lembre, o que você quer de fato? Any news? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 19, 2019 Share Posted October 19, 2019 13 hours ago, eduardosuruagy said: Any news? Sorry, then explain once again please, what you want to achieve, not taking into account the code that you use above. Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 19, 2019 Author Share Posted October 19, 2019 2 hours ago, Sherzod said: Desculpe, então explique mais uma vez, por favor, o que você deseja alcançar, sem levar em conta o código que você usa acima. 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. 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.