c1-auto-complete in flexgrid column

Posted by: sebastian73 on 27 August 2020, 1:21 am EST

  • Posted 27 August 2020, 1:21 am EST

    Hi, I need some help to use an autocomplete control as a custom editor in a flexgrid column. I'm trying something like:


    <c1-flex-grid id="definicionPozos" auto-generate-columns="false" allow-add-new="true" selection-mode="Cell">
    <c1-flex-grid-column name="Prueba" header="prueba">
    <c1-flex-grid-cell-template>
    <c1-auto-complete selected-value-path="PozoId" display-member-path="Codigo" style="width:100%" >
    <c1-items-source source-collection="@Model.Pozos"></c1-items-source>
    </c1-auto-complete>
    </c1-flex-grid-cell-template>
    </c1-flex-grid-column>
    </c1-flex-grid>


    I was looking the examples provided, but I can't match them to my needs.
    Is it possible to get some example on how to implement a custom editor between a view in mvc Core?

    Thanks!
  • Replied 27 August 2020, 3:53 pm EST

    Hi,
    Your code is correct but incomplete. Please refer to the following code snippet and the online demo sample for reference:
    https://demos.componentone.com/ASPNET/5/MVCExplorer/FlexGrid/CustomEditors
    <c1-flex-grid id="definicionPozos" auto-generate-columns="false" allow-add-new="true" selection-mode="Cell">
    <c1-flex-grid-column name="Prueba" header="prueba" binding="prueba">
    <c1-flex-grid-cell-template is-editing="true">
    <c1-auto-complete selected-value-path="PozoId" display-member-path="Codigo" style="width:100%" template-bindings="@(new {Text="prueba"})">
    <c1-items-source source-collection="@Model.Pozos"></c1-items-source>
    </c1-auto-complete>
    </c1-flex-grid-cell-template>
    </c1-flex-grid-column>
    </c1-flex-grid>

    Hope it helps!

    Regards,
    Manish Gupta
Need extra support?

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

Learn More

Forum Channels