This is a migrated thread and some comments may be shown as answers.

Set width to columns in MultiColumnBox inside RadGridView

1 Answer 73 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kamran Hussain
Top achievements
Rank 1
Kamran Hussain asked on 15 Feb 2010, 02:36 PM
Hi...

 I have a MultiColumnBox in RadGridView and i have three columns in the MultiColumnBox. I am unable to find any property that sets their width. there is a width property that sets the overall MultiColumnBox width but no proerty that set the inner columns ( database fields it contains ) width....

1 Answer, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 17 Feb 2010, 04:12 PM
Hi Kamran Hussain,

Thank you for your question.You can access the inside grid control in the RadMultiColumnComboBoxElement and set its columns properties. Please, consider the following code:

void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
    RadMultiColumnComboBoxElement element = this.radGridView1.ActiveEditor as RadMultiColumnComboBoxElement;
    if (e.ColumnIndex == 5 && element != null)
    {
        element.EditorControl.Columns[0].Width = 120;
    }
}

I hope this helps. Do not hesitate to contact me again if you have other questions.

Greetings,
Martin Vasilev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Kamran Hussain
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Share this question
or