Hi,
I am having an issue getting the RadGrid-MasterTableView on client-side. I have a RadGrid on the page which does not have static defined columns and I cannot get the mastertableview. Also I defined some static columns and still cannot get the MasterTableVIew.
My final goal is add columns to my RadGrid on the fly using client-side. I could defined to static columns there but other columns are going to be added on dynamically.
What I am missing in my code that I cannot get the MasterTable to add my data to the grid
Thank you in advance
This the code that I am using to get those intance and I can get the grid object but not the MasterTable
var grid = $find("<%=RadGrid1.ClientID %>");
var MasterTable = grid.get_masterTableView();
// var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
<telerik:RadGrid ID="RadGrid1" runat="server" autogeneratecolumns="false" allowsorting="true" allowpaging="true">
<PagerStyle AlwaysVisible="true" />
<MasterTableView>
<Columns>
<telerik:GridBoundColumn DataField="automobile" UniqueName="automobile" HeaderText="automobile" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="betrayal" UniqueName="betrayal" HeaderText="betrayal" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="DataSourceRecordID" UniqueName="DataSourceRecordID" HeaderText="DataSourceRecordID" ></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
I am having an issue getting the RadGrid-MasterTableView on client-side. I have a RadGrid on the page which does not have static defined columns and I cannot get the mastertableview. Also I defined some static columns and still cannot get the MasterTableVIew.
My final goal is add columns to my RadGrid on the fly using client-side. I could defined to static columns there but other columns are going to be added on dynamically.
What I am missing in my code that I cannot get the MasterTable to add my data to the grid
Thank you in advance
This the code that I am using to get those intance and I can get the grid object but not the MasterTable
var grid = $find("<%=RadGrid1.ClientID %>");
var MasterTable = grid.get_masterTableView();
// var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
<telerik:RadGrid ID="RadGrid1" runat="server" autogeneratecolumns="false" allowsorting="true" allowpaging="true">
<PagerStyle AlwaysVisible="true" />
<MasterTableView>
<Columns>
<telerik:GridBoundColumn DataField="automobile" UniqueName="automobile" HeaderText="automobile" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="betrayal" UniqueName="betrayal" HeaderText="betrayal" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="DataSourceRecordID" UniqueName="DataSourceRecordID" HeaderText="DataSourceRecordID" ></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>