protected void RadGrid1_InsertCommand(object sender, GridCommandEventArgs e)
{
try
{
//Get the GridEditFormInsertItem of the RadGrid
GridDataInsertItem insertedItem = (GridDataInsertItem)e.Item;
RadComboBox RadComboboxUnloadType = insertedItem.FindControl("RadComboBoxUnloadType") as RadComboBox;
RadDatePicker EventStartDateTime = (RadDatePicker)insertedItem["EventStartDateTime"].Controls[0];
RadDatePicker EventEndDateTime = (RadDatePicker)insertedItem["EventEndDateTime"].Controls[0];
WellVentData WellVent = new WellVentData();
WellVent.UpdateInsertEvent(CAI,
RadComboboxUnloadType.SelectedValue.ToString(),
EventStartDateTime.SelectedDate.ToString(),
EventEndDateTime.SelectedDate.ToString(),
(insertedItem["CountofEvents"].Controls[0] as RadNumericTextBox).Text,
(insertedItem["SalesLinePressure"].Controls[0] as RadNumericTextBox).Text,
(insertedItem["ShutInPressure"].Controls[0] as RadNumericTextBox).Text,
(insertedItem["FOpHierarchy_ID"].Controls[0] as TextBox).Text);
}
catch (Exception ex)
{
RadGrid1.Controls.Add(new LiteralControl("Unable to insert Event. Reason: " + ex.Message));
e.Canceled = true;
}
}
********The following contains the aspx code******************
<
telerik:RadGrid ID="RadGrid1" GridLines="None" AutoGenerateColumns="False"
runat="server" AllowPaging="True" AllowSorting="True"
OnItemDataBound="OnItemDataBoundHandler"
AllowAutomaticUpdates="True" AllowAutomaticInserts="True"
ShowStatusBar="True" AllowFilteringByColumn="True"
CellSpacing="0" EnableAJAX="True" onneeddatasource="RadGrid1_NeedDataSource"
oninsertcommand="RadGrid1_InsertCommand"
onupdatecommand="RadGrid1_UpdateCommand"
ondeletecommand="Rad" AllowAutomaticDeletes="True" >
<MasterTableView ShowFooter="false" DataKeyNames="ResultsID" EditMode="InPlace" CommandItemDisplay="TopAndBottom">
I'm adding a custom tooltip to "Special" events on the RadCalendar. My code is below.
cell.Attributes.Add(
"id", "Calendar1_" + i.ToString());
RadToolTipManager1.TargetControls.Add(e.Cell.Attributes[
"id"], i.ToString(), true);
This works on the current month view. So I'll hover and tooltip shows.....But when I add a future Event, I'll click on the next month link and it will show..ex. 9/9/2011....but when I hover all I get is a regular tooltip.
Things I want to do:
1. I want to load all my events info as the Page/Calendar loads. I do not want to make an Ajax call.
2. Tooltip doesnt seem to work on Weekends either, even on the current month....ex. 08/20/2011.....Any ideas?
Full Code:
protected void RadCalendar1_Load(object sender, EventArgs e)
{
RadCalendarDay calendarDay1 = new RadCalendarDay();
// calendarDay1.TemplateID = "EventTemplate";
calendarDay1.Date =
new DateTime(2011, 8, 19);
calendarDay1.ItemStyle.BorderColor = System.Drawing.
Color.Green;
calendarDay1.ItemStyle.BackColor = System.Drawing.
Color.Yellow;
RadCalendar1.SpecialDays.Add(calendarDay1);
 
RadCalendarDay calendarDay2 = new RadCalendarDay();
calendarDay2.Date =
new DateTime(2011, 9, 9);
calendarDay2.ItemStyle.CssClass =
"rcEvent";
calendarDay2.ToolTip =
"This is a test2<br/>Hello2";
RadCalendar1.SpecialDays.Add(calendarDay2);
RadCalendarDay calendarDay3 = new RadCalendarDay();
calendarDay3.Date =
new DateTime(2011, 8, 30);
calendarDay3.ItemStyle.BorderColor = System.Drawing.
Color.Green;
calendarDay3.ItemStyle.BackColor = System.Drawing.
Color.Yellow;
// calendarDay3.TemplateID = "EventTemplate";
RadCalendar1.SpecialDays.Add(calendarDay3);
RadCalendarDay calendarDay4 = new RadCalendarDay();
calendarDay4.Date =
new DateTime(2011, 3, 6);
calendarDay4.ItemStyle.BorderColor = System.Drawing.
Color.Green;
calendarDay4.ItemStyle.BackColor = System.Drawing.
Color.Yellow;
// calendarDay3.TemplateID = "EventTemplate";
RadCalendar1.SpecialDays.Add(calendarDay4);
RadCalendarDay calendarDay5 = new RadCalendarDay();
calendarDay5.Date =
new DateTime(2011, 12, 11);
calendarDay5.ItemStyle.BorderColor = System.Drawing.
Color.Green;
calendarDay5.ItemStyle.BackColor = System.Drawing.
Color.Yellow;
// calendarDay3.TemplateID = "EventTemplate";
RadCalendar1.SpecialDays.Add(calendarDay5);
}
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
{
Control ctrl = Page.LoadControl("ToolTip.ascx");
args.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl);
ToolTip details = (ToolTip)ctrl;
details.TestText = args.Value;
}
 
protected void RadCalendar1_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)
{
//string test = "Hello";
if (IsDayRegisteredForTooltip((e.Day.Date)))
{
TableCell cell = e.Cell;
// cell.CssClass = "Appointment";
string localTime = DateTime.Now.ToLocalTime().ToString();
//cell.Attributes.Add("id", "Calendar1_" + localTime);
//RadToolTipManager1.TargetControls.Add(e.Cell.Attributes["id"], localTime, true);
cell.Attributes.Add(
"id", "Calendar1_" + i.ToString());
RadToolTipManager1.TargetControls.Add(e.Cell.Attributes[
"id"], i.ToString(), true);
// RadToolTip1.Controls.Add(cell);
i++;
}
}
private bool IsDayRegisteredForTooltip(DateTime date)
{
if (date.ToShortDateString().Equals("8/30/2011") || date.ToShortDateString().Equals("9/9/2011"))
// if ( date.ToShortDateString().Equals("9/10/2011"))
{
return true;
}
else
{
return false;
}
}

1. Attach files as pcs no.1 on attach flle.
2. create file upload control as pcs no.2 on attach flle.
3. above attach files nothing becuae of postback
It's my big problem...
Do you have a ideas that how to reload files on upload like text and date?
my code is below..
Please help me...
thanks.
case 3:
RadUpload upload = (RadUpload)table.Rows[i].Cells[j].FindControl("RaduplodeAttach_" + i + j);
string serverfileName = string.Empty;
int fileCount = upload.UploadedFiles.Count;
RadUploadContext upcontext = RadUploadContext.Current;
//upcontext.UploadedFiles = upload.UploadedFiles;
if (fileCount>0)
{
upload.EnableViewState = false;
for (int k = 0; k < fileCount; k++)
{
FileInfo fInfo = new FileInfo(upload.UploadedFiles[k].FileName);
//?????????
}
}
break;