hi Anupama Roy,
I''ve actually solve the previous post, but now i got a new problem.
i''ve attached 3 pictures of the problem...
The first picture is taken when my combo box drop down for the first time.
Second picture is when i mouse over my mouse on the drop down grid. which the columns width only change to what i set.
The last picture is what i really want my columns to be like.
i''m using the codes below to do it:
------------------------------------------------
GridListControl gcontrolShift = this.mcolShiftCode.ListControl as GridListControl;
gcontrolShift.Grid.PrepareViewStyleInfo += new GridPrepareViewStyleInfoEventHandler(ShiftGrid_PrepareViewStyleInfo);
void ShiftGrid_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
if (e.RowIndex > 0 && e.ColIndex > 1)
{
e.Style.Format = "t";
}
if (e.RowIndex == 0)
{
GridFontInfo fontinfo = new GridFontInfo();
fontinfo.FontStyle = FontStyle.Regular;
fontinfo.Bold = false;
fontinfo.Size = 8.25F;
fontinfo.Unit = GraphicsUnit.Point;
e.Style.Font = fontinfo;
switch (e.ColIndex)
{
case 1:
e.Style.Text = UIResx.ShopflowDataTracking.ShiftID;
e.Style.CellModel.Grid.ColWidths.SetSize(e.ColIndex, 100);
break;
case 2:
e.Style.Text = UIResx.ShopflowDataTracking.ShiftCode;
e.Style.CellModel.Grid.ColWidths.SetSize(e.ColIndex, 100);
break;
case 3:
e.Style.Text = UIResx.ShopflowDataTracking.StartTime;
e.Style.CellModel.Grid.ColWidths.SetSize(e.ColIndex, 100);
break;
case 4:
e.Style.Text = UIResx.ShopflowDataTracking.EndTime;
e.Style.CellModel.Grid.ColWidths.SetSize(e.ColIndex, 100);
break;
}
}
}
------------------------------------------------
This problem only occurs when i have more than 2 columns in my dropdown grid.
I hope the information tha i provide you sufficient...
Thanks in advance.. :)
Shift.zip