Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
19403 | Sep 24,2004 07:01 PM UTC | Sep 24,2004 10:24 PM UTC | WinForms | 2 |
![]() |
Tags: GridControl |
// 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 This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.