Question about GridDropDownColumn

3 posts, 0 answers
  1. J
    J avatar
    143 posts
    Member since:
    Jun 2006

    Posted 30 Mar 2010 Link to this post

    I have a RadGrid with a GridDropDown column:

    <telerik:RadGrid ID="DGrid" runat="server" AutoGenerateColumns="False" 
        Width="100%" AllowAutomaticDeletes="True" GridLines="None" OnItemDataBound="DGrid_ItemDataBound" 
        OnNeedDataSource="DGrid_NeedDataSource" OnInsertCommand="DGrid_InsertCommand" 
        OnUpdateCommand="DGrid_UpdateCommand" OnDeleteCommand="DGrid_DeleteCommand" 
        <mastertableview commanditemdisplay="Bottom" editmode="InPlace">  
            <HeaderStyle Wrap="false" /> 
                <HeaderStyle Width="20px"></HeaderStyle> 
                <HeaderStyle Width="20px"></HeaderStyle> 
                <telerik:GridDropDownColumn DataField="Id" UniqueName="Id" 
                    ListValueField="SystemID" ListTextField="SystemName" HeaderText="D" 
                    ItemStyle-Wrap="false" ItemStyle-Font-Names="Arial" ItemStyle-Width="500px">  
                       <ItemStyle Font-Names="Arial" /> 
                <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" ButtonType="LinkButton" > 
            <Selecting AllowRowSelect="false" /> 

    My questions are:
    How do I specify that the box that holds the values in the dropdownlist needs to be X pixels wide?
    The text that shows up in the RadCombobox, how do you set the style? 

    Just not sure where to find the answers.

  2. robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 30 Mar 2010 Link to this post

    This help article should be of use to you:

    I hope that helps.
  3. DevCraft R3 2016 release webinar banner
  4. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 31 Mar 2010 Link to this post


    You can specify the width of RadComboBox in pixels using the Unit.Pixel property and the text in RadComboBox can be styled by using the radcombo properties ForeColor, Font, Bold etc. Check out the sample code below.


     void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
      if (e.Item is GridEditableItem && e.Item.IsInEditMode) 
        GridEditableItem editedItem = e.Item as GridEditableItem; 
        RadComboBox radComboBox = (RadComboBox)editedItem["GridDropDownColumn1"].Controls[0];   
        radComboBox.Width = Unit.Pixel(500); 
        radComboBox.ForeColor = System.Drawing.Color.Red; 
        radComboBox.Font.Bold = true
    You can find a related topic here: Change the appearance of the Input element

Back to Top