Styling custom grid cell elements in OpenEdge

3 posts, 0 answers
  1. Mike
    Mike avatar
    4 posts
    Member since:
    Oct 2008

    Posted 05 Apr Link to this post

    I'm trying to implement a sample like this here

    http://docs.telerik.com/devtools/winforms/gridview/cells/creating-custom-cells

    In Progress OpenEdge. Unfortunately the ABL does not support overriding of properties, so I cannot achieve this here:

     

     protected override Type ThemeEffectiveType

    {

        get { return typeof(GridDataCellElement);}

    }

     

    Is there any other way of inheriting the style from the base element type?

  2. Hristo Merdjanov
    Admin
    Hristo Merdjanov avatar
    710 posts

    Posted 05 Apr Link to this post

    Hello Mike,

    Thank you for writing.

    The ThemeEffectiveType property is read a number of times while your application is being initialized by an ItemStateManager object responsible for setting its initial state. Since in ABL you are not able to override the property you can still achieve your task by overriding the InitializeFields method of you custom class and by setting its ThemeRole property to equal the name of your base class. 

    I understand that you are following the example here, so the custom class can look like this: 
    public class ProgressBarCellElement : GridDataCellElement
    {
        public ProgressBarCellElement(GridViewColumn column, GridRowElement row)
            : base(column, row)
        {
             
        }
     
        protected override void InitializeFields()
        {
            base.InitializeFields();
     
            this.ThemeRole = "GridDataCellElement";
        }
     
        //....
    }

    I hope this helps. Please let me know if you need further assistance.

    Regards,
    Hristo Merdjanov
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Mike
    Mike avatar
    4 posts
    Member since:
    Oct 2008

    Posted 05 Apr in reply to Hristo Merdjanov Link to this post

    Works like a charm! Thanks!!!
Back to Top