Jump to content

eduardosuruagy

uniGUI Subscriber
  • Posts

    845
  • Joined

  • Last visited

  • Days Won

    10

Posts posted by eduardosuruagy

  1. 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;

  2. 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.

    Demo.gif

    UniGui - DBGridMemo.rar

  3. 6 hours ago, Sherzod said:

    Confirmed.

    I will open a ticket in the support portal.

    As a "workaround" you can try this approach for now:

    
      with UniDBGrid1 do
        JSInterface.JSCall('setText', ['New title'], Columns[0].JSColumn);

     

    It worked, thank you very much !!

  4. On 11/09/2019 at 02:02, Sherzod said:

    Oi,

    Você pode fazer um teste simples para reproduzir?

    This error happened to me, the test I did was like this:

    If I have a grid field linked to an editor and I change its column name at run time the error occurs.

     

    C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\Grid with Memo and Image

    Place a button in the project above and add a line on the button click:

    UniDBGrid1.Columns.Items [0] .Title.Caption: = 'test';

  5. the error occurs on this unit: uniDBGrid
    on line 6087

    procedure TUniCustomDBGridColumn.InitEditor (C: TJSObject; Fld: TField);

         if FEdit is TUniCustomMemo then
           with TUniCustomMemo (FEdit) .JSInterface do
           begin
             JSConfig ('grow', [True]);
           end;

  6. On 7/31/2019 at 2:57 AM, Sherzod said:

    Hello,

    You can try something like this:

    
    procedure TMainForm.UniFormCreate(Sender: TObject);
    var
      IDs: string;
    begin
      IDs := UniDBGrid1.JSId + ',' + UniStringGrid1.JSId;
      UniSession.AddJS('document.oncontextmenu = document.body.oncontextmenu = '+
                       '  function (e) { var s=true; e.path.forEach(function(el){'+
                       '    if(el.id!="" && "'+ IDs +'".includes(el.id)){s=false}'+
                       '  });'+
                       'return s}');
    end;

     

    I used this code to block the right mouse button on the stringgrid and I used this other code below to open a poupupmenu, which abge the 2.

    procedure TForm.StringGridFaultMouseDown (Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
    begin
       if Button = mbRight then
         UniPopupMenu2.Popup (X, Y, StringGridFaults);
    end;

  7. 3 minutes ago, fcarvalho4 said:

    procedure TMainForm.btn1Click(Sender: TObject);
    begin
      UniStringGrid1.BeginUpdate;
     try
      UniStringGrid1.Columns.Delete(9);
      UniStringGrid1.ColCount := UniStringGrid1.ColCount - 1;
     finally
      UniStringGrid1.EndUpdate;
     end;
    end;

    unfortunately it doesn't work, it always takes the last column

×
×
  • Create New...