Radcombobox in radgrid

6 posts, 0 answers
  1. Keith
    Keith avatar
    94 posts
    Member since:
    Jun 2012

    Posted 18 Jul 2012 Link to this post

    I am using a column template with a radcombobox in a radgrid column, however, when the grid renders, the combobox does not show the dropdown button and it appears to grow in width when selected with a mouse click.

    If I use the developer tools in the browser, I can see the width of the combobox is set to 100%, however, it appears to overflow the cell into the adjacent cell. If I set the width of the combobox to a fixed width, say 150px, it shows as expected within the grid, however, I really need the combobox to grow and shrink with the cell width.

    It there a workaround? 
  2. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 23 Jul 2012 Link to this post

    Hello Keith,

    Take a look at the following online demo: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/comboingrid/defaultcs.aspx?product=combobox. The RadComboBox controls inside the RadGrid templates do not have a fixed width. How exactly is your scenario implemented?

    Regards,
    Ivana
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Keith
    Keith avatar
    94 posts
    Member since:
    Jun 2012

    Posted 23 Jul 2012 Link to this post

    I'll try to explain how my grid is implemented, but it is not like the sample. All rows are editable all the time. The user simply needs to click on the text in the row that they want to edit and it displays a combobox or textbox depending upon the need. In this way, there is no need to click an edit link or button and all changes are committed upon clicking a submit button.

    like so:

    <telerik:GridTemplateColumn AllowFiltering="false" DataField="ContactName" FilterControlAltText="Filter colContactName column" HeaderText="Facility Contact" UniqueName="colContactName">
       <ItemTemplate>
           <telerik:RadComboBox ID="cmbContactSelect" runat="server" AllowCustomText="true" />
           <asp:TextBox ID="txtContact" Text='<%# Bind("ContactName") %>' ForeColor="#d7d7d7" BackColor="Transparent" BorderStyle="None" runat="server" />
       </ItemTemplate>
       <HeaderStyle Width="100px" />
    </telerik:GridTemplateColumn>

    As you can see the column width is set to 100px.
    Due to design constraints, I have to use a textbox and a combobox.
    When the textbox displays, it does not exceed the cell width, the combobox however, flows into the adjacent cell.

    All editing and interaction is handled client-side using javascript.

  4. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 26 Jul 2012 Link to this post

    Hello Keith,

    Unfortunately I am not able to replicate the troubled scenario you experience, at my end. Here is what I have tested locally: http://screencast.com/t/EClxMHrngD.

    Could you please open a support ticket on the matter and send over a sample project with the issue demonstrated in it? This way we will be able to troubleshoot the very same scenario on which you are working on, and provide you with a solution for the issues if possible.

    All the best,
    Ivana
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Keith
    Keith avatar
    94 posts
    Member since:
    Jun 2012

    Posted 26 Jul 2012 Link to this post

    Well, I guess that is a problem. I'll try to put a sample project together, but I don't see how I can do that. My project is simply too large to post the whole thing.
    For now I am setting the width of the combobox to the width of the column in the codebehind, but it doesn't help when you have dynamic width columns.
  6. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 31 Jul 2012 Link to this post

    Hello Keith,

    You can upload file large up to 20MB via a support ticket. You can try to isolate the problem in a sample page and send us only the page.  This way we will try to replicate the issue locally based on the information given.

    Regards,
    Ivana
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top