radComboBox ItemDelete?

3 posts, 0 answers
  1. Bhuvan
    Bhuvan avatar
    50 posts
    Member since:
    Dec 2010

    Posted 09 Mar 2011 Link to this post

    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. Bhuvan
    Bhuvan avatar
    50 posts
    Member since:
    Dec 2010

    Posted 09 Mar 2011 Link to this post

    hey i got it
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. GTL Dev
    GTL Dev avatar
    12 posts
    Member since:
    May 2011

    Posted 13 May 2015 Link to this post

    "hey i got it" is a little vague, care to share with people how you resolved your issue.
Back to Top