now, what i want is when i select a perticular row of RadGrid i need to access all the values of that perticular row in a javascript function.
i tried to find these values in 'args' but i havn't found the luck.
Please help.
now, what i want is when i select a perticular row of RadGrid i need to access all the values of that perticular row in a javascript function.
i tried to find these values in 'args' but i havn't found the luck.
Please help.
function
OnClientAppointmentContextMenu(sender, args) {
alert(
"Appointment context menu: " + args.get_appointment().get_subject());
}
function OnClientAppointmentContextMenu(sender, args) {
alert(
"Appointment context menu: " + args.get_appointment().get_statusid());
}
its shows error..ForeignKeyField at run time Then Appointment Not Showing in Scheduler Records Come In Our Dataset ant its bind Successfull bit Does Not Show In Scheduler. Why Please Help Me.
My Source Code :
ds = dl.FillDataSet(
CommandType.StoredProcedure, "uspGetAppointments", HashIn);
if (ds.Tables[0].Rows.Count > 0)
{
RadScheduler1.SelectedDate = CalApp.SelectedDate;
RadScheduler1.DayStartTime =
TimeSpan.Parse(ds.Tables[0].Rows[0].ItemArray[0].ToString());
RadScheduler1.DayEndTime =
TimeSpan.Parse(ds.Tables[0].Rows[0].ItemArray[1].ToString());
RadScheduler1.MinutesPerRow =
int.Parse(ds.Tables[0].Rows[0].ItemArray[2].ToString());
RadScheduler1.TimeLabelRowSpan = 60 /
int.Parse(ds.Tables[0].Rows[0].ItemArray[2].ToString());
RadScheduler1.DataKeyField =
"AppointmentId";
RadScheduler1.DataStartField =
"FromTime";
RadScheduler1.DataEndField =
"ToTime";
RadScheduler1.DataSubjectField =
"Subject";
RadScheduler1.GroupBy =
"Resource";
RadScheduler1.DataDescriptionField =
"StatusColor";
RadScheduler1.ResourceTypes.Clear();
ResourceType rt = new ResourceType("Resource");
rt.DataSource = ds.Tables[2];
rt.KeyField =
"ResourceId";
if (ddlFacility.SelectedValue == "0")
{
rt.ForeignKeyField =
"FacilityId";
}
else
{
rt.ForeignKeyField =
"DoctorId";
}
rt.TextField =
"ResourceName";
RadScheduler1.ResourceTypes.Add(rt);
RadScheduler1.DataSource = ds.Tables[1];
RadScheduler1.DataBind();
Thanks
Chandan
| function lboxItemClicked(sender, args) { |
| var i = args.get_item(); |
| i.set_checked(!i.get_checked()); |
| args.set_cancel(true); |
| } |
| // Add event handler |
| grid.GridExporting += new OnGridExportingEventHandler(grid_GridExporting); |
| // The handler: showing only the PDF branch |
| static void grid_GridExporting(object source, GridExportingArgs e) |
| { |
| RadGrid grid = (RadGrid)source; |
| switch (e.ExportType) |
| { |
| case ExportType.Pdf: |
| ApplyStylesToPDFExport(grid.MasterTableView); |
| break; |
| } |
| } |
Which calls:
| // The routine, trimmed to simple example... the code executes when I step thru it... |
| static void ApplyStylesToPDFExport(GridTableView gtable) |
| { |
| foreach (GridColumn col in gtable.Columns) |
| { |
| col.HeaderStyle.BackColor = System.Drawing.Color.Silver; |
| col.HeaderStyle.ForeColor = System.Drawing.Color.Red; |
| } |
| } |
So what am I doing wrong OR how can I do the equivalent. The PDF export is done by the built-in export buttons... All of the code is in a Utility class because it will be used on dozens of pages...