BoldDeskPremium customer service software with affordable pricing: $10 for 3 agents. Try it for free.
// Adjust the properties in the Embedded Grid
cr.ListControlPart.Grid.ColWidths[1] = 30;
cr.ListControlPart.Grid.SetRowHidden(1,2,true);
Alignment:
----------
You can subscribe to the Grid''s PrepareViewStyleInfo to set the horizontal alignment.
((GridDropDownGridListControlPart)cr.ListControlPart).Grid.PrepareViewStyleInfo += new GridPrepareViewStyleInfoEventHandler(grid_PrepareViewStyleInfo);
private void grid_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
if(e.ColIndex == 2)
{
e.Style.HorizontalAlignment = GridHorizontalAlignment.Right;
}
}
DropDownSize:
-------------
You can avoid the width of the dropdown getting larger by explicitly setting the width to some fixed value by handling the CurrentCellShowingDropDown.
For example, setting it to the width to show all the columns.
//at bottom of CurrentCellShowingDropDown.....
int width = cr.ListControlPart.Grid.Model.ColWidths.GetTotal(0, cr.ListControlPart.Grid.Model.ColCount) + 16;
e.Size = new Size( width, e.Size.Height);
We have to address this issue.
Best Regards,
Jay N