Jump to content

arilotta

uniGUI Subscriber
  • Posts

    187
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by arilotta

  1. When the underlying dataset is in Browse mode, I would like the whole row to be selected.

    When it is in Edit/Insert mode, the selection is column based.

     

    It is just to give the user an additional graphical evidence of the dataset status, not something

    I couldn't live without.

     

    Thanks

    Andrea

  2. Hi Delphi Dev, 

    from your samples, it is possible to bind a Dbgrid column to a lookup field to automatically produce a "DblookupCombo" editor, without the need

    to specify explicitely the editor in the Editor property of the column.

    This automatically "runtime generated " dblookupcombo does not provide you with the ClearButton, AnyMatch, etc. options.

    Is that right ?

    However, I've discovered that it is possible to explicitely specify in the Editor property for the column a "design time created" DBLookkupComboBox,

    bound with DataSource to the same Grid datasource and DataField to the field underlying the lookup field (key).

    In this way it is possible to deeply configure the "design time created" DBLookkupComboBox, using ClearButton, AnyMatch, maybe RemoteQuery, etc.

     

    In browse mode, the grid column is filled by the LookupField, while in Edit mode the data editing is managed by the  "design time created" DBLookkupComboBox.

     

    Please confirm me that this is a possible solution without any drawbacks, I'm in a hurry because the deadline for the current project I'm working on is coming....

     

    Thank you, as always.

    Andrea

  3. Hi Delphi Dev, I found this old thread.

    I would like to add the "x" to the automatically created DBLookupComboBox when the grid columns are bound to lookup fields.

    At the moment, there is no possibility to empty (set NULL) the field, even by clearing the field contents with backspace.

    Hoping there is a solution....

    Thank you

  4. I've found the solution Delphi Dev. It seems that if the hidden panel is placed "below" other controls the problem arises.

    In the test case I've prepared, if you select UniHiddenPanel1 in the structure view, then Control \ Bring To Front, everything works fine...

  5. Hello, is there a way to put a UniListBox in readonly mode, to avoid the user changes the current selection ?

    If using the enabled property, the component cannot be scrolled, and the color becomes dark gray...

     

     

    Thanks

    Andrea

  6. Hi Delphi Dev, I tried your solution to show/hide the filter at runtime because I was interested in such a feature in the application I'm developing:

     

    procedure TMainForm.UniButton1Click(Sender: TObject);

    begin

      GRDconfig_LK.Columns[1].Filtering.enabled:=not GRDconfig_LK.Columns[1].Filtering.enabled;

      TExUniCustomDBGrid(GRDconfig_LK).DoConfigureJSColumns(GRDconfig_LK.DataSource.DataSet);

    end;

     

    It works fine the first time, then I get the following error:

     

     

     

     

    O130 is not defined
     

     

    delete O115_Cols;delete O115.view.cachedColumns; O198=new Ext.grid.column.Column({ogrid:O115,sortable:false,dataIndex:"0",renderer:_rndcll_,rdonly:true,text:" ",menuDisabled:true,width:20,unEditable:true});O198.nm="O198"; O199=new Ext.grid.column.Column({ogrid:O115,flex:1,dataIndex:"1",renderer:_rndcll_,rdonly:true,text:"Descrizione",menuDisabled:true,width:781,unEditable:true,items:[O130],fedit:O130,padding:"0 0 0 5"});O199.nm="O199";O130.setWidth(771);O199.on("afterrender",function(s){s.el.on("click",function(){O199.fedit.focus()})}); O19A=new Ext.grid.column.Column({ogrid:O115,dataIndex:"2",renderer:_rndcll_,rdonly:true,text:"Dal",menuDisabled:true,width:80,unEditable:true});O19A.nm="O19A"; O19B=new Ext.grid.column.Column({ogrid:O115,dataIndex:"3",renderer:_rndcll_,rdonly:true,text:"al",menuDisabled:true,width:80,unEditable:true});O19B.nm="O19B";var O115_Cols=[O198,O199,O19A,O19B];O115.reconfigure(null,O115_Cols);O115.uniConfigColumns();

    O130 is not defined
     
  7. Thank you Delphi Dev.

    jrp, if you want to achieve the behaviour at point 2,  add the following proc to the OnStateChange handler for the datasource bound to your dataset:

     

    procedure TMainForm.SRCconfig_LKStateChange(Sender: TObject);
    begin
      if (Sender as TOraDataSource).State in [dsEdit, dsInsert] then
        begin
          GRDconfig_LK.Options:=GRDconfig_LK.Options+[dgEditing];
          GRDconfig_LK.SetFocus;
        end
      else
        GRDconfig_LK.Options:=GRDconfig_LK.Options-[dgEditing];
    end;
  8. Hi Delphi Developer, I am experiencing the same problem  signaled by jrp at point 1:

     

    When I'm editing a record by double-clicking the grid, UniDBGrid1.DataSource.State is dsBrowse. Is this a bug? Because when I do editing by clicking the edit button in the UniDBNavigator1 or by code, UniDBGrid1.DataSource.State is dsEdit (correct behaviour).

     

    Has this been fixed in recent versions ?

    I'm running on build 1401...

    Thank you

  9.  

    Hi, 

     

    this is my first UniGui component: TUniCheckListBox. It resembles the classic VCL component TCheckListBox,

    a component that I was familiar with, and that I found was missing from the UniGUI included components.

     

    First of all, I would like to thank Delphi Developer, because the main code used in the component was supplied

    by him in the following post:

     


     

    The component is based on TUniCustomListBox, and its usage is therefore very similar to TUniListBox.

    The items in the list can only be multi-selected using the checkbox, rather then the using the left

    mouse button click in combination with Ctrl/Shift keys.

     

    To install it, just open the UniCustomComponents package, change the Delphi version in the UniCustomComponents package source

    (I used UniGUI23 for Delphi 10 Seattle); it should be UniGUI24 for Berlin and UniGUI25 for Tokio....

    Then build and install the package.

     

    Thanks

     

    Andrea Arilotta

     

    UniGUI.zip

    • Upvote 3
  10. Hi Delphi Developer, is there a way to have the selection on a UniListBox to be made only with the checkboxes ?

    I would like to have the UniListBox.Selected list to be populated only with the checked items, rather than by the 

    Ctrl+click and Shift+click events.

    Thanks

    Andrea

  11. Hi Delphi Developer, I found this "old" thread because I wanted to add checkboxes to unilistbox with multiselect=true.

    Your solution works, the checkboxes are displayed. But, if inspecting the unilistbox selected property, no row

    is marked as selected:

     

    var
      I: Integer;
    begin
      for I := 0 to CHKIndicazione.Items.Count - 1 do
        if CHKIndicazione.Selected then
          showmessage(CHKIndicazione.items)
    end;
     

    What's the problem ?

    Thanks

    Andrea

  12. Thank you Delphi Developer, it works perfectly. With your support I was able to design an icon on a DbGrid and to popup a menu

    on the position of the cell, when it gets clicked.

     

    Andrea

  13. Hi Delphi Developer,

    your solution finds correctly the coordinates, but I am not able to send them to the server using the ajaxrequest command:

     

    function cellmousedown(sender, td, cellIndex, record, tr, rowIndex, e, eOpts)
    {
      var c = Ext.get(td).getXY();
      ajaxRequest(sender, 'CellXY', ['x='+c.x, 'y='+c.y]);   
    }
     
    The above event does not fire anything in the OnAjaxEvent Delphi event. How come ?
    Thanks
    Andrea
  14. Your solution works well Delphi developer.

    I use some images in a DbGrid as action icons, and I need to know the position of the mouse when the image gets clicked (left mouse button)

    because I need to popup a popupmenu with some choices in that position.

    In fact this solution gives me back the coordinates of the cell, and not the actual coordinates of the mouse.

    I would need to have the X,Y coordinates such as in the OnCellContextClick event.

    Why the OnCellClick event does not supply X,Y coordinates ?

     

    As always thank you.

  15. Thanks alot Delphi dev,

    I started yesterday following Mohammad's instructions finding the CSS styles to modify, and I managed to achieve something 

    using these:

     

    .x-grid-row-before-focused .x-grid-td {
      border-bottom: 1px hidden #FFFFFF;
    }
     
    .x-grid-row-focused .x-grid-td {
      border-bottom: 1px hidden #FFFFFF;
    }
     
    .x-grid-body .x-grid-table-focused-first {
      border-top: 1px hidden #FFFFFF;
    }

     

    But your solution works in fact very well and I'll use your style.

    I'm planning to use this solution with the grid indicator (remember the other post ?)

    In addition, thanks to your reply, I learnt how to apply a particular style (custom-grid in our case) to a specific grid,

    using the beforeInit event. 

    Thanks again !

  16. Hi Farshad, I needed too to know the position of a clicked cell.

    It seems that this solution does not work anymore, maybe the framework has changed meanwhile.

     

    function cellmousedown(sender, td, cellIndex, record, tr, rowIndex, e, eOpts)
    {
      var c = sender.getXY(e);
    alert("c.x"+c.x);
    }
     
    the above implementaion returns "undefined", which is the correct way to get the coordinates ?
    Thank you
×
×
  • Create New...