Jump to content

PS1

uniGUI Subscriber
  • Posts

    95
  • Joined

  • Last visited

Posts posted by PS1

  1. ok i think i found better solution:

    function afterCreate(sender)
    {   
    
      sender.inputElement.on('tap', function(){
       if (((sender.store.activeRanges == null) 
          || (sender.store.activeRanges[0].records.length == 0))) 
          sender.focus();
       });
    }

     

    It enables keyboard(on first tap) only if there are no loaded records in unimDBLookupComboBox. 

    It works but i dont rly know if this is a good approach ?

  2. One more question. How to add checking (in above afterCreate js function) if there are items in the ComboBox?

    Need it becouse if user will query the records, chose item and later clear text (by clear button), after he tap again on the combobox it will show the items for 0.1 sec becouse the list is loaded already.

  3. Can it be done without using ajax function ?

    what i mean is: Can ,,DBGrid.WebOptions.PageSize := DBGrid.WebOptions.PageSize + 10"  be written in ,,function afterCreate" ? 

     

    I want to simplify code as much as possible. 

  4. ok, solution found :

     

    function afterCreate(sender) 
    {
        let scroller = sender.getScrollable();

        if (scroller) {   
            scroller.on('scrollend', function(a, b, c) { 

                if (scroller.getMaxPosition().y <= c) {               
                    ajaxRequest(sender, 'ScrollBottomEvent', []);
                   
                }
            })
        }
    }   

    procedure TmForm.DBGridAjaxEvent(Sender: TComponent; EventName: string;
      Params: TUniStrings);
    begin
      if EventName = 'ScrollBottomEvent' then
        begin
          DBGrid.WebOptions.PageSize := DBGrid.WebOptions.PageSize + 10
        end;

    end;

  5. On 10/30/2018 at 6:19 AM, ainsama1 said:

    Is there a way to apply this approach on Mobile? Specifically in UnimDbListGrid? @Sherzod

     

    Is there solution for this question ? i need it badly too..

    i found part of solution:

    DBGrid.WebOptions.PageSize := DBGrid.WebOptions.PageSize + 10

    I dont know where and how should i check scrolling position and use ajaxrequest for the code above.

  6. Issue was to have sender(DBComboBox) so you just can write one function in which you can use (sender as TUniDBComboBox)... .

    i found solution already, there is second event called: 

    RemoteQueryEx(Sender: TComponent;  const QueryString: string; Result: TStrings);

     

    where the sender is given.

  7. I need to check if there is any text in the textEdit part of unimDBLookupComboBox

    Need something like this:

    function afterCreate(sender)
    {
         sender.inputElement.on('tap', function(){

             if (sender.e.getText() == "")
                 sender.focus();

        });

    }

    It is needed becouse if user will select item from list, he cant again drop/show the list of items. It disappears after 0.1 sec. User need to change text in order to show the item list.

    It works probably like that becouse in previous solution we setting focus when dblookupcombobox is taped. 

     

  8. how can i add to this ,,tap function", checking if there is any text written in the combobox ?

    asking becouse without it the dropdownlist is hiding after 0.1 sec   

  9. TestCase in attachment.

    There is probably a bug with UnimDBLookupComboBox (created on other form that MainForm).

    In the testCase just click button and on the new form select another item from UnimDBLookupComboBox1. You will see that item will change only for 0.01 sec and get back to the previous selected item. It works only on first select. You need to close form and open it again for testing. 

    There is workaround if you will assign UnimDBLookupComboBox.keyvalue ='...' on "FormAfterShow" event it won't happen but it's very bad solution becouse user with slow internet will notice the change happening. 

    Is there a better workaround ?

     

     

    unimdbLookupComboBox - first select.zip

  10. HI, solution here was probably deleted. Can someone tell me what was the solution for auto resizing memo height?

    This is not enough : 

    procedure TMainForm.UniFormCreate(Sender: TObject);
    begin
      UniMemo1.JSInterface.JSAddListener('dirtychange', 'function(){this.autoSize()}');
    end;
  11. Thank for your response and sorry for my late response(have been out of workplace for the long weekend).

    Your solution works, but it destroys other property of UniChart which is Axes->CustomLabels (Example on screenshots below).

    How can i set custom labels on the Y-axis and at the same time having your solution for coloring axis?

    image.png.337492af6084fc3bc6cd955a1e0360ad.png

    image.png.a2a5a13008ccaa9ee8721d48469b052b.png 

×
×
  • Create New...