Jump to content

abhimanyu

uniGUI Subscriber
  • Posts

    15
  • Joined

  • Last visited

Posts posted by abhimanyu

  1. Hi,

    When I try to enable multiselect of uniDBGrid on button click it was not working.
     

    Below is code of button click, and attached a Demo as well.

    procedure TMainForm.UniButton1Click(Sender: TObject);
    begin
      UniDBGrid1.Options := UniDBGrid1.Options + [dgCheckSelect, dgRowSelect, dgMultiSelect];
    end;
    
    
    procedure TMainForm.UniButton2Click(Sender: TObject);
    begin
      UniDBGrid1.Options := UniDBGrid1.Options - [dgCheckSelect, dgRowSelect, dgMultiSelect];
    end;

     

    GridMultiSelect.zip

  2. Can you try this approach for now?!:

     

    Your Panel -> ClientEvents -> ExtEvents -> function boxready:

    function boxready(sender, width, height, eOpts)
    {
        sender.items.each(function(el) {
            var me=Ext.get(el.id);
            if (me) {
                me.dom.addEventListener('mousedown', function(e) {
                    e.stopPropagation();
                })
            }
        })
    }

    Try..

     

    Best regards.

     

    due to this the child control's popup are occurring but when I click on parent then it also not showing parent's popup. It have to show parent's popup when click on parent and child's popup when click on child control

  3. Hi,

    Panel and control over the panel, both having a OnMouseDown event. When click on panel it works fine but when click on control which is over the panel then it calling two events firstly control's mousedown and then panel's mousedown so I want only one event has to be called. If click on control it should be call control's mousedown not panel's mousedown. 

    How  did I prevent parent's mousdown event?

  4. Hi,

     

    I have panel in main form when I click in the region of panel at position I need to open the popupmenu but it open at different position not that current position.

     

    procedure TMainForm.UniPanel1MouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    var
      pt: TPoint;
    begin
      pt := Mouse.CursorPos;
      pt := ScreenToClient(pt);
      if Button = mbLeft then
      begin
        UniPopupMenu1.Popup(pt.x, pt.y);
      end;
    end;
  5. procedure TMainForm.SelectALLClick(Sender: TObject);

    begin

      UniSession.AddJS(UniDBGrid1.JSName + '.getSelectionModel().selectAll();');

      ShowMessage(inttostr(UniDBGrid1.SelectedRows.Count));

    end;

     

    procedure TMainForm.UnSelectAllClick(Sender: TObject);

    begin

      UniSession.AddJS(UniDBGrid1.JSName + '.getSelectionModel().deselectAll()');

      ShowMessage(inttostr(UniDBGrid1.SelectedRows.Count));

    end;

     

    In my case it not showing proper count of the selected records.

     

    If I select 2 record and then click on SelectALL it gives me count is 2 after that if  I click on UnSelectAll it gives me total count and again If I click on SelectALL it gives me count 0. I am not sure what I missing. 

  6.  

    Which build are you using?!

     

    Also you can use like this:

    UniSession.AddJS(UniDBGrid1.JSName + '.getSelectionModel().selectAll();');
    UniSession.AddJS(UniDBGrid1.JSName + '.getSelectionModel().deselectAll();');

     

     

    procedure TMainForm.UniButton1Click(Sender: TObject);
    begin
      UniSession.AddJS(UniDBGrid1.JSName + '.getSelectionModel().selectAll');
     
      ShowMessage(IntToStr(UniDBGrid1.SelectedRows.Count));
    end;
     
     
    After clicking on button it will not showing the count of all rows and not selecting all records. Is that need anything else to call that JS?
×
×
  • Create New...