Wijmo grid inline ng-template editing

Posted by: pmithilesh on 23 April 2020, 12:03 am EST

    • Post Options:
    • Link

    Posted 23 April 2020, 12:03 am EST

    Hi,

    I have a wijmo grid with inline ng-template module which contains the Textbox

    I get blue line around the control and when i click on that blue border it goes inside and show me object object

    How i can fix not to go inside the cell

    Please find attached image and code

    <wj-flex-grid #flex [itemsSource]=“source”

    [allowAddNew]=“true”

    [allowDelete]=“true”

    [selectionMode]=“‘RowRange’”>

                                      <wj-flex-grid-column header="*a" binding="se" [width]="150">
                                        <ng-template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell" let-item="item">
                                        <container style="width:100%" style="color:black">
                                        </container>
                                       
                                        </ng-template>
                                    </wj-flex-grid-column>
                        </wj-flex-grid>[img]https://gccontent.blob.core.windows.net/forum-uploads/file-6ac44fb8-1e2f-438f-8bea-01eec7c733f4.JPG[/img]
    
  • Posted 23 April 2020, 2:56 am EST

    Hi,

    We are sorry but we were unable to replicate the issue at our end. Please refer to the sample link below that we used to replicate the issue:

    https://stackblitz.com/edit/angular-mvqutq

    Can you let us know whether we are missing something or you may also modify the above sample so that it reproduces the issue.

    Regards,

    Ashwin

  • Posted 23 April 2020, 9:41 am EST

    Hi Ashwin,

    Thanks for the reply

    Created a small code for sample

    https://stackblitz.com/edit/angular-nh2ajz?file=src/app/app.component.html

    it will show a blue border and when you click on it the input textbox will be gone

    Thanks

  • Posted 24 April 2020, 12:59 am EST

    Hi,

    It seems that the link that you provided is not updated and is same as the sample that I provided. Can you please make sure that you have updated the sample?

    Also, according to your original post, it seems that the binding property is not a primitive type like string or number, but is a complex type. So when you start editing the cell, it displays [object, object] instead of the showing the value.

    It seems that your issue is with editing on the cell. You can disable the editing by setting the isReadOnly property of the column to true:

    <wj-flex-grid-column header="*a" binding="se" [width]="150" [isReadOnly]="true">...</wj-flex-grid-column>
    

    ~regards

  • Posted 24 April 2020, 2:20 am EST

    Hi Ashwin

    Sorry i forgot to save the solution.I got the issue working with the help of your suggestion

    https://stackblitz.com/edit/angular-m7adym?file=src/app/app.component.html

    Thanks so much

    I got another issue with solution i have requirement of disable the cell for particular condition i have flag on the data model disable if its true i want to disable that cell not the entire column

  • Posted 27 April 2020, 12:27 am EST

    Hi,

    While creating the cell using ng-template, you can set the ‘wj-state-disabled’ class on the disabled cells. Refer to the updated sample below:

    https://stackblitz.com/edit/angular-aaqbbj

    ~regards

  • Posted 29 April 2020, 12:41 am EST

    Hi Ashwin,

    Thanks for the solution it worked great

  • Posted 1 May 2020, 4:02 pm EST - Updated 3 October 2022, 4:22 pm EST

    Hi Ashwin

    I have a requirement for Grid to have filtering but sorting is disable i was able to fix it but the filter has ascending descending option on it how i can remove/disable those options when filter is open from column header

    Please find the attached image

  • Posted 1 May 2020, 4:26 pm EST

    Hi I got it working by setting showSortButtons property to false Thanks

  • Posted 1 May 2020, 4:26 pm EST

    Hi I got it working by setting showSortButtons property to false Thanks

  • Posted 4 May 2020, 12:18 am EST

    Hi,

    We are glad that you were able to resolve the issue. Let us know in case you run into any further issues.

    ~regards

  • Posted 6 May 2020, 8:48 pm EST

    Thanks Ashwin,

    I have few issues with wj-combo-box

    i was looking for pop up to open if user select the item in combo box with YES/NO

    For yes it can change the value and for no it should not do any thing

    Can you guide me with better solution for this

    Thanks

  • Posted 7 May 2020, 2:15 am EST

    Hi,

    Can you please elaborate the requirements? As per our understanding, you have a ComboBox with two values, yes and no and a Popup. But, what we do not understand is whether the popup should be displayed when the yes value is selected in Popup or the combobox should be displayed inside the popup.

    Also, which value are you referring to? The value of the combobox or any other value.

    Please explain your use case so that we may assist you further.

    ~regards

  • Posted 7 May 2020, 9:57 am EST

    Hi Ashwin,

    Sorry for that

    1)I have combo box with 15 items in it

    2)When user select any item in combo box there are few other controls like text box etc which gets reflected with different values based on combo box selection.

    3)when user select the combo box item we need to have confirmation pop up with yes/no for the user

    4)When user select yes combo box will have new selected item

    5)when user selects no combo box will not do any thing it will cancel that event

    Thanks

  • Posted 8 May 2020, 1:28 am EST

    Hi,

    For this, you may handle the selectedIndexChanged event of the ComboBox. Also, you will need to save the old selectedIndex which can be used to update the ComboBox to the previous value if No is clicked.

    In the event handler, check whether, the old index is not equal to the new index and display the Popup accordingly.

    https://stackblitz.com/edit/ckkyne-thdbef

    Also, can you please create a different thread for each different issue because it will be easier for other people who are facing similar issue to search.

    ~regards

  • Posted 10 May 2020, 5:24 pm EST

    Hi Ashwin,

    Sorry will create a new thread for each issue thats easier

    I got the pop up example working thanks so much for help

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels