I had a rad combo box with an itemtemplate like this?
<telerik:RadComboBox ID="Radcmb_LabelsFor_AllMails" runat="server" >
<ItemTemplate>
<table width="100%">
<tr>
<td width="9%" align="left" > <asp:CheckBox runat="server" ID="chk_CheckLabel" Checked="true"/> </td>
<td align="left"> <asp:Label runat="server" ID="lbl_LabelName">
<%# Eval("Label") %>
</asp:Label> </td>
<td align="right"> <asp:ImageButton ID="imgbtn_Delete" runat="server"
ImageUrl="~/Styles/Images/Webmail_Images/delete.gif" Width="10" Height="10"
OnClick="imgbtn_Delete_Click" /> </td>
</tr>
</table>
</ItemTemplate>
</telerik:RadComboBox>
In Cs Page
I am binding like this
Radcmb_LabelsFor_AllMails.DataSource = FolderDs;
Radcmb_LabelsFor_AllMails.DataTextField = "Label";
Radcmb_LabelsFor_AllMails.DataBind();
and defining an template after the binding
Radcmb_LabelsFor_AllMails.ItemTemplate = new CreateLabelTemplate();
public void InstantiateIn(Control container)
{
btn_CreateLabel.Text = "Create";
container.Controls.Add(btn_CreateLabel);
btn_CreateLabel.EnableViewState = false;
btn_CreateLabel.Font.Size = 8;
btn_CreateLabel.Font.Name = "Verdana";
btn_CreateLabel.Attributes.Add("OnClick", "return CheckLabelName()");
}
Every thing worked fine...
But now when i click on image button delete of item template i want to delete the radcomboboxitem? how to do this? i stucked here..My event is raising..but i failed to track the radcomboboxitem index?
<telerik:RadComboBox ID="Radcmb_LabelsFor_AllMails" runat="server" >
<ItemTemplate>
<table width="100%">
<tr>
<td width="9%" align="left" > <asp:CheckBox runat="server" ID="chk_CheckLabel" Checked="true"/> </td>
<td align="left"> <asp:Label runat="server" ID="lbl_LabelName">
<%# Eval("Label") %>
</asp:Label> </td>
<td align="right"> <asp:ImageButton ID="imgbtn_Delete" runat="server"
ImageUrl="~/Styles/Images/Webmail_Images/delete.gif" Width="10" Height="10"
OnClick="imgbtn_Delete_Click" /> </td>
</tr>
</table>
</ItemTemplate>
</telerik:RadComboBox>
In Cs Page
I am binding like this
Radcmb_LabelsFor_AllMails.DataSource = FolderDs;
Radcmb_LabelsFor_AllMails.DataTextField = "Label";
Radcmb_LabelsFor_AllMails.DataBind();
and defining an template after the binding
Radcmb_LabelsFor_AllMails.ItemTemplate = new CreateLabelTemplate();
public void InstantiateIn(Control container)
{
btn_CreateLabel.Text = "Create";
container.Controls.Add(btn_CreateLabel);
btn_CreateLabel.EnableViewState = false;
btn_CreateLabel.Font.Size = 8;
btn_CreateLabel.Font.Name = "Verdana";
btn_CreateLabel.Attributes.Add("OnClick", "return CheckLabelName()");
}
Every thing worked fine...
But now when i click on image button delete of item template i want to delete the radcomboboxitem? how to do this? i stucked here..My event is raising..but i failed to track the radcomboboxitem index?