
pmourfield
Top achievements
Rank 1
pmourfield
asked on 22 Sep 2011, 03:03 PM
Good morning, everyone. I am having a problem with the Add New Record button when the project is being run from a test server. When I click the "Add New Record" button on the RadGrid the Ajax Loading panel appears but the application gets stuck and never moves past this stage. If I reload the page, though, and click "Add New Record" again, it works. Any ideas?
4 Answers, 1 is accepted
0
Hi Joshua,
I am afraid the provided information is not enough to make a suggestion what might cause this problem. Please provide a full runnable demo, which exhibits the unexpected behavior.
Regards,
Pavlina
the Telerik team
I am afraid the provided information is not enough to make a suggestion what might cause this problem. Please provide a full runnable demo, which exhibits the unexpected behavior.
Regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0

pmourfield
Top achievements
Rank 1
answered on 28 Sep 2011, 05:39 PM
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using Telerik.Web.UI;
using System.Data.SqlClient;
namespace GoalSlayer
{
public partial class WeeklyGoals : System.Web.UI.Page
{
protected void Page_Init(object sender, EventArgs e)
{
UserNameTextBox.Text = GoalSlayer.ActiveDirectoryUser.UserName(User);
userNameHyperLink.Text = " " + GoalSlayer.ActiveDirectoryUser.Name(GoalSlayer.ActiveDirectoryUser.UserName(User));
}
protected void Page_Load(object sender, EventArgs e)
{
GoalSlayer.commentsChecker cc = new GoalSlayer.commentsChecker();
commentsHyperLink.Text = cc.commentsCount(GoalSlayer.ActiveDirectoryUser.UserName(User));
string UserName = GoalSlayer.ActiveDirectoryUser.UserName(User);
GoalSlayer.ManagerChecker user = new GoalSlayer.ManagerChecker();
if (user.isManager(UserName))
{
ManagersPortalLink.Visible = true;
ManagersPortalLink.Enabled = true;
BottomManagersPortalLink.Visible = true;
BottomManagersPortalLink.Enabled = true;
}
if (user.isAdmin(UserName))
{
AdminPortalLink.Visible = true;
AdminPortalLink.Enabled = true;
BottomAdminPortalLink.Visible = true;
BottomAdminPortalLink.Enabled = true;
}
empImage.ImageUrl = "~/images/employees/" + UserName + ".jpg";
}
private void BindGrid()
{
DataTable dt = new DataTable();
SqlConnection connection = new SqlConnection(GetConnectionString());
try
{
connection.Open();
SqlCommand cmd = new SqlCommand("DisplayWeeklyGoals", connection);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@UserName", GoalSlayer.ActiveDirectoryUser.UserName(User));
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(dt);
if (dt.Rows.Count >= 0) //the greater than or equal to is necessary to delete the last row in the gridview.
{
RadGrid1.DataSource = dt;
RadGrid1.DataBind();
}
}
catch (System.Data.SqlClient.SqlException ex)
{
string msg = "Fetch Error:";
msg += ex.Message;
throw new Exception(msg);
}
finally
{
connection.Close();
connection.Dispose();
GridEditCommandColumn editColumn = (GridEditCommandColumn)RadGrid1.MasterTableView.GetColumn("EditCommandColumn");
editColumn.Visible = true;
RadGrid1.MasterTableView.ShowHeader = true;
}
}
//This is necessary in order that the Insert command doesn't try to bind something that isn't there.
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == RadGrid.InitInsertCommandName) //Add new button clicked
{
RadGrid1.MasterTableView.ShowHeader = false;
GridEditCommandColumn editColumn = (GridEditCommandColumn)RadGrid1.MasterTableView.GetColumn("EditCommandColumn");
editColumn.Visible = false;
e.Canceled = true;
System.Collections.Specialized.ListDictionary newValues = new System.Collections.Specialized.ListDictionary();
newValues["GoalComplete"] = false;
newValues["T1Complete"] = false;
newValues["T2Complete"] = false;
newValues["T3Complete"] = false;
newValues["T4Complete"] = false;
newValues["T5Complete"] = false;
newValues["T6Complete"] = false;
newValues["T7Complete"] = false;
newValues["T8Complete"] = false;
newValues["T9Complete"] = false;
newValues["T10Complete"] = false;
e.Item.OwnerTableView.InsertItem(newValues);
}
else if (e.CommandName == RadGrid.EditCommandName) //Edit button clicked
{
RadGrid1.MasterTableView.ShowHeader = false;
}
else if (e.CommandName == RadGrid.CancelCommandName) //Cancel button clicked
{
GridEditCommandColumn editColumn = (GridEditCommandColumn)RadGrid1.MasterTableView.GetColumn("EditCommandColumn");
editColumn.Visible = true;
}
}
protected void RadGrid1_InsertCommand(object sender, GridCommandEventArgs e)
{
}
protected void RadGrid1_UpdateCommand(object sender, GridCommandEventArgs e)
{
}
protected void RadGrid1_DeleteCommand(object sender, GridCommandEventArgs e)
{
}
private string GetConnectionString()
{
return ConfigurationManager.AppSettings["SQLConn"];
}
public string GetUserName()
{
return GoalSlayer.ActiveDirectoryUser.UserName(User);
}
protected void theSource_Updating(object sender, SqlDataSourceCommandEventArgs e)
{
//Response.Write(e.Command.Parameters.Count);
//StringBuilder sb = new StringBuilder();
//for (int i = 0; i <
e.Command.Parameters.Count
; i++)
//{
// sb.Append(e.Command.Parameters[i].ParameterName.ToString());
//}
//Response.Write(sb.ToString());
}
protected void theSource_Inserting(object sender, SqlDataSourceCommandEventArgs e)
{
//Response.Write(e.Command.Parameters.Count);
//StringBuilder
sb
=
new
StringBuilder();
//for (int
i
=
0
; i < e.Command.Parameters.Count; i++)
//{
// sb.Append(e.Command.Parameters[i].ParameterName.ToString());
//}
//Response.Write(sb.ToString());
e.Command.Parameters.RemoveAt("@GoalID"); //radgrid tries to send ALL parameters in the automatic insert table it builds. have to remove goalID
}
protected void RadGrid1_ItemInserted(object sender, GridInsertedEventArgs e)
{
GridEditCommandColumn editColumn = (GridEditCommandColumn)RadGrid1.MasterTableView.GetColumn("EditCommandColumn");
editColumn.Visible
=
true
;
RadGrid1.MasterTableView.ShowHeader
=
true
;
}
protected void theSource_Deleting(object sender, SqlDataSourceCommandEventArgs e)
{
//Response.Write(e.Command.Parameters.Count);
//StringBuilder
sb
=
new
StringBuilder();
//for (int
i
=
0
; i < e.Command.Parameters.Count; i++)
//{
// sb.Append(e.Command.Parameters[i].ParameterName.ToString());
//}
//Response.Write(sb.ToString());
}
protected void TemplateDropDown_SelectedIndexChanged(object sender, EventArgs e)
{
RadComboBox TemplateDropDown = (RadComboBox)sender;
if (TemplateDropDown.SelectedIndex > 0)
{
string templateID = TemplateDropDown.SelectedItem.Value.ToString();
string templateName = TemplateDropDown.SelectedItem.Text.ToString();
DataTable dt = new DataTable();
SqlConnection connection = new SqlConnection(GetConnectionString());
try
{
connection.Open();
SqlCommand cmd = new SqlCommand("RetrieveWeeklyGoalTemplate", connection);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@GoalID", templateID);
cmd.Parameters.AddWithValue("@TemplateName", templateName);
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(dt);
if (dt.Rows.Count >= 0) //the greater than or equal to is necessary to delete the last row in the gridview.
{
//GridEditFormItem editform = (GridEditFormItem)sender;
//string estHours1 = dt.Rows[0][2].ToString();
//string estHours2 = dt.Rows[0][4].ToString();
//string estHours3 = dt.Rows[0][6].ToString();
//string estHours4 = dt.Rows[0][8].ToString();
//string estHours5 = dt.Rows[0][10].ToString();
//string estHours6 = dt.Rows[0][12].ToString();
//string estHours7 = dt.Rows[0][14].ToString();
//string estHours8 = dt.Rows[0][16].ToString();
//string estHours9 = dt.Rows[0][18].ToString();
//string estHours10 = dt.Rows[0][20].ToString();
//GoalSlayer.valueChecker value = new GoalSlayer.valueChecker();
System.Collections.Specialized.ListDictionary templateValues = new System.Collections.Specialized.ListDictionary();
templateValues["goalNameTextBox"] = dt.Rows[0]["TemplateName"].ToString();
templateValues["goalDescriptionTextBox"] = dt.Rows[0]["WeeklyGoal"].ToString();
templateValues["step1TextBox"] = dt.Rows[0]["Task1"].ToString();
templateValues["step2TextBox"] = dt.Rows[0]["Task2"].ToString();
templateValues["step3TextBox"] = dt.Rows[0]["Task3"].ToString();
templateValues["step4TextBox"] = dt.Rows[0]["Task4"].ToString();
templateValues["step5TextBox"] = dt.Rows[0]["Task5"].ToString();
templateValues["step6TextBox"] = dt.Rows[0]["Task6"].ToString();
templateValues["step7TextBox"] = dt.Rows[0]["Task7"].ToString();
templateValues["step8TextBox"] = dt.Rows[0]["Task8"].ToString();
templateValues["step9TextBox"] = dt.Rows[0]["Task9"].ToString();
templateValues["step10TextBox"] = dt.Rows[0]["Task10"].ToString();
GridEditFormItem editItem = (GridEditFormItem)TemplateDropDown.NamingContainer;
RadTextBox goalNameTextBox = (RadTextBox)editItem.FindControl("goalNameTextBox");
RadTextBox goalDescriptionTextBox = (RadTextBox)editItem.FindControl("goalDescriptionTextBox");
RadTextBox step1TextBox = (RadTextBox)editItem.FindControl("step1TextBox");
RadTextBox step2TextBox = (RadTextBox)editItem.FindControl("step2TextBox");
RadTextBox step3TextBox = (RadTextBox)editItem.FindControl("step3TextBox");
RadTextBox step4TextBox = (RadTextBox)editItem.FindControl("step4TextBox");
RadTextBox step5TextBox = (RadTextBox)editItem.FindControl("step5TextBox");
RadTextBox step6TextBox = (RadTextBox)editItem.FindControl("step6TextBox");
RadTextBox step7TextBox = (RadTextBox)editItem.FindControl("step7TextBox");
RadTextBox step8TextBox = (RadTextBox)editItem.FindControl("step8TextBox");
RadTextBox step9TextBox = (RadTextBox)editItem.FindControl("step9TextBox");
RadTextBox step10TextBox = (RadTextBox)editItem.FindControl("step10TextBox");
RadTextBox step1TextBox_hrs = (RadTextBox)editItem.FindControl("step1TextBox_hrs");
RadTextBox step2TextBox_hrs = (RadTextBox)editItem.FindControl("step2TextBox_hrs");
RadTextBox step3TextBox_hrs = (RadTextBox)editItem.FindControl("step3TextBox_hrs");
RadTextBox step4TextBox_hrs = (RadTextBox)editItem.FindControl("step4TextBox_hrs");
RadTextBox step5TextBox_hrs = (RadTextBox)editItem.FindControl("step5TextBox_hrs");
RadTextBox step6TextBox_hrs = (RadTextBox)editItem.FindControl("step6TextBox_hrs");
RadTextBox step7TextBox_hrs = (RadTextBox)editItem.FindControl("step7TextBox_hrs");
RadTextBox step8TextBox_hrs = (RadTextBox)editItem.FindControl("step8TextBox_hrs");
RadTextBox step9TextBox_hrs = (RadTextBox)editItem.FindControl("step9TextBox_hrs");
RadTextBox step10TextBox_hrs = (RadTextBox)editItem.FindControl("step10TextBox_hrs");
goalNameTextBox.Text = dt.Rows[0]["TemplateName"].ToString();
goalDescriptionTextBox.Text = dt.Rows[0]["WeeklyGoal"].ToString();
step1TextBox.Text = dt.Rows[0]["Task1"].ToString();
step2TextBox.Text = dt.Rows[0]["Task2"].ToString();
step3TextBox.Text = dt.Rows[0]["Task3"].ToString();
step4TextBox.Text = dt.Rows[0]["Task4"].ToString();
step5TextBox.Text = dt.Rows[0]["Task5"].ToString();
step6TextBox.Text = dt.Rows[0]["Task6"].ToString();
step7TextBox.Text = dt.Rows[0]["Task7"].ToString();
step8TextBox.Text = dt.Rows[0]["Task8"].ToString();
step9TextBox.Text = dt.Rows[0]["Task"].ToString();
step10TextBox.Text = dt.Rows[0]["Task10"].ToString();
step1TextBox_hrs.Text = dt.Rows[0]["T1EstimatedHours"].ToString();
step2TextBox_hrs.Text = dt.Rows[0]["T2EstimatedHours"].ToString();
step3TextBox_hrs.Text = dt.Rows[0]["T3EstimatedHours"].ToString();
step4TextBox_hrs.Text = dt.Rows[0]["T4EstimatedHours"].ToString();
step5TextBox_hrs.Text = dt.Rows[0]["T5EstimatedHours"].ToString();
step6TextBox_hrs.Text = dt.Rows[0]["T6EstimatedHours"].ToString();
step7TextBox_hrs.Text = dt.Rows[0]["T7EstimatedHours"].ToString();
step8TextBox_hrs.Text = dt.Rows[0]["T8EstimatedHours"].ToString();
step9TextBox_hrs.Text = dt.Rows[0]["T9EstimatedHours"].ToString();
step10TextBox_hrs.Text = dt.Rows[0]["T10EstimatedHours"].ToString();
}
TemplateDropDown.Items.Clear();
//TemplateDropDown.Items.Add(new ListItem("Personal Goal Library...", "0"));
//The next few lines of code repopulate the Personal Goal Library dropdown after postback.
//The items must be cleared, like above, so that items are not continuously appended to the current list.
SqlConnection conn = new SqlConnection(GetConnectionString());
conn.Open();
SqlCommand command = new SqlCommand();
SqlDataReader templates;
command = new SqlCommand("DisplayWeeklyGoalsTemplatesForDropDown", conn);
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add(new SqlParameter("@UserName", GoalSlayer.ActiveDirectoryUser.UserName(User)));
templates = command.ExecuteReader();
TemplateDropDown.DataSource = templates;
TemplateDropDown.DataValueField = "GoalID";
TemplateDropDown.DataTextField = "TemplateName";
TemplateDropDown.DataBind();
command.Connection.Close();
command.Connection.Dispose();
}
catch (System.Data.SqlClient.SqlException ex)
{
string msg = "Fetch Error:";
msg += ex.Message;
throw new Exception(msg);
}
finally
{
connection.Close();
connection.Dispose();
}
}
}
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if ((e.Item is GridEditFormItem) && (e.Item.IsInEditMode))
{
GridEditFormItem editform = (GridEditFormItem)e.Item;
//DropDownList TemplateDropDown = (DropDownList)editform.FindControl("TemplateDropDown");
RadComboBox TemplateDropDown = (RadComboBox)editform.FindControl("TemplateDropDown");
SqlConnection connection = new SqlConnection(GetConnectionString());
connection.Open();
SqlCommand cmd = new SqlCommand();
SqlDataReader templates;
cmd = new SqlCommand("DisplayWeeklyGoalsTemplatesForDropDown", connection);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@UserName", GoalSlayer.ActiveDirectoryUser.UserName(User)));
templates = cmd.ExecuteReader();
TemplateDropDown.DataSource = templates;
TemplateDropDown.DataValueField = "GoalID";
TemplateDropDown.DataTextField = "TemplateName";
TemplateDropDown.DataBind();
cmd.Connection.Close();
cmd.Connection.Dispose();
}
if (e.Item is GridEditFormInsertItem)
{
//GridEditFormInsertItem editInsertForm = (GridEditFormInsertItem)e.Item;
RadDatePicker beginDatePicker = (RadDatePicker)e.Item.FindControl("beginDatePicker");
RadDatePicker endDatePicker = (RadDatePicker)e.Item.FindControl("endDatePicker");
if (Session["beginDate"] != null && Session["endDate"] != null)
{
beginDatePicker.DbSelectedDate = Session["beginDate"].ToString();
endDatePicker.DbSelectedDate = Session["endDate"].ToString();
}
}
if (e.Item is GridGroupHeaderItem)
{
GridGroupHeaderItem item = (GridGroupHeaderItem)e.Item;
if (item.GroupIndex == "0")
item.Expanded = true;
}
//This is where we grab the aggregate for the Total Goal Hours
if (e.Item is GridFooterItem)
{
//GridFooterItem footer = (GridFooterItem)e.Item;
//string strtxt = footer["TotalGoalHours"].Text;
//string[] arr = strtxt.Split(':');
//string count = arr[1].ToString();
}
}
protected void searchButton_Click(object sender, EventArgs e)
{
try
{
RadButton searchButton = (RadButton)sender;
GridEditFormItem editItem = (GridEditFormItem)searchButton.NamingContainer;
RadComboBox divisionGoalsComboBox = (RadComboBox)editItem.FindControl("divisionGoalsComboBox");
RadTextBox keywordsTextBox = (RadTextBox)editItem.FindControl("keywordsTextBox");
string keywordString = keywordsTextBox.Text.ToString();
if (string.IsNullOrEmpty(keywordString))
{
Label noCriteriaLabel = new Label();
noCriteriaLabel.Text = "Please enter search criteria.";
resultsPanel.Controls.Add(noCriteriaLabel);
}
else
{
string[] keywords = keywordString.Split(',');
foreach (string keyword in keywords)
{
try
{
//DataTable dt = new DataTable();
SqlConnection connection = new SqlConnection(GetConnectionString());
connection.Open();
SqlCommand cmd = new SqlCommand("SearchWeeklyGoals", connection);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@Keywords", keyword);
cmd.Parameters.AddWithValue("@UserName", GoalSlayer.ActiveDirectoryUser.UserName(User));
//SqlDataAdapter da = new SqlDataAdapter(cmd);
SqlDataReader dr;
dr = cmd.ExecuteReader();
foreach (IDataRecord record in dr)
{
RadComboBoxItem item = new RadComboBoxItem();
item.Text = "Goal Name" + (string)record["GoalName"];
item.Value = record["GoalID"].ToString();
string goalDescription = record["WeeklyGoal"].ToString();
string step1 = record["Task1"].ToString();
string step2 = record["Task2"].ToString();
string step3 = record["Task3"].ToString();
string step4 = record["Task4"].ToString();
string step5 = record["Task5"].ToString();
string step6 = record["Task6"].ToString();
string step7 = record["Task7"].ToString();
string step8 = record["Task8"].ToString();
string step9 = record["Task9"].ToString();
string step10 = record["Task10"].ToString();
string step1Hours = record["T1EstimatedHours"].ToString();
string step2Hours = record["T2EstimatedHours"].ToString();
string step3Hours = record["T3EstimatedHours"].ToString();
string step4Hours = record["T4EstimatedHours"].ToString();
string step5Hours = record["T5EstimatedHours"].ToString();
string step6Hours = record["T6EstimatedHours"].ToString();
string step7Hours = record["T7EstimatedHours"].ToString();
string step8Hours = record["T8EstimatedHours"].ToString();
string step9Hours = record["T9EstimatedHours"].ToString();
string step10Hours = record["T10EstimatedHours"].ToString();
item.Attributes.Add("GoalName", record["GoalName"].ToString());
item.Attributes.Add("WeeklyGoal", goalDescription.ToString());
item.Attributes.Add("Task1", "1. " + step1);
item.Attributes.Add("Task2", "2. " + step2);
item.Attributes.Add("Task3", "3. " + step3);
item.Attributes.Add("Task4", "4. " + step4);
item.Attributes.Add("Task5", "5. " + step5);
item.Attributes.Add("Task5", "6. " + step6);
item.Attributes.Add("Task5", "7. " + step7);
item.Attributes.Add("Task5", "8. " + step8);
item.Attributes.Add("Task5", "9. " + step9);
item.Attributes.Add("Task5", "10. " + step10);
item.Attributes.Add("T1EstimatedHours", step1Hours.ToString());
item.Attributes.Add("T2EstimatedHours", step2Hours.ToString());
item.Attributes.Add("T3EstimatedHours", step3Hours.ToString());
item.Attributes.Add("T4EstimatedHours", step4Hours.ToString());
item.Attributes.Add("T5EstimatedHours", step5Hours.ToString());
item.Attributes.Add("T6EstimatedHours", step6Hours.ToString());
item.Attributes.Add("T7EstimatedHours", step7Hours.ToString());
item.Attributes.Add("T8EstimatedHours", step8Hours.ToString());
item.Attributes.Add("T9EstimatedHours", step9Hours.ToString());
item.Attributes.Add("T10EstimatedHours", step10Hours.ToString());
divisionGoalsComboBox.Items.Add(item);
item.DataBind();
}
connection.Close();
connection.Dispose();
divisionGoalsComboBox.OpenDropDownOnLoad = true;
}
catch (System.Data.SqlClient.SqlException ex)
{
string msg = "Fetch Error:";
msg += ex.Message;
throw new Exception(msg);
}
}
}
}
catch (Exception exc)
{
string msg = "Fetch Error:";
msg += exc.Message;
throw new Exception(msg);
}
}
protected void openSearchWindowButton_Click(object sender, EventArgs e)
{
RadNotification1.Show();
}
protected void divisionGoalsComboBox_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
RadComboBox divisionGoalsComboBox = (RadComboBox)sender;
divisionGoalsComboBox.OpenDropDownOnLoad = false;
}
protected void divisionGoalsComboBox_ItemCreated(object sender, RadComboBoxItemEventArgs e)
{
RadComboBox divisionGoalsComboBox = (RadComboBox)sender;
divisionGoalsComboBox.OpenDropDownOnLoad = false;
}
protected void divisionGoalsComboBox_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
RadComboBox divisionGoalsDropDown = (RadComboBox)sender;
if (divisionGoalsDropDown.SelectedIndex > 0)
{
string goalID = divisionGoalsDropDown.SelectedItem.Value.ToString();
DataTable dt = new DataTable();
SqlConnection connection = new SqlConnection(GetConnectionString());
try
{
connection.Open();
SqlCommand cmd = new SqlCommand("RetrieveWeeklyGoal", connection);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@GoalID", goalID);
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(dt);
if (dt.Rows.Count >= 0) //the greater than or equal to is necessary to delete the last row in the gridview.
{
//GridEditFormItem editform = (GridEditFormItem)sender;
//string estHours1 = dt.Rows[0]["T1EstimatedHours"].ToString();
//string estHours2 = dt.Rows[0]["T2EstimatedHours"].ToString();
//string estHours3 = dt.Rows[0]["T3EstimatedHours"].ToString();
//string estHours4 = dt.Rows[0]["T4EstimatedHours"].ToString();
//string estHours5 = dt.Rows[0]["T5EstimatedHours"].ToString();
//string estHours6 = dt.Rows[0]["T6EstimatedHours"].ToString();
//string estHours7 = dt.Rows[0]["T7EstimatedHours"].ToString();
//string estHours8 = dt.Rows[0]["T8EstimatedHours"].ToString();
//string estHours9 = dt.Rows[0]["T9EstimatedHours"].ToString();
//string estHours10 = dt.Rows[0]["T10EstimatedHours"].ToString();
//GoalSlayer.valueChecker value = new GoalSlayer.valueChecker();
System.Collections.Specialized.ListDictionary templateValues = new System.Collections.Specialized.ListDictionary();
templateValues["goalNameTextBox"] = dt.Rows[0]["GoalName"].ToString();
templateValues["goalDescriptionTextBox"] = dt.Rows[0]["WeeklyGoal"].ToString();
templateValues["step1TextBox"] = dt.Rows[0]["Task1"].ToString();
templateValues["step2TextBox"] = dt.Rows[0]["Task2"].ToString();
templateValues["step3TextBox"] = dt.Rows[0]["Task3"].ToString();
templateValues["step4TextBox"] = dt.Rows[0]["Task4"].ToString();
templateValues["step5TextBox"] = dt.Rows[0]["Task5"].ToString();
templateValues["step6TextBox"] = dt.Rows[0]["Task6"].ToString();
templateValues["step7TextBox"] = dt.Rows[0]["Task7"].ToString();
templateValues["step8TextBox"] = dt.Rows[0]["Task8"].ToString();
templateValues["step9TextBox"] = dt.Rows[0]["Task9"].ToString();
templateValues["step10TextBox"] = dt.Rows[0]["Task10"].ToString();
GridEditFormItem editItem = (GridEditFormItem)divisionGoalsDropDown.NamingContainer;
RadTextBox goalNameTextBox = (RadTextBox)editItem.FindControl("goalNameTextBox");
RadTextBox goalDescriptionTextBox = (RadTextBox)editItem.FindControl("goalDescriptionTextBox");
RadTextBox step1TextBox = (RadTextBox)editItem.FindControl("step1TextBox");
RadTextBox step2TextBox = (RadTextBox)editItem.FindControl("step2TextBox");
RadTextBox step3TextBox = (RadTextBox)editItem.FindControl("step3TextBox");
RadTextBox step4TextBox = (RadTextBox)editItem.FindControl("step4TextBox");
RadTextBox step5TextBox = (RadTextBox)editItem.FindControl("step5TextBox");
RadTextBox step6TextBox = (RadTextBox)editItem.FindControl("step6TextBox");
RadTextBox step7TextBox = (RadTextBox)editItem.FindControl("step7TextBox");
RadTextBox step8TextBox = (RadTextBox)editItem.FindControl("step8TextBox");
RadTextBox step9TextBox = (RadTextBox)editItem.FindControl("step9TextBox");
RadTextBox step10TextBox = (RadTextBox)editItem.FindControl("step10TextBox");
RadTextBox step1TextBox_hrs = (RadTextBox)editItem.FindControl("step1TextBox_hrs");
RadTextBox step2TextBox_hrs = (RadTextBox)editItem.FindControl("step2TextBox_hrs");
RadTextBox step3TextBox_hrs = (RadTextBox)editItem.FindControl("step3TextBox_hrs");
RadTextBox step4TextBox_hrs = (RadTextBox)editItem.FindControl("step4TextBox_hrs");
RadTextBox step5TextBox_hrs = (RadTextBox)editItem.FindControl("step5TextBox_hrs");
RadTextBox step6TextBox_hrs = (RadTextBox)editItem.FindControl("step6TextBox_hrs");
RadTextBox step7TextBox_hrs = (RadTextBox)editItem.FindControl("step7TextBox_hrs");
RadTextBox step8TextBox_hrs = (RadTextBox)editItem.FindControl("step8TextBox_hrs");
RadTextBox step9TextBox_hrs = (RadTextBox)editItem.FindControl("step9TextBox_hrs");
RadTextBox step10TextBox_hrs = (RadTextBox)editItem.FindControl("step10TextBox_hrs");
goalNameTextBox.Text = dt.Rows[0]["GoalName"].ToString();
goalDescriptionTextBox.Text = dt.Rows[0]["WeeklyGoal"].ToString();
step1TextBox.Text = dt.Rows[0]["Task1"].ToString();
step2TextBox.Text = dt.Rows[0]["Task2"].ToString();
step3TextBox.Text = dt.Rows[0]["Task3"].ToString();
step4TextBox.Text = dt.Rows[0]["Task4"].ToString();
step5TextBox.Text = dt.Rows[0]["Task5"].ToString();
step6TextBox.Text = dt.Rows[0]["Task6"].ToString();
step7TextBox.Text = dt.Rows[0]["Task7"].ToString();
step8TextBox.Text = dt.Rows[0]["Task8"].ToString();
step9TextBox.Text = dt.Rows[0]["Task9"].ToString();
step10TextBox.Text = dt.Rows[0]["Task10"].ToString();
step1TextBox_hrs.Text = dt.Rows[0]["T1EstimatedHours"].ToString();
step2TextBox_hrs.Text = dt.Rows[0]["T2EstimatedHours"].ToString();
step3TextBox_hrs.Text = dt.Rows[0]["T3EstimatedHours"].ToString();
step4TextBox_hrs.Text = dt.Rows[0]["T4EstimatedHours"].ToString();
step5TextBox_hrs.Text = dt.Rows[0]["T5EstimatedHours"].ToString();
step6TextBox_hrs.Text = dt.Rows[0]["T6EstimatedHours"].ToString();
step7TextBox_hrs.Text = dt.Rows[0]["T7EstimatedHours"].ToString();
step8TextBox_hrs.Text = dt.Rows[0]["T8EstimatedHours"].ToString();
step9TextBox_hrs.Text = dt.Rows[0]["T9EstimatedHours"].ToString();
step10TextBox_hrs.Text = dt.Rows[0]["T10EstimatedHours"].ToString();
}
}
catch (System.Data.SqlClient.SqlException ex)
{
string msg = "Fetch Error:";
msg += ex.Message;
throw new Exception(msg);
}
finally
{
connection.Close();
connection.Dispose();
}
}
}
protected void beginDatePicker_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)
{
RadDatePicker beginDatePicker = (RadDatePicker)sender;
GridEditFormItem editItem = (GridEditFormItem)beginDatePicker.NamingContainer;
//CheckBox workingSaturdayCB = (CheckBox)editItem.FindControl("workingSaturdayCB");
//if (workingSaturdayCB.Checked == true)
//{
// RadDatePicker endDatePicker = (RadDatePicker)editItem.FindControl("endDatePicker");
// endDatePicker.DbSelectedDate = (e.NewDate.Value.AddDays(5));
// Session["beginDate"] = e.NewDate.Value.ToShortDateString();
// Session["endDate"] = ((DateTime)endDatePicker.DbSelectedDate).ToShortDateString();
//}
//else
//{
RadDatePicker endDatePicker = (RadDatePicker)editItem.FindControl("endDatePicker");
endDatePicker.DbSelectedDate = (e.NewDate.Value.AddDays(4));
Session["beginDate"] = e.NewDate.Value.ToShortDateString();
Session["endDate"] = ((DateTime)endDatePicker.DbSelectedDate).ToShortDateString();
//}
}
protected void ValidateStepTextBox(object sender, ServerValidateEventArgs args)
{
GoalSlayer.valueChecker value = new GoalSlayer.valueChecker();
string valCntrlID = ((Control)sender).ID;
string hrsCntrlID = valCntrlID.Remove(valCntrlID.Length - 3) + "hrs";
string tskCntrlID = valCntrlID.Remove(valCntrlID.Length - 4);
string chkCntrlID = valCntrlID.Remove(valCntrlID.Length - 3) + "chk";
string hrsCntrlValue = ((RadTextBox)((Control)sender).NamingContainer.FindControl(hrsCntrlID)).Text;
string tskCntrlValue = ((RadTextBox)((Control)sender).NamingContainer.FindControl(tskCntrlID)).Text;
if (!value.isZeroOrNull(hrsCntrlValue) && string.IsNullOrEmpty(tskCntrlValue))
{
((RadTextBox)((Control)sender).NamingContainer.FindControl(tskCntrlID)).CssClass = "error";
((CustomValidator)((Control)sender).NamingContainer.FindControl(valCntrlID)).ErrorMessage = "Cannot insert hours without a step.";
args.IsValid = false;
}
else if (value.isZeroOrNull(hrsCntrlValue) && string.IsNullOrEmpty(tskCntrlValue))
{
((CheckBox)((Control)sender).NamingContainer.FindControl(chkCntrlID)).Checked = false;
}
else
{
args.IsValid = true;
}
}
}
}
<%@ Page Language="C#" AutoEventWireup="true" Inherits="GoalSlayer.WeeklyGoals" CodeBehind="WeeklyGoals.aspx.cs" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
id
=
"Head1"
runat
=
"server"
>
<
title
></
title
>
<
telerik:RadStyleSheetManager
ID
=
"RadStyleSheetManager1"
runat
=
"server"
/>
<
link
type
=
"text/css"
href
=
"css/StyleSheet.css"
rel
=
"Stylesheet"
/>
<
style
type
=
"text/css"
>
.pdfButton
{
color: black;
cursor: pointer;
}
</
style
>
<
script
type
=
"text/javascript"
language
=
"javascript"
>
function requestStart(sender, args) {
if (args.get_eventTarget().indexOf("DownloadPDF") > 0)
args.set_enableAjax(false);
}
</
script
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
align
=
"center"
class
=
"header"
>
<
div
class
=
"header_resize"
>
<
div
class
=
"menu_nav"
>
<
div
style
=
"float: left; margin-left: -10px; margin-right: 20px;"
>
<
img
src
=
"images/goalslayer_logo.png"
width
=
"174"
height
=
"51"
/></
div
>
<
ul
>
<
li
><
a
href
=
"Default.aspx"
>Home</
a
></
li
>
<
li
class
=
"active"
><
a
href
=
"WeeklyGoals.aspx"
>Weekly Goals</
a
></
li
>
<
li
><
a
href
=
"GoalLibrary.aspx"
>Goal Library</
a
></
li
>
<
li
><
a
href
=
"AnnualGoals.aspx"
>Annual Goals</
a
></
li
>
<
li
><
asp:HyperLink
ID
=
"ManagersPortalLink"
runat
=
"server"
NavigateUrl
=
"~/ManagersPortal.aspx"
Text
=
"Manager's Portal"
Enabled
=
"false"
Visible
=
"false"
></
asp:HyperLink
></
li
>
<
li
><
asp:HyperLink
ID
=
"AdminPortalLink"
runat
=
"server"
NavigateUrl
=
"~/AdminPortal.aspx"
Text
=
"Admin Portal"
Enabled
=
"false"
Visible
=
"false"
></
asp:HyperLink
></
li
>
<
li
><
asp:Image
runat
=
"server"
ID
=
"empImage"
Height
=
"44"
Width
=
"44"
/></
li
>
</
ul
>
</
div
>
<
div
class
=
"clr"
>
</
div
>
<
span
style
=
"float: right; font-size: 14px !important;"
>Comments: [<
asp:HyperLink
ID
=
"commentsHyperLink"
runat
=
"server"
Text
=
"0"
NavigateUrl
=
"~/Comments.aspx"
></
asp:HyperLink
>]</
span
>
</
div
>
</
div
>
<
div
style
=
"background-color: White; margin-top: 25px;"
>
<
table
>
<
tr
>
<
td
style
=
"float: right; display: none;"
>
<
asp:HyperLink
ID
=
"userNameHyperLink"
runat
=
"server"
NavigateUrl
=
"#"
Visible
=
"false"
Style
=
"text-decoration: none"
></
asp:HyperLink
>
</
td
>
</
tr
>
</
table
>
</
div
>
<
script
type
=
"text/javascript"
>
</
script
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
<
Scripts
>
<%--Needed for JavaScript IntelliSense in VS2010--%>
<%--For VS2008 replace RadScriptManager with ScriptManager--%>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.Core.js"
/>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQuery.js"
/>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQueryInclude.js"
/>
</
Scripts
>
</
telerik:RadScriptManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
Height
=
"75px"
Width
=
"75px"
Transparency
=
"25"
>
<
img
alt
=
"Loading..."
src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'
style="border: 0;" />
</
telerik:RadAjaxLoadingPanel
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadGrid1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadWindowManager
ID
=
"RadWindowManager1"
Width
=
"800"
Height
=
"500"
Modal
=
"true"
runat
=
"server"
DestroyOnClose
=
"true"
>
</
telerik:RadWindowManager
>
<
telerik:RadNotification
ID
=
"RadNotification1"
runat
=
"server"
VisibleOnPageLoad
=
"false"
Position
=
"Center"
ContentScrolling
=
"Auto"
AutoCloseDelay
=
"0"
Width
=
"700"
Height
=
"600"
Animation
=
"Fade"
EnableRoundedCorners
=
"true"
EnableShadow
=
"true"
ViewStateMode
=
"Enabled"
Title
=
"Notification Title"
Text
=
"RadNotification is a a light control which can be used to display a notification message"
Style
=
"z-index: 35000"
>
<
ContentTemplate
>
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel1"
runat
=
"server"
>
<
div
>
</
div
>
<
div
>
<
asp:Panel
ID
=
"resultsPanel"
runat
=
"server"
>
</
asp:Panel
>
</
div
>
</
telerik:RadAjaxPanel
>
</
ContentTemplate
>
</
telerik:RadNotification
>
<
div
>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
DataSourceID
=
"theSource"
AllowPaging
=
"true"
AllowAutomaticDeletes
=
"true"
AllowAutomaticInserts
=
"true"
AllowAutomaticUpdates
=
"true"
ExportSettings-Pdf-AllowPrinting
=
"true"
ShowStatusBar
=
"true"
ShowFooter
=
"true"
AllowSorting
=
"true"
AllowMultiRowEdit
=
"true"
OnDeleteCommand
=
"RadGrid1_DeleteCommand"
CellSpacing
=
"0"
GridLines
=
"None"
AutoGenerateColumns
=
"false"
OnItemCommand
=
"RadGrid1_ItemCommand"
OnInsertCommand
=
"RadGrid1_InsertCommand"
OnUpdateCommand
=
"RadGrid1_UpdateCommand"
OnItemInserted
=
"RadGrid1_ItemInserted"
OnItemDataBound
=
"RadGrid1_ItemDataBound"
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
/>
<
ExportSettings
IgnorePaging
=
"true"
OpenInNewWindow
=
"true"
>
<
Pdf
PageHeight
=
"210mm"
PageWidth
=
"297mm"
PageTitle
=
"Weekly Goals"
DefaultFontFamily
=
"Arial Unicode MS"
PageBottomMargin
=
"20mm"
PageTopMargin
=
"20mm"
PageLeftMargin
=
"20mm"
PageRightMargin
=
"20mm"
/>
</
ExportSettings
>
<
MasterTableView
EditMode
=
"EditForms"
CommandItemDisplay
=
"Top"
DataKeyNames
=
"GoalID"
GroupsDefaultExpanded
=
"false"
GroupLoadMode
=
"Client"
>
<
CommandItemSettings
AddNewRecordText
=
"Add New Goal"
/>
<%--<
CommandItemTemplate
>
<
asp:Button
ID
=
"DownloadPDF"
runat
=
"server"
Width
=
"100%"
CommandName
=
"ExportToPdf"
Text
=
"Export to PDF"
CssClass
=
"pdfButton"
/>
</
CommandItemTemplate
>--%>
<
GroupByExpressions
>
<
telerik:GridGroupByExpression
>
<
SelectFields
>
<
telerik:GridGroupByField
FieldName
=
"BeginDate"
HeaderText
=
"Begin Date"
FormatString
=
"{0:d}"
/>
<
telerik:GridGroupByField
FieldName
=
"EndDate"
HeaderText
=
"End Date"
FormatString
=
"{0:d}"
/>
</
SelectFields
>
<
GroupByFields
>
<
telerik:GridGroupByField
FieldName
=
"BeginDate"
SortOrder
=
"Descending"
/>
<
telerik:GridGroupByField
FieldName
=
"EndDate"
SortOrder
=
"Descending"
/>
</
GroupByFields
>
</
telerik:GridGroupByExpression
>
</
GroupByExpressions
>
<
Columns
>
<
telerik:GridEditCommandColumn
>
</
telerik:GridEditCommandColumn
>
<
telerik:GridBoundColumn
DataField
=
"GoalID"
ReadOnly
=
"true"
Display
=
"false"
HeaderText
=
"GoalID"
>
</
telerik:GridBoundColumn
>
<
telerik:GridDateTimeColumn
DataField
=
"BeginDate"
HeaderText
=
"Begin Date"
DataFormatString
=
"{0:d}"
>
</
telerik:GridDateTimeColumn
>
<
telerik:GridDateTimeColumn
DataField
=
"EndDate"
HeaderText
=
"End Date"
DataFormatString
=
"{0:d}"
EditFormColumnIndex
=
"1"
>
</
telerik:GridDateTimeColumn
>
<
telerik:GridBoundColumn
DataField
=
"GoalName"
UniqueName
=
"goalNameTextBox"
HeaderText
=
"Goal Name"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"WeeklyGoal"
HeaderText
=
"Goal Description"
EditFormColumnIndex
=
"1"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"TotalGoalHours"
HeaderText
=
"Hours Total per Goal"
Aggregate
=
"Sum"
FooterAggregateFormatString
=
"Total Goal Set Hours: {0}"
>
</
telerik:GridBoundColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"GoalComplete"
HeaderText
=
"Goal Complete?"
EditFormColumnIndex
=
"2"
DefaultInsertValue
=
"false"
>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridBoundColumn
DataField
=
"Task1"
Display
=
"false"
HeaderText
=
"Step 1"
>
</
telerik:GridBoundColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"T1Complete"
Display
=
"false"
HeaderText
=
"Complete"
EditFormColumnIndex
=
"0"
DefaultInsertValue
=
"false"
>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridBoundColumn
DataField
=
"Task2"
Display
=
"false"
HeaderText
=
"Step 2"
>
</
telerik:GridBoundColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"T2Complete"
Display
=
"false"
HeaderText
=
"Complete"
EditFormColumnIndex
=
"0"
DefaultInsertValue
=
"false"
>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridBoundColumn
DataField
=
"Task3"
Display
=
"false"
HeaderText
=
"Step 3"
>
</
telerik:GridBoundColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"T3Complete"
Display
=
"false"
HeaderText
=
"Complete"
EditFormColumnIndex
=
"0"
DefaultInsertValue
=
"false"
>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridBoundColumn
DataField
=
"Task4"
Display
=
"false"
HeaderText
=
"Step 4"
>
</
telerik:GridBoundColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"T4Complete"
Display
=
"false"
HeaderText
=
"Complete"
EditFormColumnIndex
=
"0"
DefaultInsertValue
=
"false"
>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridBoundColumn
DataField
=
"Task5"
Display
=
"false"
HeaderText
=
"Step 5"
>
</
telerik:GridBoundColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"T5Complete"
Display
=
"false"
HeaderText
=
"Complete"
EditFormColumnIndex
=
"0"
DefaultInsertValue
=
"false"
>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridBoundColumn
DataField
=
"Task6"
Display
=
"false"
HeaderText
=
"Step 6"
>
</
telerik:GridBoundColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"T6Complete"
Display
=
"false"
HeaderText
=
"Complete"
EditFormColumnIndex
=
"0"
DefaultInsertValue
=
"false"
>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridBoundColumn
DataField
=
"Task7"
Display
=
"false"
HeaderText
=
"Step 7"
>
</
telerik:GridBoundColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"T7Complete"
Display
=
"false"
HeaderText
=
"Complete"
EditFormColumnIndex
=
"0"
DefaultInsertValue
=
"false"
>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridBoundColumn
DataField
=
"Task8"
Display
=
"false"
HeaderText
=
"Step 8"
>
</
telerik:GridBoundColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"T8Complete"
Display
=
"false"
HeaderText
=
"Complete"
EditFormColumnIndex
=
"0"
DefaultInsertValue
=
"false"
>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridBoundColumn
DataField
=
"Task9"
Display
=
"false"
HeaderText
=
"Step 9"
>
</
telerik:GridBoundColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"T9Complete"
Display
=
"false"
HeaderText
=
"Complete"
EditFormColumnIndex
=
"0"
DefaultInsertValue
=
"false"
>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridBoundColumn
DataField
=
"Task10"
Display
=
"false"
HeaderText
=
"Step 10"
>
</
telerik:GridBoundColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"T10Complete"
Display
=
"false"
HeaderText
=
"Complete"
EditFormColumnIndex
=
"0"
DefaultInsertValue
=
"false"
>
</
telerik:GridCheckBoxColumn
>
</
Columns
>
<
CommandItemSettings
ExportToPdfText
=
"Export to PDF"
></
CommandItemSettings
>
<
RowIndicatorColumn
FilterControlAltText
=
"Filter RowIndicator column"
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
FilterControlAltText
=
"Filter ExpandColumn column"
>
</
ExpandCollapseColumn
>
<
EditFormSettings
InsertCaption
=
"Add New Goal"
ColumnNumber
=
"3"
EditFormType
=
"Template"
>
<
FormTemplate
>
<
asp:CompareValidator
SetFocusOnError
=
"true"
runat
=
"server"
Style
=
"color: Red"
ID
=
"dateCompareValidator"
Operator
=
"GreaterThan"
ControlToCompare
=
"beginDatePicker"
ControlToValidate
=
"endDatePicker"
ErrorMessage
=
"The End Date must be greater than the Begin Date"
></
asp:CompareValidator
>
<
table
id
=
"dateControlsTable"
cellspacing
=
"2"
cellpadding
=
"2"
border
=
"0"
rules
=
"none"
style
=
"border-collapse: collapse;"
>
<
tr
>
<
td
>
<%--This is going to remain here just in case we want to bring the Working Saturday option back.
Backend code does not need to change.--%>
<%--<
asp:CheckBox
ID
=
"workingSaturdayCB"
runat
=
"server"
Text
=
"Working Saturday?"
/>--%>
<
asp:RequiredFieldValidator
runat
=
"server"
ID
=
"beginDatePickerValidator"
ForeColor
=
"Red"
Display
=
"Dynamic"
ControlToValidate
=
"beginDatePicker"
ErrorMessage
=
"Begin Date is required."
SetFocusOnError
=
"true"
></
asp:RequiredFieldValidator
>
</
td
>
<
td
>
<
asp:RequiredFieldValidator
runat
=
"server"
ID
=
"endDatePickerValidator"
ForeColor
=
"Red"
Display
=
"Dynamic"
ControlToValidate
=
"endDatePicker"
ErrorMessage
=
"End Date is required."
SetFocusOnError
=
"true"
></
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
strong
>Begin Date:</
strong
>
<
telerik:RadDatePicker
runat
=
"server"
DateInput-ReadOnly
=
"false"
ID
=
"beginDatePicker"
AutoPostBack
=
"true"
DbSelectedDate="<%# Bind('BeginDate') %>" Calendar-FirstDayOfWeek="Monday"
OnSelectedDateChanged="beginDatePicker_SelectedDateChanged">
</
telerik:RadDatePicker
>
</
td
>
<
td
>
<
strong
>End Date:</
strong
>
<
telerik:RadDatePicker
runat
=
"server"
DateInput-ReadOnly
=
"false"
ID
=
"endDatePicker"
DbSelectedDate="<%# Bind('EndDate') %>">
</
telerik:RadDatePicker
>
</
td
>
<
td
>
<
telerik:RadComboBox
ID
=
"TemplateDropDown"
runat
=
"server"
AppendDataBoundItems
=
"True"
EmptyMessage
=
"Personal Goal Libary"
AutoPostBack
=
"True"
CssClass
=
"templateDropDown"
CausesValidation
=
"false"
OnSelectedIndexChanged
=
"TemplateDropDown_SelectedIndexChanged"
ViewStateMode
=
"Enabled"
>
</
telerik:RadComboBox
>
</
td
>
<
td
>
<
asp:HiddenField
runat
=
"server"
ID
=
"goalIDHF"
Value="<%# Bind('GoalID') %>" />
</
td
>
</
tr
>
</
table
>
<
p
>
</
p
>
<
table
id
=
"goalDataTable"
cellspacing
=
"2"
cellpadding
=
"2"
border
=
"0"
rules
=
"none"
style
=
"border-collapse: collapse;"
>
<
tr
>
<
td
>
<
strong
>Goal Name:</
strong
>
</
td
>
<
td
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"goalNameTextBox"
Text="<%# Bind('GoalName') %>" EmptyMessage="A short name for the weekly goal..." EmptyMessageStyle-Font-Italic="true"
Width="500">
</
telerik:RadTextBox
><
br
/>
<
asp:RequiredFieldValidator
runat
=
"server"
ID
=
"goalNameTextBoxValidator"
Display
=
"Dynamic"
ErrorMessage
=
"Goal Name is required"
ForeColor
=
"Red"
ControlToValidate
=
"goalNameTextBox"
></
asp:RequiredFieldValidator
>
</
td
>
<
td
>
<
strong
>Goal Complete:</
strong
>
</
td
>
<
td
style
=
"text-align: center"
>
<
asp:CheckBox
runat
=
"server"
ID
=
"goalCompleteCheckBox"
Checked="<%# Bind('GoalComplete') %>" />
</
td
>
<
td
>
<
strong
>Division Search</
strong
>
</
td
>
<
td
>
</
td
>
<
td
>
<
strong
>Advanced Search</
strong
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
strong
>Goal Description:</
strong
>
</
td
>
<
td
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"goalDescriptionTextBox"
Text="<%# Bind('WeeklyGoal') %>" EmptyMessage="A longer description of the weekly goal..." EmptyMessageStyle-Font-Italic="true"
Width="500">
</
telerik:RadTextBox
>
</
td
>
<
td
>
</
td
>
<
td
>
</
td
>
<
td
>
<
telerik:RadTextBox
ID
=
"keywordsTextBox"
runat
=
"server"
EmptyMessage
=
"Keywords..."
>
</
telerik:RadTextBox
>
</
td
>
<
td
>
<
telerik:RadButton
ID
=
"searchButton"
runat
=
"server"
Text
=
"Search"
OnClick
=
"searchButton_Click"
CausesValidation
=
"false"
>
</
telerik:RadButton
>
</
td
>
<
td
>
<
telerik:RadComboBox
runat
=
"server"
ID
=
"divisionGoalsComboBox"
AutoPostBack
=
"true"
Height
=
"500px"
CausesValidation
=
"false"
Width
=
"200px"
DropDownWidth
=
"600px"
EmptyMessage
=
"Division Goals"
HighlightTemplatedItems
=
"true"
EnableLoadOnDemand
=
"true"
Filter
=
"Contains"
OnItemsRequested
=
"divisionGoalsComboBox_ItemsRequested"
OnItemCreated
=
"divisionGoalsComboBox_ItemCreated"
OnSelectedIndexChanged
=
"divisionGoalsComboBox_SelectedIndexChanged"
>
<
HeaderTemplate
>
<
table
style
=
"width: 475px"
cellspacing
=
"0"
cellpadding
=
"0"
>
<
tr
>
<
td
>
Division Goal Templates
</
td
>
</
tr
>
</
table
>
</
HeaderTemplate
>
<
ItemTemplate
>
<
table
style
=
"width: 475px"
cellspacing
=
"0"
cellpadding
=
"0"
>
<
tr
>
<
td
>
<
strong
>Goal Name</
strong
>
</
td
>
</
tr
>
<
tr
>
<
td
style
=
"width: 100%"
>
<%# DataBinder.Eval(Container, "Attributes['GoalName']") %>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
strong
>Description</
strong
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<%# DataBinder.Eval(Container, "Attributes['WeeklyGoal']") %>
</
td
>
</
tr
>
<
tr
>
<
td
>
<%# DataBinder.Eval(Container, "Attributes['Task1']") %>
</
td
>
<
td
>
<%# DataBinder.Eval(Container, "Attributes['T1EstimatedHours']") %>
</
td
>
</
tr
>
<
tr
>
<
td
>
<%# DataBinder.Eval(Container, "Attributes['Task2']") %>
</
td
>
<
td
>
<%# DataBinder.Eval(Container, "Attributes['T2EstimatedHours']") %>
</
td
>
</
tr
>
<
tr
>
<
td
>
<%# DataBinder.Eval(Container, "Attributes['Task3']") %>
</
td
>
<
td
>
<%# DataBinder.Eval(Container, "Attributes['T3EstimatedHours']") %>
</
td
>
</
tr
>
<
tr
>
<
td
>
<%# DataBinder.Eval(Container, "Attributes['Task4']") %>
</
td
>
<
td
>
<%# DataBinder.Eval(Container, "Attributes['T4EstimatedHours']") %>
</
td
>
</
tr
>
<
tr
>
<
td
>
<%# DataBinder.Eval(Container, "Attributes['Task5']") %>
</
td
>
<
td
>
<%# DataBinder.Eval(Container, "Attributes['T5EstimatedHours']") %>
</
td
>
</
tr
>
</
table
>
<
br
/>
<
br
/>
</
ItemTemplate
>
</
telerik:RadComboBox
>
</
td
>
</
tr
>
<
tr
>
<
td
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
strong
>Steps</
strong
>
</
td
>
<
td
>
</
td
>
<
td
>
<
strong
>Hours</
strong
>
</
td
>
<
td
style
=
"text-align: center"
>
<
strong
>Complete</
strong
>
</
td
>
</
tr
>
<
tr
>
<
td
style
=
"float: right"
>
1.
</
td
>
<
td
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"step1TextBox"
Text="<%# Bind('Task1') %>"
Width="500">
</
telerik:RadTextBox
><
br
/>
<
asp:CustomValidator
runat
=
"server"
ID
=
"step1TextBox_val"
ControlToValidate
=
"step1TextBox"
ForeColor
=
"Red"
Display
=
"Dynamic"
SetFocusOnError
=
"true"
ErrorMessage
=
""
ValidateEmptyText
=
"true"
OnServerValidate
=
"ValidateStepTextBox"
></
asp:CustomValidator
>
</
td
>
<
td
>
<
telerik:RadNumericTextBox
runat
=
"server"
ID
=
"step1TextBox_hrs"
Text="<%# Bind('T1EstimatedHours') %>" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true" IncrementSettings-InterceptMouseWheel="true" MaxValue="40" MaxLength="5" MinValue="0"
Width="70">
</
telerik:RadNumericTextBox
>
</
td
>
<
td
style
=
"text-align: center"
>
<
asp:CheckBox
runat
=
"server"
ID
=
"step1TextBox_chk"
Checked="<%# Bind('T1Complete') %>" />
</
td
>
</
tr
>
<
tr
>
<
td
style
=
"float: right"
>
2.
</
td
>
<
td
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"step2TextBox"
Text="<%# Bind('Task2') %>"
Width="500">
</
telerik:RadTextBox
><
br
/>
<
asp:CustomValidator
runat
=
"server"
ID
=
"step2TextBox_val"
ControlToValidate
=
"step2TextBox"
ForeColor
=
"Red"
Display
=
"Dynamic"
SetFocusOnError
=
"true"
ErrorMessage
=
""
ValidateEmptyText
=
"true"
OnServerValidate
=
"ValidateStepTextBox"
></
asp:CustomValidator
>
</
td
>
<
td
>
<
telerik:RadNumericTextBox
runat
=
"server"
ID
=
"step2TextBox_hrs"
Text="<%# Bind('T2EstimatedHours') %>" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true" IncrementSettings-InterceptMouseWheel="true" MaxValue="40" MaxLength="5" MinValue="0"
Width="70">
</
telerik:RadNumericTextBox
>
</
td
>
<
td
style
=
"text-align: center"
>
<
asp:CheckBox
runat
=
"server"
ID
=
"step2TextBox_chk"
Checked="<%# Bind('T2Complete') %>" />
</
td
>
</
tr
>
<
tr
>
<
td
style
=
"float: right"
>
3.
</
td
>
<
td
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"step3TextBox"
Text="<%# Bind('Task3') %>"
Width="500">
</
telerik:RadTextBox
><
br
/>
<
asp:CustomValidator
runat
=
"server"
ID
=
"step3TextBox_val"
ControlToValidate
=
"step3TextBox"
ForeColor
=
"Red"
Display
=
"Dynamic"
SetFocusOnError
=
"true"
ErrorMessage
=
""
ValidateEmptyText
=
"true"
OnServerValidate
=
"ValidateStepTextBox"
></
asp:CustomValidator
>
</
td
>
<
td
>
<
telerik:RadNumericTextBox
runat
=
"server"
ID
=
"step3TextBox_hrs"
Text="<%# Bind('T3EstimatedHours') %>" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true" IncrementSettings-InterceptMouseWheel="true" MaxValue="40" MaxLength="5" MinValue="0"
Width="70">
</
telerik:RadNumericTextBox
>
</
td
>
<
td
style
=
"text-align: center"
>
<
asp:CheckBox
runat
=
"server"
ID
=
"step3TextBox_chk"
Checked="<%# Bind('T3Complete') %>" />
</
td
>
</
tr
>
<
tr
>
<
td
style
=
"float: right"
>
4.
</
td
>
<
td
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"step4TextBox"
Text="<%# Bind('Task4') %>"
Width="500">
</
telerik:RadTextBox
><
br
/>
<
asp:CustomValidator
runat
=
"server"
ID
=
"step4TextBox_val"
ControlToValidate
=
"step4TextBox"
ForeColor
=
"Red"
Display
=
"Dynamic"
SetFocusOnError
=
"true"
ErrorMessage
=
""
ValidateEmptyText
=
"true"
OnServerValidate
=
"ValidateStepTextBox"
></
asp:CustomValidator
>
</
td
>
<
td
>
<
telerik:RadNumericTextBox
runat
=
"server"
ID
=
"step4TextBox_hrs"
Text="<%# Bind('T4EstimatedHours') %>" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true" IncrementSettings-InterceptMouseWheel="true" MaxValue="40" MaxLength="5" MinValue="0"
Width="70">
</
telerik:RadNumericTextBox
>
</
td
>
<
td
style
=
"text-align: center"
>
<
asp:CheckBox
runat
=
"server"
ID
=
"step4TextBox_chk"
Checked="<%# Bind('T4Complete') %>" />
</
td
>
</
tr
>
<
tr
>
<
td
style
=
"float: right"
>
5.
</
td
>
<
td
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"step5TextBox"
Text="<%# Bind('Task5') %>"
Width="500">
</
telerik:RadTextBox
><
br
/>
<
asp:CustomValidator
runat
=
"server"
ID
=
"step5TextBox_val"
ControlToValidate
=
"step5TextBox"
Display
=
"Dynamic"
SetFocusOnError
=
"true"
ErrorMessage
=
""
ValidateEmptyText
=
"true"
ForeColor
=
"Red"
OnServerValidate
=
"ValidateStepTextBox"
></
asp:CustomValidator
>
</
td
>
<
td
>
<
telerik:RadNumericTextBox
runat
=
"server"
ID
=
"step5TextBox_hrs"
Text="<%# Bind('T5EstimatedHours') %>" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true" IncrementSettings-InterceptMouseWheel="true" MaxValue="40" MaxLength="5" MinValue="0"
Width="70">
</
telerik:RadNumericTextBox
>
</
td
>
<
td
style
=
"text-align: center"
>
<
asp:CheckBox
runat
=
"server"
ID
=
"step5TextBox_chk"
Checked="<%# Bind('T5Complete') %>" />
</
td
>
</
tr
>
<
tr
>
<
td
style
=
"float: right"
>
6.
</
td
>
<
td
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"step6TextBox"
Text="<%# Bind('Task6') %>"
Width="500">
</
telerik:RadTextBox
><
br
/>
<
asp:CustomValidator
runat
=
"server"
ID
=
"step6TextBox_val"
ControlToValidate
=
"step6TextBox"
Display
=
"Dynamic"
SetFocusOnError
=
"true"
ErrorMessage
=
""
ValidateEmptyText
=
"true"
ForeColor
=
"Red"
OnServerValidate
=
"ValidateStepTextBox"
></
asp:CustomValidator
>
</
td
>
<
td
>
<
telerik:RadNumericTextBox
runat
=
"server"
ID
=
"step6TextBox_hrs"
Text="<%# Bind('T6EstimatedHours') %>" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true" IncrementSettings-InterceptMouseWheel="true" MaxValue="40" MaxLength="5" MinValue="0"
Width="70">
</
telerik:RadNumericTextBox
>
</
td
>
<
td
style
=
"text-align: center"
>
<
asp:CheckBox
runat
=
"server"
ID
=
"step6TextBox_chk"
Checked="<%# Bind('T6Complete') %>" />
</
td
>
</
tr
>
<
tr
>
<
td
style
=
"float: right"
>
7.
</
td
>
<
td
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"step7TextBox"
Text="<%# Bind('Task7') %>"
Width="500">
</
telerik:RadTextBox
><
br
/>
<
asp:CustomValidator
runat
=
"server"
ID
=
"step7TextBox_val"
ControlToValidate
=
"step7TextBox"
Display
=
"Dynamic"
SetFocusOnError
=
"true"
ErrorMessage
=
""
ValidateEmptyText
=
"true"
ForeColor
=
"Red"
OnServerValidate
=
"ValidateStepTextBox"
></
asp:CustomValidator
>
</
td
>
<
td
>
<
telerik:RadNumericTextBox
runat
=
"server"
ID
=
"step7TextBox_hrs"
Text="<%# Bind('T7EstimatedHours') %>" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true" IncrementSettings-InterceptMouseWheel="true" MaxValue="40" MaxLength="5" MinValue="0"
Width="70">
</
telerik:RadNumericTextBox
>
</
td
>
<
td
style
=
"text-align: center"
>
<
asp:CheckBox
runat
=
"server"
ID
=
"step7TextBox_chk"
Checked="<%# Bind('T7Complete') %>" />
</
td
>
</
tr
>
<
tr
>
<
td
style
=
"float: right"
>
8.
</
td
>
<
td
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"step8TextBox"
Text="<%# Bind('Task8') %>"
Width="500">
</
telerik:RadTextBox
><
br
/>
<
asp:CustomValidator
runat
=
"server"
ID
=
"step8TextBox_val"
ControlToValidate
=
"step8TextBox"
Display
=
"Dynamic"
SetFocusOnError
=
"true"
ErrorMessage
=
""
ValidateEmptyText
=
"true"
ForeColor
=
"Red"
OnServerValidate
=
"ValidateStepTextBox"
></
asp:CustomValidator
>
</
td
>
<
td
>
<
telerik:RadNumericTextBox
runat
=
"server"
ID
=
"step8TextBox_hrs"
Text="<%# Bind('T8EstimatedHours') %>" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true" IncrementSettings-InterceptMouseWheel="true" MaxValue="40" MaxLength="5" MinValue="0"
Width="70">
</
telerik:RadNumericTextBox
>
</
td
>
<
td
style
=
"text-align: center"
>
<
asp:CheckBox
runat
=
"server"
ID
=
"step8TextBox_chk"
Checked="<%# Bind('T8Complete') %>" />
</
td
>
</
tr
>
<
tr
>
<
td
style
=
"float: right"
>
9.
</
td
>
<
td
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"step9TextBox"
Text="<%# Bind('Task9') %>"
Width="500">
</
telerik:RadTextBox
><
br
/>
<
asp:CustomValidator
runat
=
"server"
ID
=
"step9TextBox_val"
ControlToValidate
=
"step9TextBox"
Display
=
"Dynamic"
SetFocusOnError
=
"true"
ErrorMessage
=
""
ValidateEmptyText
=
"true"
ForeColor
=
"Red"
OnServerValidate
=
"ValidateStepTextBox"
></
asp:CustomValidator
>
</
td
>
<
td
>
<
telerik:RadNumericTextBox
runat
=
"server"
ID
=
"step9TextBox_hrs"
Text="<%# Bind('T9EstimatedHours') %>" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true" IncrementSettings-InterceptMouseWheel="true" MaxValue="40" MaxLength="5" MinValue="0"
Width="70">
</
telerik:RadNumericTextBox
>
</
td
>
<
td
style
=
"text-align: center"
>
<
asp:CheckBox
runat
=
"server"
ID
=
"step9TextBox_chk"
Checked="<%# Bind('T9Complete') %>" />
</
td
>
</
tr
>
<
tr
>
<
td
style
=
"float: right"
>
10.
</
td
>
<
td
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"step10TextBox"
Text="<%# Bind('Task10') %>"
Width="500">
</
telerik:RadTextBox
><
br
/>
<
asp:CustomValidator
runat
=
"server"
ID
=
"step10TextBox_val"
ControlToValidate
=
"step10TextBox"
Display
=
"Dynamic"
SetFocusOnError
=
"true"
ErrorMessage
=
""
ValidateEmptyText
=
"true"
ForeColor
=
"Red"
OnServerValidate
=
"ValidateStepTextBox"
></
asp:CustomValidator
>
</
td
>
<
td
>
<
telerik:RadNumericTextBox
runat
=
"server"
ID
=
"step10TextBox_hrs"
Text="<%# Bind('T10EstimatedHours') %>" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true" IncrementSettings-InterceptMouseWheel="true" MaxValue="40" MaxLength="5" MinValue="0"
Width="70">
</
telerik:RadNumericTextBox
>
</
td
>
<
td
style
=
"text-align: center"
>
<
asp:CheckBox
runat
=
"server"
ID
=
"step10TextBox_chk"
Checked="<%# Bind('T10Complete') %>" />
</
td
>
</
tr
>
<
tr
>
<
td
align
=
"right"
colspan
=
"2"
>
<
telerik:RadButton
ID
=
"btnUpdate"
Text='<%# (Container is GridEditFormInsertItem) ? "Add" : "Update" %>'
runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
</
telerik:RadButton
>
<
telerik:RadButton
ID
=
"btnCancel"
Text
=
"Cancel"
runat
=
"server"
CausesValidation
=
"False"
UseSubmitBehavior
=
"false"
CommandName
=
"Cancel"
>
</
telerik:RadButton
>
<
telerik:RadButton
ID
=
"btnDelete"
Text
=
"Delete"
runat
=
"server"
CausesValidation
=
"false"
CommandName
=
"Delete"
/>
</
td
>
</
tr
>
</
table
>
</
FormTemplate
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
>
</
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
<
FilterMenu
EnableImageSprites
=
"False"
>
</
FilterMenu
>
<
HeaderContextMenu
CssClass
=
"GridContextMenu GridContextMenu_Default"
>
</
HeaderContextMenu
>
</
telerik:RadGrid
>
<
asp:TextBox
ID
=
"UserNameTextBox"
runat
=
"server"
Visible
=
"false"
></
asp:TextBox
>
<
asp:SqlDataSource
ID
=
"personalTemplatesSource"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:ConnString %>"
ProviderName="System.Data.SqlClient" SelectCommand="Select ,[WeeklyGoal],[Task1],[Task2],[Task3],[Task4],[Task5], [Task6], [Task7], [Task8], [Task9], [Task10],[T1EstimatedHours]
,[T2EstimatedHours],[T3EstimatedHours],[T4EstimatedHours],[T5EstimatedHours],[TotalGoalHours],[TemplateName], "
SelectCommandType="Text">
<
SelectParameters
>
<
asp:ControlParameter
Name
=
"UserName"
DbType
=
"String"
ControlID
=
"UserNameTextBox"
PropertyName
=
"Text"
/>
</
SelectParameters
>
</
asp:SqlDataSource
>
<
asp:SqlDataSource
ID
=
"theSource"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:ConnString %>"
ProviderName="System.Data.SqlClient" InsertCommandType="StoredProcedure" InsertCommand="InsertWeeklyGoal"
SelectCommandType="StoredProcedure" SelectCommand="DisplayWeeklyGoals" DeleteCommandType="StoredProcedure"
DeleteCommand="DeleteWeeklyGoals" UpdateCommandType="StoredProcedure" UpdateCommand="UpdateWeeklyGoal"
OnInserting="theSource_Inserting" OnUpdating="theSource_Updating" OnDeleting="theSource_Deleting">
<
SelectParameters
>
<
asp:ControlParameter
Name
=
"UserName"
DbType
=
"String"
ControlID
=
"UserNameTextBox"
PropertyName
=
"Text"
/>
</
SelectParameters
>
<
DeleteParameters
>
<
asp:Parameter
Name
=
"GoalID"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"UserName"
DbType
=
"String"
/>
</
DeleteParameters
>
<
InsertParameters
>
<
asp:ControlParameter
Name
=
"UserName"
DbType
=
"String"
ControlID
=
"UserNameTextBox"
PropertyName
=
"Text"
/>
<
asp:Parameter
Name
=
"BeginDate"
DbType
=
"DateTime"
/>
<
asp:Parameter
Name
=
"EndDate"
DbType
=
"DateTime"
/>
<
asp:Parameter
Name
=
"GoalName"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"WeeklyGoal"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"Task1"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task2"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task3"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task4"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task5"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task6"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task7"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task8"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task9"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task10"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"T1EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"T2EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"T3EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"T4EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"T5EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"T6EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"T7EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"T8EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"T9EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"T10EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
</
InsertParameters
>
<
UpdateParameters
>
<
asp:ControlParameter
Name
=
"UserName"
DbType
=
"String"
ControlID
=
"UserNameTextBox"
PropertyName
=
"Text"
/>
<
asp:Parameter
Name
=
"GoalID"
DbType
=
"Int32"
/>
<
asp:Parameter
Name
=
"BeginDate"
DbType
=
"DateTime"
/>
<
asp:Parameter
Name
=
"EndDate"
DbType
=
"DateTime"
/>
<
asp:Parameter
Name
=
"GoalName"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"WeeklyGoal"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task1"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task2"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task3"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task4"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task5"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task6"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task7"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task8"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task9"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"Task10"
DbType
=
"String"
/>
<
asp:Parameter
Name
=
"T1EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"T2EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"T3EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"T4EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"T5EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"T6EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"T7EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"T8EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"T9EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"T10EstimatedHours"
DbType
=
"Decimal"
DefaultValue
=
"0.00"
/>
<
asp:Parameter
Name
=
"GoalComplete"
DbType
=
"Boolean"
/>
<
asp:Parameter
Name
=
"T1Complete"
DbType
=
"Boolean"
/>
<
asp:Parameter
Name
=
"T2Complete"
DbType
=
"Boolean"
/>
<
asp:Parameter
Name
=
"T3Complete"
DbType
=
"Boolean"
/>
<
asp:Parameter
Name
=
"T4Complete"
DbType
=
"Boolean"
/>
<
asp:Parameter
Name
=
"T5Complete"
DbType
=
"Boolean"
/>
<
asp:Parameter
Name
=
"T6Complete"
DbType
=
"Boolean"
/>
<
asp:Parameter
Name
=
"T7Complete"
DbType
=
"Boolean"
/>
<
asp:Parameter
Name
=
"T8Complete"
DbType
=
"Boolean"
/>
<
asp:Parameter
Name
=
"T9Complete"
DbType
=
"Boolean"
/>
<
asp:Parameter
Name
=
"T10Complete"
DbType
=
"Boolean"
/>
</
UpdateParameters
>
</
asp:SqlDataSource
>
</
div
>
<
div
class
=
"cleaner"
>
</
div
>
<
div
align
=
"center"
class
=
"footertext"
>
<
a
href
=
"Default.aspx"
>Home</
a
> | <
a
href
=
"WeeklyGoals.aspx"
>Weekly Goals</
a
> |
<
a
href
=
"GoalLibrary.aspx"
>Goal Library</
a
> | <
a
href
=
"AnnualGoals.aspx"
>Annual
Goals</
a
> | <
asp:HyperLink
ID
=
"BottomManagersPortalLink"
runat
=
"server"
Text
=
"Managers Portal"
Enabled
=
"false"
Visible
=
"false"
NavigateUrl
=
"~/ManagersPortal.aspx"
></
asp:HyperLink
> | <
asp:HyperLink
ID
=
"BottomAdminPortalLink"
runat
=
"server"
Text
=
"Admin Portal"
Enabled
=
"false"
Visible
=
"false"
NavigateUrl
=
"~/AdminPortal.aspx"
></
asp:HyperLink
>
<
span
style
=
"color: Black;"
>
<
br
/>
© 2011 RHODES FINANCIAL SERVICES, INC. - All Rights Reserved </
span
>
</
div
>
</
form
>
</
body
>
</
html
>
0

pmourfield
Top achievements
Rank 1
answered on 28 Sep 2011, 06:17 PM
I believe it has something to do with the AJAX settings. I commented out the RadAjaxManager and while the page refreshes a lot, the problem does not happen anymore. When the AJAX is on, the project works just fine locally. The problem only happens on the remote server. Are there any server settings that need to be changed, added, removed in order to get this to work?
0
Hello Joshua,
Your code looks correct and I am really not sure what might be causing the described problem. If you could prepare and send us a running project via support ticket, demonstrating the issue, we will do our best to help you get the desired result.
Thank you.
All the best,
Pavlina
the Telerik team
Your code looks correct and I am really not sure what might be causing the described problem. If you could prepare and send us a running project via support ticket, demonstrating the issue, we will do our best to help you get the desired result.
Thank you.
All the best,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now