populate lable in the grid on combobox selectedindex

2 posts, 0 answers
  1. Rahul
    Rahul avatar
    14 posts
    Member since:
    Feb 2013

    Posted 09 Jun 2014 Link to this post

     I want to populate populate lable in the grid on combobox selectedindex when batchupdating is performed.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 10 Jun 2014 in reply to Rahul Link to this post

    Hi Rahul,

    Please try the below JavaScript code snippet to update the Label inside the RadGrid in OnClientSelectedIndexChanged event.

    <telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource"
        <MasterTableView CommandItemDisplay="Top" EditMode="Batch">
            <BatchEditingSettings EditType="Row" />
                <telerik:GridTemplateColumn DataField="OrderID" UniqueName="OrderID">
                        <telerik:RadComboBox ID="RadComboBox1" runat="server" EmptyMessage="select" OnClientSelectedIndexChanged="SelectedIndexChanged">
                <telerik:GridTemplateColumn UniqueName="Label">
                        <asp:Label ID="lblUpdate" runat="server">

    function SelectedIndexChanged(sender, args) {
        var row = Telerik.Web.UI.Grid.GetFirstParentByTagName(sender.get_element(), "tr");
        var label = $telerik.findElement(row, "lblUpdate");
        label.textContent = args._item._text;

Back to Top