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

Radcombobox in radgrid

5 Answers 165 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Keith
Top achievements
Rank 2
Keith asked on 18 Jul 2012, 09:06 PM
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? 

5 Answers, 1 is accepted

Sort by
0
Ivana
Telerik team
answered on 23 Jul 2012, 05:01 PM
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.
0
Keith
Top achievements
Rank 2
answered on 23 Jul 2012, 07:01 PM

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.

0
Ivana
Telerik team
answered on 26 Jul 2012, 01:23 PM
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.
0
Keith
Top achievements
Rank 2
answered on 26 Jul 2012, 02:35 PM
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.
0
Ivana
Telerik team
answered on 31 Jul 2012, 10:00 AM
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.
Tags
ComboBox
Asked by
Keith
Top achievements
Rank 2
Answers by
Ivana
Telerik team
Keith
Top achievements
Rank 2
Share this question
or