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
2005
Disable Hottrack for ValueList columns
posted

Hi,

I use UltraGrid in virtual mode. I wanted to disable hottrack feature on cells, so I set CellHottrackInvalidationStyle to CellHottrackInvalidationStyle.Never.

_grid.DisplayLayout.CellHottrackInvalidationStyle = CellHottrackInvalidationStyle.Never;

Everything worked as I expected.

However, when I loaded an isl file (Office2010Black.isl or Office2010Silver.isl) by using StyleManager.Load, hottracking was unexpectedly enabled for ValueList columns. Here is the code I setup a value list to a column:

private void SetDropdownValueList(IFieldInfo fieldInfo, UltraGridColumn column)
{
    var valueList = new BindableValueList
    {
        BindingContextControl = GridControl,
        DataSource = fieldInfo.DropdownValueList.ValueList
    };
    if (!string.IsNullOrEmpty(fieldInfo.DropdownValueList.ValueMember))
        valueList.ValueMember = fieldInfo.DropdownValueList.ValueMember;
    if (!string.IsNullOrEmpty(fieldInfo.DropdownValueList.DisplayMember))
        valueList.DisplayMember = fieldInfo.DropdownValueList.DisplayMember;
    column.ValueList = valueList;
    column.Style = ColumnStyle.DropDownList;
}

Could someone help me to solve this issue please?

Thanks,
Shaolin