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

radComboBox ItemDelete?

2 Answers 46 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Bhuvan
Top achievements
Rank 1
Bhuvan asked on 09 Mar 2011, 08:14 AM
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?

2 Answers, 1 is accepted

Sort by
0
Bhuvan
Top achievements
Rank 1
answered on 09 Mar 2011, 10:11 AM
hey i got it
0
GTL Dev
Top achievements
Rank 2
answered on 13 May 2015, 05:02 PM
"hey i got it" is a little vague, care to share with people how you resolved your issue.
Tags
ComboBox
Asked by
Bhuvan
Top achievements
Rank 1
Answers by
Bhuvan
Top achievements
Rank 1
GTL Dev
Top achievements
Rank 2
Share this question
or