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

Bad visualization of a RadComboBox in a RadGrid

4 Answers 110 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Lasuncion
Top achievements
Rank 2
Lasuncion asked on 16 Oct 2012, 04:07 PM


Hi, I have a grid with some rows, for each row I have an radcombobox but this is showed with a bad visualization. I've attached how can I see this error and I pasted the code of this.
Could you help me? Thanks in advance

 

 

<telerik:RadGrid ID="grd" runat="server" OnItemDataBound="grd_ItemDataBound">

<MasterTableView CommandItemDisplay="Top" AutoGenerateColumns="False" >
<Columns>

 ....
<

telerik:GridTemplateColumn HeaderText="Status">

 <ItemTemplate>

 <telerik:RadComboBox ID="RadComboStatus" Width="90px" DataValueField="idStatus"

DataTextField="Description" runat="server" />

</ItemTemplate>

</telerik:GridTemplateColumn>

 ...

 

 

protected void grd_ItemDataBound(object sender, GridItemEventArgs e)

{

   RadComboBox combotaxStatus = (RadComboBox)e.Item.FindControl("RadComboStatus");

   combotaxStatus.DataSource =

TaxStatusFactory.getStatus();

   combotaxStatus.SelectedValue = _Status;

   combotaxStatus.Attributes.Add(

"txt", String.Concat("lblXXX", "XXX", idContrato));

   combotaxStatus.Attributes.Add(

"txt", String.Concat("lblXXX", "XXX", idContrato));

   combotaxStatus.Attributes.Add(

"txt", String.Concat("lblXXX", "XXX", idContrato));

 

   combotaxStatus.OnClientSelectedIndexChanged = 

"OnClientSelectedIndexChanged";
   combotaxStatus.DataBind();

}

4 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 19 Oct 2012, 01:23 PM
Hello,

I am afraid that I do not understand correctly what is the problem. Could you elaborate a bit more on the issue?

I have created a sample project to test your case, but it works as expected on my side. Give it a try and check whether it works on your end.

Regards,
Andrey
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
Lasuncion
Top achievements
Rank 2
answered on 22 Oct 2012, 08:03 AM
Hi Andrey,

I can't open the zip file "Cannot open file: it does not appear to be a valid archive".

I added a new captured screen and you can see like two combos in the same cell, two concatenates combos and I oply want one of them.

The Telerik version is exactly the 2010.1.309.35. Ther error is the same in IE8, Firefox 10.0.2 aand chrome 22.0.

Thanks,
Miguel
0
Lasuncion
Top achievements
Rank 2
answered on 22 Oct 2012, 02:33 PM
Done, the problem was caused by:

.RadGrid

.rgRow td, .RadGrid .rgAltRow td  

{

 

 padding-right: 3px !important;

 padding-left: 3px !important;

}

0
Andrey
Telerik team
answered on 24 Oct 2012, 01:22 PM
Hello,

Yes, that was my next suggestion, to check whether there are any custom styles that could cause this behavior.

I am glad that the issue is now resolved.

Kind regards,
Andrey
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
Ajax
Asked by
Lasuncion
Top achievements
Rank 2
Answers by
Andrey
Telerik team
Lasuncion
Top achievements
Rank 2
Share this question
or