Different Editors

3 posts, 0 answers
  1. Sergio
    Sergio avatar
    2 posts
    Member since:
    Mar 2015

    Posted 02 Mar 2015 Link to this post

    Hi,

    I have a gridview with two columns. 

                this.radGridDettagli.MasterTemplate.Columns.Add(newGridViewTextBoxColumn("Name", "Name"));
                this.radGridDettagli.MasterTemplate.Columns.Add(new GridViewTextBoxColumn("Value", "Value"));

    The column "Value" could contains different object types. Decimals, String, Date, Enum, etc, ect.

    I would like, to use different editors based on the cell value of my column "Name".

    Example

    Cell value of column "Name" is "ExpiryDate" I need RadDateTimePicker to edit the cell "Value" or the same row
    Cell value of column "Name" is "Quantity" I need RadSpinEditor to edit the cell "Value" or the same row
    Cell value of column "Name" is "OrderState" I need RadDropDownList to edit the cell "Value" or the same row

    RadSpinEditor for numbers, RadDropDownList in case of Enum, RadDateTimePicker in case of Date, RadTextBox in case of string.

    Somebody could help me ?

    Thanks.

    Sergio



  2. Sergio
    Sergio avatar
    2 posts
    Member since:
    Mar 2015

    Posted 03 Mar 2015 in reply to Sergio Link to this post

    Someone could help me ?

    Thanks.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 03 Mar 2015 Link to this post

    Hello Sergio,

    Thank you for writing.

    The RadGridView.EditorRequired is the first event that fires when a cell is to become editable (edit mode). Here is the appropriate place where you can specify what kind of an editor should be used by setting the EditorRequiredEventArgs.EditorType property. Additionally, you can use custom editors if the default one are not suitable for editing the underlying data object.

    I hope this information helps. Should you have further questions, I would be glad to help.

    Regards,
    Dess
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top