eduardosuruagy Posted February 28, 2020 Share Posted February 28, 2020 Error in UniListBox, when I click on a ListBox item I need to know its description, but the way it does not appear. See that in the attached image I marked option 5 and even so in the onclick event he shows me option 1. UniListBox1.Items.Strings[UniListBox1.ItemIndex] Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 28, 2020 Share Posted February 28, 2020 44 minutes ago, eduardosuruagy said: See that in the attached image ? 45 minutes ago, eduardosuruagy said: Error in UniListBox, when I click on a ListBox item I need to know its description, but the way it does not appear. Can you clarify your question? Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted February 28, 2020 Author Share Posted February 28, 2020 15 minutes ago, Sherzod said: ? Você pode esclarecer sua pergunta? I forgot to attach the image Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 28, 2020 Share Posted February 28, 2020 6 minutes ago, eduardosuruagy said: I forgot to attach the image Can you please make a simple testcase to see the issue? Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted February 28, 2020 Author Share Posted February 28, 2020 10 minutes ago, Sherzod said: Você pode fazer um teste simples para ver o problema? This example is what comes with Unigui, I just made some changes to try to get what I wanted. Listbox - Checkbox.rar Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 28, 2020 Share Posted February 28, 2020 2 minutes ago, eduardosuruagy said: This example is what comes with Unigui, I just made some changes to try to get what I wanted. Sorry, are you using the latest build? Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted February 28, 2020 Author Share Posted February 28, 2020 4 minutes ago, Sherzod said: Desculpe, você está usando a versão mais recente? 1.90.0.1522 Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted February 29, 2020 Author Share Posted February 29, 2020 On 28/02/2020 at 01:40, Sherzod said: Desculpe, você está usando a versão mais recente? Any news? Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted March 5, 2020 Author Share Posted March 5, 2020 On 2/28/2020 at 1:40 AM, Sherzod said: Sorry, are you using the latest build? Any news? Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted March 27, 2020 Author Share Posted March 27, 2020 Can anyone help me with this problem? Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted March 27, 2020 Share Posted March 27, 2020 Hi, I'm checking it Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 27, 2020 Administrators Share Posted March 27, 2020 ItemIndex always shows first item in the selected list. It is by design. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 27, 2020 Administrators Share Posted March 27, 2020 Please open a ticket for this. We may implement a workaround. Something like LastClickedItem property. Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted March 27, 2020 Author Share Posted March 27, 2020 19 minutes ago, Farshad Mohajeri said: Por favor, abra um ticket para isso. Podemos implementar uma solução alternativa. Algo como a propriedade LastClickedItem . Where do I open the ticket? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 27, 2020 Administrators Share Posted March 27, 2020 Support portal Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted March 27, 2020 Author Share Posted March 27, 2020 33 minutes ago, Farshad Mohajeri said: Support portal It was created under the number FSD-2009 Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted July 12, 2020 Share Posted July 12, 2020 On 3/27/2020 at 9:08 PM, Farshad Mohajeri said: Please open a ticket for this. We may implement a workaround. Something like LastClickedItem property. Hi Farshad, Any news FSD-2009 ? (Steel not implemented in Build 1534). Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted April 28, 2021 Share Posted April 28, 2021 On 3/27/2020 at 9:08 PM, Farshad Mohajeri said: Please open a ticket for this. We may implement a workaround. Something like LastClickedItem property. Hello FMSoft, Really need LastClickedItem property FSD-2009 Can you please consider it among Top queries. Many Thx. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 28, 2021 Share Posted April 28, 2021 4 hours ago, Abaksoft said: Really need LastClickedItem property Hello, Do you mean the last selected item? Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted April 28, 2021 Share Posted April 28, 2021 3 hours ago, Sherzod said: Hello, Do you mean the last selected item? Hello Maestro, Hoping you feel good and all our developers. Yes, we need to know the last clicked item (not last checked). To reproduce issue : - OnlyCheckBox = True - ShowCheckBox = True - MultiSelect = True it works fine when you check the box, but not when you only select the line. for example : onClick event, it returns a wrong : uniListBox.itemIndex Many Thx. ____________ Sorry i am not at office now. i will send a test case tomorrow... Unigui 1547 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 28, 2021 Share Posted April 28, 2021 Hello! Thank you! Now I understand. Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted April 29, 2021 Share Posted April 29, 2021 9 hours ago, Sherzod said: Hello! Thank you! Now I understand. Here is In attachment a Test Case. Thx. Select_Last_idx_lstBox.7z Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 29, 2021 Share Posted April 29, 2021 On 2/28/2020 at 8:19 AM, eduardosuruagy said: Error in UniListBox, when I click on a ListBox item I need to know its description, but the way it does not appear. 6 hours ago, Abaksoft said: Select_Last_idx_lstBox.7z 22.99 kB · 1 download Hello, Can you try this approach for now? 1. UniListBox1 -> ClientEvents -> ExtEvents -> function afterrender(sender, eOpts) { sender.getEl().dom.addEventListener('click', function(e) { if (e.target && e.target.classList[0] == 'x-boundlist-item') { ajaxRequest(sender, '_click', ['dataindex='+e.target.getAttribute('data-recordindex')]); } }); } 2. UniListBox1 -> OnAjaxEvent procedure TMainForm.UniListBox1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = '_click' then (Sender as TUniListBox).CustomAttribs.Values['dataindex'] := Params.Values['dataindex']; end; 3. UniListBox1 -> OnClick procedure TMainForm.UniListBox1Click(Sender: TObject); begin UniEdit1.Text := (Sender as TUniListBox).CustomAttribs.Values['dataindex']; end; 1 Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted April 29, 2021 Share Posted April 29, 2021 Thank you Sherzod i will test it tomorrow... Enjoy your meal Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted April 30, 2021 Share Posted April 30, 2021 20 hours ago, Sherzod said: Hello, Can you try this approach for now? 1. UniListBox1 -> ClientEvents -> ExtEvents -> function afterrender(sender, eOpts) { sender.getEl().dom.addEventListener('click', function(e) { if (e.target && e.target.classList[0] == 'x-boundlist-item') { ajaxRequest(sender, '_click', ['dataindex='+e.target.getAttribute('data-recordindex')]); } }); } 2. UniListBox1 -> OnAjaxEvent procedure TMainForm.UniListBox1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = '_click' then (Sender as TUniListBox).CustomAttribs.Values['dataindex'] := Params.Values['dataindex']; end; 3. UniListBox1 -> OnClick procedure TMainForm.UniListBox1Click(Sender: TObject); begin UniEdit1.Text := (Sender as TUniListBox).CustomAttribs.Values['dataindex']; end; FANTASTIC Your code works fine !!! Really appreciate your efforts Maestro Sherzod Many thx... 1 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.