Hello All,
I have a Boolean column in grid which is in CardView, By default it displays the checkbox in the center of the cell, Is there any way i can change the alignment of this checkbox (i.e. To the left).
And how can we make a cell multiline in carview?
Thanks in advance.
Thanks a lot Mike. It worked !
Hi,
You can control the alignment of the checkbox using an editor. You only need to create one editor for all of the CheckBox columns you want to align the same way.
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; UltraGridBand band = layout.Bands[0]; band.CardView = true; CheckEditor checkEditor = new CheckEditor(); checkEditor.CheckAlign = ContentAlignment.MiddleLeft; band.Columns["Boolean 1"].Editor = checkEditor; band.Columns["Boolean 2"].Editor = checkEditor; }
Thank you rufus for your reply but the problem is that both of your mentioned solution do not work if the gird is in CardView I've already tested these options. There is only one row exists when the grid is in Card view because we are dealing with only one record.
Sorry forgot to write about making cell multiline
in the grid's initializelayout event
e.Layout.Bands(0).Columns("Name of Cell"/Cell Index).CellMultiLine = True
Hi Ali,
You can do one thing.After loading the grid with the data use a for loop and count till the grid.rows.count-1
in the loop u can set the cells Text align property
For i as integer=0 to Grid.Rows.Count-1
Grid.Rows(i).cells("Cell Name"/Cell Index).Appearance.TextHAlign=H.Align.Left
Next
I have used it and its working...u check it and see...If helps do verify the answer.
Regards,
Carlton Rufus