Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
790
xamgrid cell edit
posted

Hello,

I have a template column with Text and buton in the CellControl Template. When cell is in edit mode, the text is displayed in TextBox, otherwise in TextBlock

Currently when i click the button the entire cell enters into edit mode, so TextBox is displayed. 

what do i need to do in order the cell will enter edit mode only on clicking the TextBlock ? 

I tried setting e.handle=true on button click event. but it doesn't help. 

Parents
No Data
Reply
  • 35319
    posted

    Hello,

     

    I have been looking into your question and I have managed to achieve the functionality that you are looking for by handling the ‘CellEnteingEditMode’ event of the XamGrid like e.g. :

     

         private void MyGrid_CellEnteringEditMode(object sender, Infragistics.Controls.Grids.BeginEditingCellEventArgs e)

            {

                     if (e.Cell.Column is TemplateColumn && !(Mouse.DirectlyOver is TextBlock))

                      {

                            e.Cancel = true;

                      }

     

    If you need any further assistance on this matter, feel free to ask.

Children