| var input_002Erng1_002Efirst_rangevalidator = document.all ? document.all["input_002Erng1_002Efirst_rangevalidator"] : document.getElementById("input_002Erng1_002Efirst_rangevalidator"); |
| input_002Erng1_002Efirst_rangevalidator.controltovalidate = ""; |
| input_002Erng1_002Efirst_rangevalidator.errormessage = "The value for field \'A date range From\' is required and must be between 1 Jan 0001 and 31 Dec 9999"; |
| input_002Erng1_002Efirst_rangevalidator.display = "None"; |
| input_002Erng1_002Efirst_rangevalidator.evaluationfunction = "DateInputRangeValidatorEvaluateIsValid"; |
| <form id="personalform" runat="server"> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> |
| </telerik:RadScriptManager> |
| <div> |
| PERSONAL INFORMATION<br /> |
| <script type="text/javascript"> |
| function OnClientCancel(editor) |
| { |
| Cancel_Clicked(); |
| return false; |
| } |
| function GetRadWindow() |
| { |
| return window.radWindow || window.frameElement.radWindow; |
| } |
| function OnClientCancel() |
| { |
| var oWindow = GetRadWindow(); |
| oWindow.close(); |
| return false; |
| } |
| function OnClientSubmit() |
| { |
| var oWindow = GetRadWindow(); |
| oWindow.close(); |
| } |
| </script> |
| <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px"> |
| <asp:Label ID="Label1" runat="server" Text="Firstname:"/> |
| <telerik:RadTextBox ID="UserFirstName" runat="server" Skin="Web20"> |
| </telerik:RadTextBox><br /> |
| <asp:Label ID="Label2" runat="server" Text="Middlename:"/><telerik:RadTextBox ID="UserMiddleName" runat="server"> |
| </telerik:RadTextBox><br /> |
| <asp:Label ID="Label3" runat="server" Text="Lastname:"/> <telerik:RadTextBox ID="UserLastName" runat="server"> |
| </telerik:RadTextBox><br /> |
| <asp:Label ID="Label4" runat="server" Text="Date of birth:"/> |
| <telerik:RadDatePicker |
| ID="UserDob" runat="server" MinDate="1900-01-01"> |
| <DateInput InvalidStyleDuration="100" runat="server"></DateInput> |
| </telerik:RadDatePicker> |
| <br /> |
| <asp:Label ID="Label5" runat="server" Text="Photo:"/><asp:Image ID="UserImage" runat="server" /> |
| <br /> |
| <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> |
| <br /> |
| </telerik:RadAjaxPanel> |
| <asp:Literal ID="InjectScript" runat="server"></asp:Literal> |
| <asp:Button ID="SaveBtn" runat="server" Text="Save" onclick="SaveBtn_Click" /> |
| <asp:Button ID="CancelBtn" runat="server" Text="Cancel" OnClientClick="OnClientCancel()"/> |
| </div> |
| </form> |
<
add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.1.515.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/>"
in web.config file..
Error :
Web.config registration missing!
The Telerik dialogs require a HttpHandler registration in the web.config file. please, use the control's Smart Tag to add the handler automatically, or see the help for more information: Controls > Editor > Dialogs
<asp:LinkButton ID="btnEditSelected" Style="vertical-align: bottom" runat="server"
CommandName="EditSelected" CausesValidation="false"
Enabled='<%# (theGrid.MasterTableView.IsItemInserted && theGrid.EditIndexes.Count == 0 && theGrid.SelectedIndexes.Count > 0 %>'>
<img style="border:0px;vertical-align:middle;" alt="edit..." src="../../Include/Images/grid/Edit.gif" originalAttribute="src" originalPath="../../Include/Images/grid/Edit.gif" /></asp:LinkButton>
<asp:LinkButton ID="btnInitInsert" runat="server"
CommandName="InitInsert" CausesValidation="false"
Enabled='<%# !theGrid.MasterTableView.IsItemInserted && theGrid.EditIndexes.Count == 0 %>'>
<img style="border:0px;vertical-align:middle;" alt="ins..." src="../../Include/Images/grid/Insert.gif" originalAttribute="src" originalPath="../../Include/Images/grid/Insert.gif" /></asp:LinkButton>
<asp:LinkButton ID="btnCancel" runat="server"
CommandName="Delete" CausesValidation="false"
Enabled='<%# !theGrid.MasterTableView.IsItemInserted && theGrid.EditIndexes.Count == 0 && theGrid.SelectedIndexes.Count > 0 %>'>
<img style="border:0px;vertical-align:middle;" alt="del..." src="../../Include/Images/grid/Delete.gif" originalAttribute="src" originalPath="../../Include/Images/grid/Delete.gif" /></asp:LinkButton>
protected void Page_Load(object sender, EventArgs e)
{
GenerateMenu();
}
private void GenerateMenu()
{
string _ConnectionString = "PROVIDER=MSDAORA;USER ID=HSAJAD;PASSWORD=SAJJAD;DATA SOURCE=HCARE.WORLD";
OleDbConnection OldDbCon = new OleDbConnection(_ConnectionString);
OldDbCon.Open();
OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT id,parentId,e_text,E_URL FROM INTERNET_MENU ", OldDbCon);
DataSet ds = new DataSet();
adapter.Fill(ds);
ds.Relations.Add(
"NodeRelation", ds.Tables[0].Columns["id"], ds.Tables[0].Columns["parentId"], false);
MenuGroup MainGroup =
new MenuGroup();
MainGroup.Flow = PresentationDirection.Horizontal;
RadMenu1.RootGroup = MainGroup;
foreach (DataRow dbRow in ds.Tables[0].Rows)
{
if (dbRow.IsNull("parentId"))
{
Telerik.WebControls.
RadMenuItem item = new Telerik.WebControls.RadMenuItem();
item.Text = dbRow[
"Text"].ToString();
MainGroup.AddItem(item);
RecursivelyPopulate(dbRow, item);
}
}
OldDbCon.Close();
}
private void RecursivelyPopulate(DataRow dbRow,Telerik.WebControls.RadMenuItem item)
{
MenuGroup CurrentGroup =
new MenuGroup();
foreach (DataRow childRow in dbRow.GetChildRows("NodeRelation"))
{
Telerik.WebControls.
RadMenuItem childItem = new Telerik.WebControls.RadMenuItem();
childItem.Text = childRow[
"Text"].ToString();
CurrentGroup.AddItem(childItem);
RecursivelyPopulate(childRow, childItem);
}
if (CurrentGroup.Items.Count > 0)
{
item.ChildGroup = CurrentGroup;
}
}