Hi
Same question that I asked here about UltraComboEditor i would like to ask about UltraGrid.
How do I align the column/cell dropdown to the left ? not the text its self, i mean the whole dropdown box.
i am using :
ugExcel.DisplayLayout.Bands[1].Columns[
"mycolumn"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDown;with ValueList
during runtime i could see that for the specific column/cell ultraGrid.ActiveCell.EditorResolved is EditorWithCombo. I looked over the Class Members here but couldn't find anything
as Mike kindly helped me, for UltraComboEditor the answer was the RightAlignDropDown property. What whould be the parallel property in UltraWinGrid or more specifically EditorWithCombo ?
I dont mind it to be on the Column level or Cell level.
any thoughts?
The property is on the ValueList and it's called DropDownListAlignment.
Thanks Mike,
I've managed to use the property that you've mentioned on a new valuelist
luckly i am bringing the valuelist from a different datatable so i had what i needed and added your suggestion.
ValueList vl = new ValueList();vl.DropDownListAlignment = DropDownListAlignment.Left; // <--- Mikeforeach (DataRow dr in ds.Tables[0].Select("....")){ vl.ValueListItems.Add(dr["MyColID"].ToString(), dr["MyColTxt"].ToString());}ugExcel.DisplayLayout.Bands[1].Columns["ColName"].ValueList = vl;
so now it appears as i wanted it to, alligned to the left edge
but my question is, why couldn't i find the DropDownListAlignment property on the Column level valuelist nor the Cell level valuelist ?
ug.DisplayLayout.Bands[1].Columns[
"Skills"].ValueList.?
ug.ActiveCell.ValueList.?
Now I understand.
Hi,
That's because the ValueList property of the cell/column does not return a ValueList, it returns an IValueList (interface). The column/cell can support other object as the ValueList, such as UltraDropDown - so the type of the property cannot be a concrete type, it has to be an interface.
So if you want to set properties on the ValueList that is assigned to the column, you have to cast it to a ValueList first.