I'm following the telerik demo Grid Heirachy with Templates. On the sub grids I want to give the user "Add new Record" ability. I have that partially working except that on each new row three of my columns need to be "related comboboxes", as demostrated in this telerik example. In my implementation, my three related combo boxes are a list of clients, sub list of projects and sub list of project requirements.
The problem I run into is that the webpage can't find the comboboxes in my javascript code when the page first loads, it throws an error.
"The name 'RadComboBox_Project' does not exist in the current context"
Line 395: function LoadProjects(sender, eventArgs) {
Line 396: var projectsCombo = $find("<%= RadComboBox_Project.ClientID %>");
Line 397: var requirementsCombo = $find("<%= RadComboBox_Requirement.ClientID %>");
I think the reason this might be happening is because the RadGrid2 is located inside of a <telerik:RadPageView> control or within other nested controls. The aspx page when in Design mode doesn't show the RadGrid2 on the designer surface at all, it's somehow hidden. Probably because RadGrid2 is a subgrid of RadGrid1 and also that RadGrid2 is nested inside of a RadPageView, that being nested inside of a RadMultiPage and that being nested inside of an asp:Panel. (I'm using the exact code example from Grid Heirachy with Templates)
Another issue with the nested RadGrid2 is that it doesn't show up at all in the Properties window listbox in Visual Studio. None of the nested RadGrids on each RadPageView are visible. There are RadGrids on each of the Tabs of the RadTabStrip. All of these RadGrids are not visible.
In the c# code behind class, you also can't reference them. Code like this doesn't compile::
int x = RadGrid2.MasterTableView.Columns.Count;
RadComboBox_Project.DataTextField = "Name"; // this is a combobox within RadGrid2
Both of those two controls show the red squiggly lines, if you hover over them the VS tooltip tells me the same error:
"The name 'RadGrid2' does not exist in the current context".
"The name 'RadComboBox_Project' does not exist in the current context".
It seems like there is one central error causing all of these nested controls to be hidden from the compiler. Any idea how to make them available for use so I can reference them in javascript and in c# code behind?
Thank you.
The problem I run into is that the webpage can't find the comboboxes in my javascript code when the page first loads, it throws an error.
"The name 'RadComboBox_Project' does not exist in the current context"
Line 395: function LoadProjects(sender, eventArgs) {
Line 396: var projectsCombo = $find("<%= RadComboBox_Project.ClientID %>");
Line 397: var requirementsCombo = $find("<%= RadComboBox_Requirement.ClientID %>");
I think the reason this might be happening is because the RadGrid2 is located inside of a <telerik:RadPageView> control or within other nested controls. The aspx page when in Design mode doesn't show the RadGrid2 on the designer surface at all, it's somehow hidden. Probably because RadGrid2 is a subgrid of RadGrid1 and also that RadGrid2 is nested inside of a RadPageView, that being nested inside of a RadMultiPage and that being nested inside of an asp:Panel. (I'm using the exact code example from Grid Heirachy with Templates)
Another issue with the nested RadGrid2 is that it doesn't show up at all in the Properties window listbox in Visual Studio. None of the nested RadGrids on each RadPageView are visible. There are RadGrids on each of the Tabs of the RadTabStrip. All of these RadGrids are not visible.
In the c# code behind class, you also can't reference them. Code like this doesn't compile::
int x = RadGrid2.MasterTableView.Columns.Count;
RadComboBox_Project.DataTextField = "Name"; // this is a combobox within RadGrid2
Both of those two controls show the red squiggly lines, if you hover over them the VS tooltip tells me the same error:
"The name 'RadGrid2' does not exist in the current context".
"The name 'RadComboBox_Project' does not exist in the current context".
It seems like there is one central error causing all of these nested controls to be hidden from the compiler. Any idea how to make them available for use so I can reference them in javascript and in c# code behind?
Thank you.