Hi
I have a Telerik grid that I need to be filled dynamicly.
I have a menu which is also dynamic, each item of the menu represented by a unique number, according to this number I know which SQL query to run and fill the grid accordingly.
The grid should have the options for: Insert, Update, Delete.
The grid should also have the option of filtering.
I need to change the columns headers as well at runtime while filling the grid.
What is the best way to implement those needs?
Thanks,
Eliran
01.
<%@ Page Language=
"C#"
AutoEventWireup=
"true"
CodeBehind=
"Starter.aspx.cs"
Inherits=
"WebWindows.Starter"
%>
02.
03.
<%@ Register assembly=
"Telerik.Web.UI"
namespace=
"Telerik.Web.UI"
tagprefix=
"telerik"
%>
04.
05.
<!DOCTYPE html>
06.
07.
<html xmlns=
"http://www.w3.org/1999/xhtml"
>
08.
<head runat=
"server"
>
09.
<title></title>
10.
11.
<script type=
"text/javascript"
>
12.
function
clientShow(sender, eventArgs)
13.
{
14.
var
txtInput = document.getElementById(
"txtInput"
);
15.
sender.argument = txtInput.value;
16.
}
17.
function
clientClose(sender, args)
18.
{
19.
if
(args.get_argument() !=
null
)
20.
{
21.
txtInput.value = args.get_argument();
22.
}
23.
}
24.
</script>
25.
26.
27.
</head>
28.
<body>
29.
<form id=
"form1"
runat=
"server"
>
30.
<telerik:RadScriptManager ID=
"RadScriptManager1"
runat=
"server"
>
31.
<Scripts>
32.
<asp:ScriptReference Assembly=
"Telerik.Web.UI"
Name=
"Telerik.Web.UI.Common.Core.js"
>
33.
</asp:ScriptReference>
34.
<asp:ScriptReference Assembly=
"Telerik.Web.UI"
Name=
"Telerik.Web.UI.Common.jQuery.js"
>
35.
</asp:ScriptReference>
36.
<asp:ScriptReference Assembly=
"Telerik.Web.UI"
Name=
"Telerik.Web.UI.Common.jQueryInclude.js"
>
37.
</asp:ScriptReference>
38.
</Scripts>
39.
</telerik:RadScriptManager>
40.
<telerik:RadAjaxManager ID=
"RadAjaxManager1"
runat=
"server"
>
41.
</telerik:RadAjaxManager>
42.
<div>
43.
44.
<telerik:RadWindow ID=
"RadWindow1"
runat=
"server"
Height=
"600px"
Modal=
"True"
Width=
"800px"
NavigateUrl=
"Childform.aspx"
OnClientClose=
"clientClose"
OnClientShow=
"clientShow"
OpenerElementID=
"showDialog"
ReloadOnShow=
"True"
>
45.
</telerik:RadWindow>
46.
<br />
47.
<telerik:RadDockLayout ID=
"RadDockLayout1"
Runat=
"server"
>
48.
<telerik:RadDockZone ID=
"RadDockZone1"
Runat=
"server"
Height=
"300px"
Width=
"1220px"
>
49.
<telerik:RadDock ID=
"RadDock10"
Runat=
"server"
Height=
"136px"
Width=
"1182px"
>
50.
<ContentTemplate>
51.
<br />
52.
<br />
53.
<br />
54.
55.
56.
57.
</ContentTemplate>
58.
</telerik:RadDock>
59.
</telerik:RadDockZone>
60.
</telerik:RadDockLayout>
61.
62.
<asp:TextBox ID=
"txtInput"
runat=
"server"
></asp:TextBox>
63.
<asp:Button ID=
"showDialog"
runat=
"server"
OnClientClick=
"clientShow"
Text=
"Open"
/>
64.
65.
<br />
66.
67.
</div>
68.
</form>
69.
</body>
70.
</html>
Child page code :
01.
<%@ Page Language=
"C#"
AutoEventWireup=
"true"
CodeBehind=
"ChildForm.aspx.cs"
Inherits=
"WebWindows.ChildForm"
%>
02.
03.
<%@ Register assembly=
"Telerik.Web.UI"
namespace=
"Telerik.Web.UI"
tagprefix=
"telerik"
%>
04.
05.
<!DOCTYPE html>
06.
07.
<html xmlns=
"http://www.w3.org/1999/xhtml"
>
08.
<head runat=
"server"
>
09.
<title></title>
10.
11.
<script type=
"text/javascript"
>
12.
13.
function
pageLoad() {
14.
15.
txtInput = document.getElementById(
'txtUserInput'
);
16.
var
currentWindow = GetRadWindow();
17.
txtInput.value = currentWindow.argument;
18.
19.
20.
}
21.
22.
23.
function
GetRadWindow() {
24.
var
oWindow =
null
;
25.
if
(window.radWindow)
26.
oWindow = window.radWindow;
27.
else
if
(window.frameElement.radWindow)
28.
oWindow = window.frameElement.radWindow;
29.
return
oWindow;
30.
}
31.
32.
33.
34.
35.
//Close the dialog and return the argument to the OnClientClose event handler
36.
function
returnArg() {
37.
38.
var
oWnd = GetRadWindow();
39.
oWnd.close(txtInput.value);
40.
}
41.
42.
</script>
43.
44.
45.
46.
47.
</head>
48.
<body>
49.
<form id=
"form1"
runat=
"server"
>
50.
<div>
51.
52.
53.
54.
55.
56.
<asp:ScriptManager ID=
"ScriptManager1"
runat=
"server"
OnLoad=
"Page_Load"
>
57.
</asp:ScriptManager>
58.
59.
<asp:TextBox ID=
"txtUserInput"
runat=
"server"
></asp:TextBox>
60.
<br />
61.
<br />
62.
<asp:Button ID=
"Button1"
runat=
"server"
Text=
"Close With Argument"
OnClientClick=
"returnArg(); return false;"
/>
63.
<br />
64.
65.
66.
67.
68.
69.
70.
71.
</div>
72.
</form>
73.
</body>
74.
</html>
** The code working perfect if Textbox and Button outside RadDock Control, But inside doesn't work?
Check attached video files.
Thanks
Vmax
Parent Code
01.
<%@ Page Language=
"C#"
AutoEventWireup=
"true"
CodeBehind=
"Starter.aspx.cs"
Inherits=
"WebWindows.Starter"
%>
02.
03.
<%@ Register assembly=
"Telerik.Web.UI"
namespace=
"Telerik.Web.UI"
tagprefix=
"telerik"
%>
04.
05.
<!DOCTYPE html>
06.
07.
<html xmlns=
"http://www.w3.org/1999/xhtml"
>
08.
<head runat=
"server"
>
09.
<title></title>
10.
11.
<script type=
"text/javascript"
>
12.
function
clientShow(sender, eventArgs)
13.
{
14.
var
txtInput = document.getElementById(
"txtInput"
);
15.
sender.argument = txtInput.value;
16.
}
17.
function
clientClose(sender, args)
18.
{
19.
if
(args.get_argument() !=
null
)
20.
{
21.
txtInput.value = args.get_argument();
22.
}
23.
}
24.
</script>
25.
26.
27.
</head>
28.
<body>
29.
<form id=
"form1"
runat=
"server"
>
30.
<telerik:RadScriptManager ID=
"RadScriptManager1"
runat=
"server"
>
31.
<Scripts>
32.
<asp:ScriptReference Assembly=
"Telerik.Web.UI"
Name=
"Telerik.Web.UI.Common.Core.js"
>
33.
</asp:ScriptReference>
34.
<asp:ScriptReference Assembly=
"Telerik.Web.UI"
Name=
"Telerik.Web.UI.Common.jQuery.js"
>
35.
</asp:ScriptReference>
36.
<asp:ScriptReference Assembly=
"Telerik.Web.UI"
Name=
"Telerik.Web.UI.Common.jQueryInclude.js"
>
37.
</asp:ScriptReference>
38.
</Scripts>
39.
</telerik:RadScriptManager>
40.
<telerik:RadAjaxManager ID=
"RadAjaxManager1"
runat=
"server"
>
41.
</telerik:RadAjaxManager>
42.
<div>
43.
44.
<telerik:RadWindow ID=
"RadWindow1"
runat=
"server"
Height=
"600px"
Modal=
"True"
Width=
"800px"
NavigateUrl=
"Childform.aspx"
OnClientClose=
"clientClose"
OnClientShow=
"clientShow"
OpenerElementID=
"showDialog"
ReloadOnShow=
"True"
>
45.
</telerik:RadWindow>
46.
<br />
47.
<telerik:RadDockLayout ID=
"RadDockLayout1"
Runat=
"server"
>
48.
<telerik:RadDockZone ID=
"RadDockZone1"
Runat=
"server"
Height=
"300px"
Width=
"1220px"
>
49.
<telerik:RadDock ID=
"RadDock10"
Runat=
"server"
Height=
"136px"
Width=
"1182px"
>
50.
<ContentTemplate>
51.
<br />
52.
<br />
53.
<br />
54.
55.
56.
57.
</ContentTemplate>
58.
</telerik:RadDock>
59.
</telerik:RadDockZone>
60.
</telerik:RadDockLayout>
61.
62.
<asp:TextBox ID=
"txtInput"
runat=
"server"
></asp:TextBox>
63.
<asp:Button ID=
"showDialog"
runat=
"server"
OnClientClick=
"clientShow"
Text=
"Open"
/>
64.
65.
<br />
66.
67.
</div>
68.
</form>
69.
</body>
70.
</html>
Child page code :
01.
<%@ Page Language=
"C#"
AutoEventWireup=
"true"
CodeBehind=
"ChildForm.aspx.cs"
Inherits=
"WebWindows.ChildForm"
%>
02.
03.
<%@ Register assembly=
"Telerik.Web.UI"
namespace=
"Telerik.Web.UI"
tagprefix=
"telerik"
%>
04.
05.
<!DOCTYPE html>
06.
07.
<html xmlns=
"http://www.w3.org/1999/xhtml"
>
08.
<head runat=
"server"
>
09.
<title></title>
10.
11.
<script type=
"text/javascript"
>
12.
13.
function
pageLoad() {
14.
15.
txtInput = document.getElementById(
'txtUserInput'
);
16.
var
currentWindow = GetRadWindow();
17.
txtInput.value = currentWindow.argument;
18.
19.
20.
}
21.
22.
23.
function
GetRadWindow() {
24.
var
oWindow =
null
;
25.
if
(window.radWindow)
26.
oWindow = window.radWindow;
27.
else
if
(window.frameElement.radWindow)
28.
oWindow = window.frameElement.radWindow;
29.
return
oWindow;
30.
}
31.
32.
33.
34.
35.
//Close the dialog and return the argument to the OnClientClose event handler
36.
function
returnArg() {
37.
38.
var
oWnd = GetRadWindow();
39.
oWnd.close(txtInput.value);
40.
}
41.
42.
</script>
43.
44.
45.
46.
47.
</head>
48.
<body>
49.
<form id=
"form1"
runat=
"server"
>
50.
<div>
51.
52.
53.
54.
55.
56.
<asp:ScriptManager ID=
"ScriptManager1"
runat=
"server"
OnLoad=
"Page_Load"
>
57.
</asp:ScriptManager>
58.
59.
<asp:TextBox ID=
"txtUserInput"
runat=
"server"
></asp:TextBox>
60.
<br />
61.
<br />
62.
<asp:Button ID=
"Button1"
runat=
"server"
Text=
"Close With Argument"
OnClientClick=
"returnArg(); return false;"
/>
63.
<br />
64.
65.
66.
67.
68.
69.
70.
71.
</div>
72.
</form>
73.
</body>
74.
</html>
** The code working perfect if Textbox and Button outside RadDock Control, But inside doesn't work?
Check attached video files.
Thanks
Vmax
Apologies if this is the wrong forum but there doesnt seem to be one dedicated to language support.
Attached is a sample MVC project that uses the HTML Treelist helper. This sample has Entity Framework stripped out in order to enable the developer to focus strictly on the concepts of retrieving remote data from the server and binding to the control. The startup screen is currently .cshtml as the fluent syntax for .vbhtml is undocumented (there is an action method /home/indexvb to run a vb equivalent but its not working due to the lack of the relevant syntax.)
Would be grateful if you could please advise on the correct syntax to populate the treelist.
Many thanks
PS Please rename VBTreelist.png to VBTreelist.zip. Apparently only images are allowed as attachments to posts
Referring the attached image I have the following Q's
1. Where to set this title?
2. How to hide this if possible?
3. Where to set this title?
4. How to hide this print icon?
Thank you
Hi,
RAD Editor is used in my project and it is working fine on development machine, but as soon as I deploy the same to a server it stopped working and giving below error (please see attachment)
Error:- Web.Config Registration missing !
Telerik.Web.UI.dll version :- 2011.2.712.35
Server OS:- Windows Server 2012 R2 DataCentre edition
Please let me know how can I solve this problem,