Home Forums WinForms controls Xceed Grid for WinForms Single Click Edit

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #14410 |

    Hi,
    I am using windows link label as my editor and it doesn’t work properly when I set the single click edit = true.

    This happens when the grid has multiple rows(more than 1). If the first row is the selected row and if you try to click on any other row’s editor(link label)(say 3 rd row) it changes the link label’s text to the first rows text.

    LinkLabel l = new LinkLabel();

    grid1.Columns[“COL”].CellViewer = new ControlViewer( l, “Text” );

    grid1.Columns[“COL”].CellEditor = new CustomEditor( l, “Text”, true );

    It works properly when single click edit = false but this takes 2 mouse clicks for the user instead of one.

    Thanks

    Imported from legacy forums. Posted by xUser (had 2227 views)

    User (Old forums)
    Member
    Post count: 23064

    Here is a work around

    grid1.DataRows[0].Cells[0].MouseEnter +=new EventHandler(Form1_MouseEnter);

    }

    private void Form1_MouseEnter(object sender, EventArgs e)
    {
    Cell cell = ( Cell )sender;

    if( !cell.IsBeingEdited )
    cell.EnterEdit();

    }

    This way you will see the right cursor and you will be able to single Click the LinkLabel. You do not need to set the SingleClickEdit to True with my work around.

    Imported from legacy forums. Posted by Matt (had 3082 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.