Need Custom Column With List of Images

2 posts, 0 answers
  1. Brajendra
    Brajendra avatar
    6 posts
    Member since:
    Aug 2017

    Posted 05 Oct Link to this post

    Hi,

    I'm working on a project where I need to display data in Telerik RadGridView.

    One of the column is going to display icons (can be multiple, displayed horizontally). These icons will be provided from .resx file of the project.

    I was exploring custom column, tried creating custom column with RadPanelElement assuming that I'll be able to add picturebox windows control to the RadPanelElement object like

    protected override void SetContentCore(object value)
            {
                if (this.Value != null && this.Value != DBNull.Value)
                {
                    //this.radProgressBarElement.Value1 = Convert.ToInt16(this.Value);
                    //this.radImageList
                    foreach(string strImgIndex in this.Value.ToString().Split(','))
                    {
                        PictureBox pbIcon = new PictureBox();
                        switch (int.Parse(strImgIndex))
                        {
                            case 0:
                                pbIcon.Image = WindowsFormsApplication1.Properties.Resources.binoculars;
                                break;

                            case 1:
                                pbIcon.Image = WindowsFormsApplication1.Properties.Resources.open;
                                break;

                            case 2:
                                pbIcon.Image = WindowsFormsApplication1.Properties.Resources.printer;
                                break;
                        }

                        //this.radImageList.Controls.Add (NOT ABLE TO ADD CONTROLS DYNAMICALLY)
                        //pbIcon.Image = Image.
                    }
                }

    It didn't work as not able to add controls to RadPanelElement. Please provide a way out to achieve the required custom column.

    Thanks & Regards

    Brajendra Singh

     

  2. Lance | Tech Support Engineer, Sr.
    Admin
    Lance | Tech Support Engineer, Sr. avatar
    415 posts

    Posted 05 Oct Link to this post

    Hi,

    You've accidentally submitted this post under DataGrid for UI for UWP (Universal Windows Platform), not UI for Winforms. I have updated the topic for you so that it will be in the correct product forums.

    Regards,
    Lance | Tech Support Engineer, Sr.
    Progress 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
Back to Top