Hi All,
I am using Radgrid into User Control. that user control defined into RadWindow in aspx page. when i am clicking the link button that window will popup and i want to assign datasource like. radgrid.get_masterTableView().set_dataSource(new Array()). but radgrid.get_masterTableView() return null values. i want to assign datasource only in client side. please let me know how to solve this issue.
Here i have attached code.
in aspx page
<asp:LinkButton ID="lnkSymptoms" runat="server" Text="Symptoms : " OnClientClick="return lnkSymptom_clientClick()"></asp:LinkButton>
<telerik:RadWindow runat="server" ID="rwSymptoms" Title="Symptoms" VisibleStatusbar="false"
Width="600px" Height="430px" Modal="true" EnableShadow="true" Skin="Web20" Opacity="100">
<ContentTemplate>
<div id="divSymptoms" runat="server">
<ucSymptom:ucSymptom ID="ucSymptomsCtrl" runat="server" />
</div>
</ContentTemplate>
</telerik:RadWindow>
javascript
function lnkSymptom_clientClick(sender, args) {
var rgSymptoms = $find("ctl00_ContentPlaceHolder1_rwSymptoms_C_ucSymptomsCtrl_rgSymptoms").get_masterTableView();
rgSymptoms.set_dataSource(new Array());
rgSymptoms.dataBind();
}
ascx page
<telerik:RadGrid ID="rgSymptoms" runat="server" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center"
Width="370px" EnableViewState="false" PagerStyle-Visible="false" >
<ClientSettings ClientEvents-OnCommand="function() {}" >
</ClientSettings>
<MasterTableView CommandItemDisplay="None" AutoGenerateColumns="false" AllowSorting="true"
AllowPaging="true" DataKeyNames="sys_con_id" ClientDataKeyNames="sys_con_id">
<NoRecordsTemplate>
<center>
No records to be displayed</center>
</NoRecordsTemplate>
<Columns>
<telerik:GridTemplateColumn UniqueName="Description" HeaderText="Condition">
<ItemStyle VerticalAlign="Top" Wrap="false" HorizontalAlign="Left" />
<HeaderStyle Width="220px" />
<ItemTemplate>
<asp:Label ID="Description" runat="server" SkinID="NoBold"></asp:Label>
<asp:TextBox runat="server" ID="txtDesc" Style="display: none;" onchange="javascript:return UpdateOtherValue(this)"></asp:TextBox>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
Thanks in Advance,
Dhamodharan.S
I am using Radgrid into User Control. that user control defined into RadWindow in aspx page. when i am clicking the link button that window will popup and i want to assign datasource like. radgrid.get_masterTableView().set_dataSource(new Array()). but radgrid.get_masterTableView() return null values. i want to assign datasource only in client side. please let me know how to solve this issue.
Here i have attached code.
in aspx page
<asp:LinkButton ID="lnkSymptoms" runat="server" Text="Symptoms : " OnClientClick="return lnkSymptom_clientClick()"></asp:LinkButton>
<telerik:RadWindow runat="server" ID="rwSymptoms" Title="Symptoms" VisibleStatusbar="false"
Width="600px" Height="430px" Modal="true" EnableShadow="true" Skin="Web20" Opacity="100">
<ContentTemplate>
<div id="divSymptoms" runat="server">
<ucSymptom:ucSymptom ID="ucSymptomsCtrl" runat="server" />
</div>
</ContentTemplate>
</telerik:RadWindow>
javascript
function lnkSymptom_clientClick(sender, args) {
var rgSymptoms = $find("ctl00_ContentPlaceHolder1_rwSymptoms_C_ucSymptomsCtrl_rgSymptoms").get_masterTableView();
rgSymptoms.set_dataSource(new Array());
rgSymptoms.dataBind();
}
ascx page
<telerik:RadGrid ID="rgSymptoms" runat="server" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center"
Width="370px" EnableViewState="false" PagerStyle-Visible="false" >
<ClientSettings ClientEvents-OnCommand="function() {}" >
</ClientSettings>
<MasterTableView CommandItemDisplay="None" AutoGenerateColumns="false" AllowSorting="true"
AllowPaging="true" DataKeyNames="sys_con_id" ClientDataKeyNames="sys_con_id">
<NoRecordsTemplate>
<center>
No records to be displayed</center>
</NoRecordsTemplate>
<Columns>
<telerik:GridTemplateColumn UniqueName="Description" HeaderText="Condition">
<ItemStyle VerticalAlign="Top" Wrap="false" HorizontalAlign="Left" />
<HeaderStyle Width="220px" />
<ItemTemplate>
<asp:Label ID="Description" runat="server" SkinID="NoBold"></asp:Label>
<asp:TextBox runat="server" ID="txtDesc" Style="display: none;" onchange="javascript:return UpdateOtherValue(this)"></asp:TextBox>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
Thanks in Advance,
Dhamodharan.S