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