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

Access NoRecordsTemplate Control at Client-side

3 Answers 95 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Venu
Top achievements
Rank 1
Venu asked on 04 Sep 2012, 06:13 AM
hello,
how to Access NoRecordsTemplate control Using Javascript/jquery?

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 04 Sep 2012, 07:12 AM
Hi Venu,

Try the following code snippet to achieve your scenario.

ASPX:
<NoRecordsTemplate>
     <asp:Label runat="server" ID="lblNoRecords" CssClass="label"></asp:Label>
</NoRecordsTemplate>

JS:
<script type="text/javascript">
    $(document).ready(function () {
                $(".label").text("NewText");
    });
</script>
Please take a look into this for more information.

Hope this helps.

Regards,
Princy.
0
Venu
Top achievements
Rank 1
answered on 04 Sep 2012, 07:19 AM
Hello Princy,

thanks for your Reply 

my Code is look like this:

<NoRecordsTemplate>
                        <table>
                            <tr>
                                <tr>
                                    <td>
                                        <telerik:RadTextBox ID="NRLanguage" runat="server">
                                        </telerik:RadTextBox>
                                        <asp:RequiredFieldValidator ID="rfvLanguage" runat="server" ControlToValidate="NRLanguage"
                                            ErrorMessage="*" ForeColor="Red" ValidationGroup="NR"/>
                                    </td>
                                    <td>
                                        <asp:CheckBox ID="NRRead" runat="server" />
                                    </td>
                                    <td>
                                        <asp:CheckBox ID="NRWrite" runat="server" />
                                    </td>
                                    <td>
                                        <asp:CheckBox ID="NRSpeak" runat="server" />
                                    </td>
                                  </tr>
                                <tr>
                                    <td colspan="4" align="right">
                                        <telerik:RadButton ID="rbAddMore" runat="server" Text="Add More" CommandName="ADD" 
                                            ValidationGroup="NR">
                                        </telerik:RadButton>
                                    </td>
                                </tr>
                        </table>
                    </NoRecordsTemplate>
how can i find checkbox control using javascript
0
Jayesh Goyani
Top achievements
Rank 2
answered on 04 Sep 2012, 07:57 AM
Hello,

var chkNRRead= $("input[id*='NRRead']");
                   if (chkNRRead.length > 0) {
                       chkNRRead.get(0).checked = true; // access your checkbox here
                   }


Thanks,
Jayesh Goyani
Tags
Grid
Asked by
Venu
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Venu
Top achievements
Rank 1
Jayesh Goyani
Top achievements
Rank 2
Share this question
or