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

Find HtmlTableCell in ItemTemplate of ComboBox

1 Answer 66 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Remya
Top achievements
Rank 1
Remya asked on 29 Feb 2012, 07:38 AM

Hi,

I am having a combobox like this,

 

<telerik:RadComboBox ID="txtDoctorId" runat="server" AutoPostBack="true" AllowCustomText="true"

 ExpandAnimation-Type="Linear" CollapseAnimation-Type="Linear" Width="300px" EnableLoadOnDemand="true"

 Filter="Contains">

 <HeaderTemplate>

 <table>

 <tr>  

<td style="width: 80px;">

 Code

</td>

 <td style="width: 220px;">

 Consultant Name

 </td>

 </tr>

 </table>

 </HeaderTemplate>

 <ItemTemplate>

 <table>

 <tr id="cmbRow">

 <td id="cellCode" style="width: 80px">

 </td>

 <td id="cellName" style="width: 220px">

  </td>

 </tr>

 </table>

 </ItemTemplate>

 </telerik:RadComboBox>

 I have to find the htmltablecell inside the itemtemplate during itemdatabound

plz help me..Thnx in advance....

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 29 Feb 2012, 09:06 AM
Hello,

Try the following code.
C#:
protected void txtDoctorId_ItemDataBound(object sender, Telerik.Web.UI.RadComboBoxItemEventArgs e)
 {
  HtmlTable cell = (HtmlTable)txtDoctorId.Items[0].FindControl("TableID");
  HtmlTableCell cel = (HtmlTableCell)cell.FindControl("cellCode");
 }

Thanks,
Princy.
Tags
ComboBox
Asked by
Remya
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or