Activate editing template of a cell on click

4 posts, 0 answers
  1. papadi
    papadi avatar
    35 posts
    Member since:
    Nov 2008

    Posted 26 Sep 2012 Link to this post

    Hi!
    I have the following column in a grid. I want the editing mode for the corresponding cells to be activated when the user clicks on cell, which is occupied by my custom control.

    How can I do that?

    <telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn.CellTemplate>
            <DataTemplate>
            <my:ReferencesEditor References="{Binding Path=Answer.References}" />
            </DataTemplate>
        </telerik:GridViewDataColumn.CellTemplate>
        <telerik:GridViewDataColumn.CellEditTemplate>
            <DataTemplate>
            <my:ReferencesEditor References="{Binding Path=Answer.References}" EditMode="true" />
            </DataTemplate>
        </telerik:GridViewDataColumn.CellEditTemplate>
    </telerik:GridViewDataColumn>
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 26 Sep 2012 Link to this post

    Hello,

     You need to set the EditTriggers property of the column to be "CellClick". 

    All the best,
    Didie
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  3. UI for WPF is Visual Studio 2017 Ready
  4. papadi
    papadi avatar
    35 posts
    Member since:
    Nov 2008

    Posted 26 Sep 2012 Link to this post

    I'm afraid this does not work. The cell is covered by my custom control so the click event does not reach the grid.
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 26 Sep 2012 Link to this post

    Hi,

    In this case your custom control should handle your own logic if you've bypassed the grid default logic.

    Kind regards,
    Vlad
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

Back to Top