CommandCell Click

3 posts, 1 answers
  1. Troy Clemons
    Troy Clemons avatar
    69 posts
    Member since:
    Apr 2010

    Posted 24 Feb Link to this post

    is there a way to Change the Default Text in the commandcell upon click

     

    thanks in advance

  2. Answer
    Ralitsa
    Admin
    Ralitsa avatar
    176 posts

    Posted 26 Feb Link to this post

    Hello Troy,

    Thank you for contacting us. 

    The default text should be used when all cells have equal text and you can not change it. I can suggest you to set the UseDefaultText property to false. Then set the Value property of all command cells with code: 
    for (int i = 0; i < this.radGridView1.Rows.Count; i++)
    {
        this.radGridView1.Rows[i].Cells["CommandColumn"].Value = "test";
    }

    Then you can change the Value of command cell in handler in the CommandCellClick event. Please refer to the code snippet below: 
    void radGridView1_CommandCellClick(object sender, GridViewCellEventArgs e)
    {
        e.Row.Cells["CommandColumn"].Value = "Click " + DateTime.Now.Millisecond;
    }

    I hope this information is useful. Should you have further questions please do not hesitate to write back.

    Regards,
    Ralitsa
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Troy Clemons
    Troy Clemons avatar
    69 posts
    Member since:
    Apr 2010

    Posted 26 Feb Link to this post

    Works like a charm. Thank you
Back to Top