Hello Haneef,
Here a picture which shows error, even after having the code you suggested.
Regards,
Joseph
>Hi Haneef,
Find the needed code below which we wrote for displaying the OPEN?CLOSE values in the dropdown.
public interface ILabelValuePair:IDisposable
{
string Label
{
get;
set;
}
string Value
{
get;
set;
}
}
DataTable workTable = new DataTable("TICKET INFORMATION");
ILabelValuePair labelValuPair = new LabelValuePair();
Type pairColumnType = labelValuPair.GetType();
workTable.Columns.Add("Open/Close", pairColumnType);
//Open-Close Source List
ArrayList openCloseList = new ArrayList();
string[] statusOpenArray = {"OPEN", "OPEN"};
string[] statusCloseArray = {"CLOSE", "CLOSE"};
object[] statusArray = {statusOpenArray, statusCloseArray};
foreach(string[] status in statusArray)
{
ILabelValuePair ocPair = new LabelValuePair();
ocPair.Label = status[0]; ocPair.Value = status[1];
openCloseList.Add(ocPair);
}
//add a new sourcelistset
this.gridNewTicketInfo.Engine.SourceListSet.Add("OpenCloseList", openCloseList);
//add relation descriptor for Open/Close column
relationDescriptor = new GridRelationDescriptor();
relationDescriptor.Name = "Open/Close";
relationDescriptor.MappingName = "Open/Close";
relationDescriptor.ChildTableName = "OpenCloseList";
relationDescriptor.RelationKind = Syncfusion.Grouping.RelationKind.ListItemReference;
relationDescriptor.ChildTableDescriptor.Appearance.AlternateRecordFieldCell.BackColor = Color.Beige;
relationDescriptor.ChildTableDescriptor.VisibleColumns.Add("Label");
relationDescriptor.ChildTableDescriptor.AllowEdit = false;
relationDescriptor.ChildTableDescriptor.AllowNew = false;
relationDescriptor.ChildTableDescriptor.AllowRemove = false;
this.gridNewTicketInfo.TableDescriptor.Relations.Add(relationDescriptor);
relationDescriptor.ChildTableDescriptor.Columns["Label"].HeaderText = "Open/Close";
private void gridNewTicketInfo_TableControlCurrentCellShowingDropDown(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellShowingDropDownEventArgs e)
{
GridCurrentCell cc = e.TableControl.CurrentCell;
GridDropDownGridListControlCellRenderer cr =
cc.Renderer as GridDropDownGridListControlCellRenderer;
if(cr != null)
{
cr.ListControlPart.Refresh();
}
}
Regards,
Joseph
>Hi Pawan,
Is it possible for you to upload us a small sample or more details to reproduce the issue here? This will help us to analyse the issue further.
Best Regards,
Haneef
errorAgain.zip