Jump to content

pro_imaj

uniGUI Subscriber
  • Posts

    929
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by pro_imaj

  1. On 10/5/2022 at 1:50 PM, pro_imaj said:

    Hi,

    On the MSSQL side, I keep a field of Date type, this field is data entry via DBGrid.

    This is how the DateTimePickert to which the editor is connected on the DBGrid

    Very interesting data is coming. I expect it to behave like this when both displaying the Grdi data and entering the data. DD/MM/YYYY

    These are the corresponding server module Create event PFmtSettings.ShortDateFormat := 'dd/mm/yyyy'; I added it but nothing changed.

    What is the correct solution?

    * If I format the date on the SQL side, it does not enter the editing mode on the Grid this time. Datetimepicture does not detect it as a date.

    I can't fix this problem, what should I do?

  2. 9 minutes ago, 风吹小机机 said:

    Add more query fields to process

    <div style="">   replace    enter

    </div> Replace ‘’

    I realized that the problem is not just with the div.

    There is a test where I average the following articles, this never happens.

    <div style="text-align: center;"><span style="color: rgb(0, 0, 255);">Test Description</span></div><div style="text-align: center;"><font color="#ff0000">Hello</font>
    </div>

    What should I do, how can I show all HTML commands to Fastreport correctly.

  3. 12 minutes ago, 风吹小机机 said:

    It only indicates that FR only supports simple HTML tags

    Yes, I'm already looking for a solution for this. UniDBHTMLMemo saves to database with Div, when I try to display it with Fastreport, there is a problem, how can I solve this problem, I do not create HTML text, UniDBHTMLMemo object creates automatically.

  4. 2 minutes ago, 风吹小机机 said:

    <font color="#0000ff">Test</font>
    <font color="#ff0000">Hello</font>
     

    You removed the divs, but the UniDBHTMLMemo object adds them automatically.

    If you add it as I wrote here, you can see the error.
    <font color="#0000ff">Test</font><div style=""><font color="#ff0000">Hello</font></div>

  5. Hello,

    I am using fastreport version 6. I have the following HMTL text in the database.
     

    <font color="#0000ff">Test</font><div style=""><font color="#ff0000">Hello</font></div>

    When I read their docs, it says that adding frxMemo object and setting AllowHTMLTags := True will work fine, but the html command above returns the following result on the Fastreport screen. (I do not observe that the html is correct when I test it on online html systems as well.)

    Test<div style="">Hello</div>

    I understand from FastReport's description here that it supports some HTML commands. Does anyone have a solution for this. 

    *The issue is indirectly related to unigui. It is related to FastReport, but the user wants to see the color etc. of the notes he took and I am looking for a solution to this.

  6. 7 hours ago, Sherzod said:

    Can you try this workaround?

    function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) 
    {
        sender.getColumnManager().getColumns().forEach(function(col, i) {
            var field = sender.editingPlugin.getEditor().getForm().getFields().items.find(x => x.column.dataIndex === col.dataIndex);
            if (field) {
                field.readOnly = col.rdonly;
                if (field.readOnly === false) {
                    try {
                        field.inputEl.dom.removeAttribute('readonly')
                    } catch (err) {}
                } else {
                    try {
                        field.inputEl.dom.setAttribute('readonly', 'readonly')
                    } catch (err) {}
                }
            }
        });
    }

     

    What event should I write about?

  7. Hi,

    On the MSSQL side, I keep a field of Date type, this field is data entry via DBGrid.

    This is how the DateTimePickert to which the editor is connected on the DBGrid

    Very interesting data is coming. I expect it to behave like this when both displaying the Grdi data and entering the data. DD/MM/YYYY

    These are the corresponding server module Create event PFmtSettings.ShortDateFormat := 'dd/mm/yyyy'; I added it but nothing changed.

    What is the correct solution?

    * If I format the date on the SQL side, it does not enter the editing mode on the Grid this time. Datetimepicture does not detect it as a date.

    • Like 1
  8. 31 minutes ago, Sherzod said:

    Try this approach:

    UniDBGrid1.ClientEvents.ExtEvents ->

    function beforeedit(editor, context, eOpts)
    {
        if (editor.isRowEditor) {
            var form = editor.getEditor().form;
            form.getFields().each(function(field){
                if (field.column.rdonly) {
                    field.disable()
                }
            })
        }
    }

     

    @Sherzod Thank you for the answer. This is how my problem was solved.

  9. Hello

    When I set UnidbGrid RowEditor := True, all colons ReadOnly := True values can be changed.

    As a solution to this, putting the relevant components on the UniHiddenPanel and matching each colon solves the problem, but this is a very laborious way and I don't want to add unihidden panel to the fields I will display only.

    Is there an easy way to do this?

    In the attached example; Double click on any field in the grid, then try to make changes in the Salary field, which is ReadOnly, and you will see that the change has been made.

    GridEditors - Row Editor.zip

  10. 5 hours ago, Sherzod said:
    procedure TFSerbestCizim.btnVazgecClick(Sender: TObject);
    begin
    
      UniCanvas1.Color := clRed;
      UniCanvas1.Clear; //<--------
    
      //  FncUMGenel_ShowModal_Kapat(UniMainModule.ShowModalEkranNo,
      //    UniMainModule.SonucKod, UniMainModule.SonucAciklama);
    end;

     

    @Sherzod

    In your proposed solution; If the user wants to change the background color while drawing, you are clearing all their drawings, is there any way without clearing the drawings?

  11. 1 hour ago, Sherzod said:

    UniCanvas1.ClientEvents.ExtEvents ->

    function afterrender(sender, eOpts)
    {
        sender.getEl().on('resize', function(){
            ajaxRequest(sender, '_clear', {})
        });
    }

    UniCanvas1.OnAjaxEvent ->

    procedure TFSerbestCizim.UniCanvas1AjaxEvent(Sender: TComponent;
      EventName: string; Params: TUniStrings);
    begin
      if EventName = '_clear' then
      begin
        (Sender as TUniCanvas).Clear
      end;
    
    end;

     

    @Sherzod

     

    Changing the background color does not work when you add the codes you wrote, this problem occurs when you add your codes, I added an example.

    image.thumb.png.a132f99c25b2722c13302ca36823e2e5.png

    Test.zip

  12. 53 minutes ago, Sherzod said:

    UniCanvas1.ClientEvents.ExtEvents ->

    function afterrender(sender, eOpts)
    {
        sender.getEl().on('resize', function(){
            ajaxRequest(sender, '_clear', {})
        });
    }

    UniCanvas1.OnAjaxEvent ->

    procedure TFSerbestCizim.UniCanvas1AjaxEvent(Sender: TComponent;
      EventName: string; Params: TUniStrings);
    begin
      if EventName = '_clear' then
      begin
        (Sender as TUniCanvas).Clear
      end;
    
    end;

     

    @Sherzod

    Thanks for the solution, I've implemented it for now.

    I think you will inform the team for permanent solution.
    You're welcome, I'm grateful.

    • Upvote 1
  13. 1 hour ago, Sherzod said:

    but it doesn't work in my project, the background is always recorded as black in my project.

    @ Şerzod

    Hi,

    I managed to create the problem, Attached you can see the test file.

    The source of the problem is: The screen while drawing is normally green, but the background of the picture is black, the source of the problem is the Showmodal pop-up screen.

    This problem occurs when I do FShowModal2.WindowState := wsMaximized How can i solve it.

    Test.zip

×
×
  • Create New...