Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
Wingrid child row using cardview and left align, the text disappears when scroll bar is visible
posted

Hi everyone, first time poster here so please go easy on me.

I have a problem with a child row which is using CardView with TextAlign set to HAlign.Right and Autofit set to true. Everything works fine unless the grid is too small to display the contents of the grid,  the vertical scroll bar appears and only part of the card is visible. Once this happens lots of events seem to cause the text in the Card to scroll to the right. MouseOver the card, click on the scroll bar, release the scroll bar, click on the card, etc, and with each event the text scrolls to the right  and disappears from view. If i set the text alignment to left then everything works great, but we'd prefer not to do this if possible. I was wondering if anybody had any ideas, maybe it's a simple setting that I'm missing?

Here's the code just to give you an idea of what I'm about. You can see I've created a custom dataset just to keep things simple. Any help anybody could offer would be greatly appreciated.

Thanks in advance,

Dave

private DataSet1 ds = new DataSet1();
public Form1()
{
    InitializeComponent();
    this.Width = 300;
    this.Height = 300;
    this.ultraGrid1.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(ultraGrid1_InitializeLayout);

    DataSet1.DataTable1Row Row1 = ds.DataTable1.AddDataTable1Row("test1", "test2");
    ds.DataTable3.AddDataTable3Row(Row1, "3Test1xxxxxxx", "3Test2xxxxxxxx", "3Test3xxxxxxxxx", "3Test4xxxxxxx", "3Test5xxxxxxxxxxxxxxxxxx");

    this.ultraGrid1.DataSource = ds;

    this.ultraGrid1.Rows.ExpandAll(true);
}

void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{

    e.Layout.Bands[1].Columns["3Test1"].Layout.Appearance.TextHAlign = HAlign.Right;

    e.Layout.Bands[1].CardView = true;
    e.Layout.Bands[1].CardSettings.AutoFit = true;
    e.Layout.Bands[1].CardSettings.Style = CardStyle.StandardLabels;
    e.Layout.Bands[1].CardSettings.ShowCaption = true;
    e.Layout.Bands[1].CardSettings.CardScrollbars = CardScrollbars.None;
    e.Layout.Bands[1].CardSettings.LabelWidth = 120;
    e.Layout.Bands[1].CardSettings.MaxCardAreaCols = 1;
    e.Layout.Bands[1].CardSettings.MaxCardAreaRows = 1;
}

 

Parents Reply Children
No Data