This is a migrated thread and some comments may be shown as answers.

Activate editing template of a cell on click

3 Answers 143 Views
GridView
This is a migrated thread and some comments may be shown as answers.
papadi
Top achievements
Rank 1
papadi asked on 26 Sep 2012, 01:30 PM
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>

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 26 Sep 2012, 01:36 PM
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.

0
papadi
Top achievements
Rank 1
answered on 26 Sep 2012, 01:50 PM
I'm afraid this does not work. The cell is covered by my custom control so the click event does not reach the grid.
0
Vlad
Telerik team
answered on 26 Sep 2012, 01:52 PM
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.

Tags
GridView
Asked by
papadi
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
papadi
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or