or
Hello,
I have a table with three fields: RowID, CustomerName and Selected. I am loading this into the gridview and I would like to programmatically select the row where Selected is true. If this was ASP.NET I would use the RowDatabound event and check the value of Selected and highlight. What is the best way here? After I load the list loop back through the data, get the one that is selected and then loop through the rows in the grid to select it? Seems like there would have to be a more efficient way of doing this.
Thanks,
Warren
private
void
dtProdStartDate_Leave(
object
sender, EventArgs e)
{
if
(dtProdEndDate.Text == String.Empty && dtProdStartDate.Value != DateTime.Parse(
"1/1/0001"
))
{
DateTime dtStart = dtProdStartDate.Value;
dtStart = dtStart.AddMonths(1);
DateTime dtEnd = dtStart.AddDays(-dtStart.Day);
dtProdEndDate.Value = dtEnd;
}
else
{
if
(DateTime.Compare(dtProdStartDate.Value, dtProdEndDate.Value) > 0)
{
DateTime dtStart = dtProdStartDate.Value;
dtStart = dtStart.AddMonths(1);
DateTime dtEnd = dtStart.AddDays(-dtStart.Day);
dtProdEndDate.Value = dtEnd;
}
}
}
private
void
dtProdStartDate_Opened(
object
sender, EventArgs e)
{
if
(
this
.dtProdStartDate.Value == DateTime.MinValue)
{
((RadDateTimePickerCalendar)
this
.dtProdStartDate.DateTimePickerElement.GetCurrentBehavior()).Calendar.FocusedDate = DateTime.Now;
}
}
I have add a couple of extra fields in a CustomEditAppointmentDialog.
When i select an appointment in the scheduler I want to put the information out of one of the extra
fields in a textbox on my form.
I can reach all the information in the standard fields from Appointment class. But i can't reach the
information of the extra fields created in the CustomAppointment class.
Can someone help me out how i can reach that information?
private void radScheduler1_AppointmentSelected(object sender, SchedulerAppointmentEventArgs e)
{
if (e.Appointment.Description != null)
{
labelCalendarCustomerNo.Text = e.Appointment.CustNo; //this does not work
labelCalendarCustomerName.Text = e.Appointment.Location; //this works
labelCalendarEnd.Text = e.Appointment.End.ToString(); //this works
labelCalendarStart.Text = e.Appointment.Start.ToString(); //this works
}
}
}
public class CustomAppointment : Appointment
{
public CustomAppointment()
: base()
{
}
private string custNo = String.Empty;
public string CustNo
{
get
{
return this.custNo;
}
set
{
if (this.custNo != value)
{
this.custNo = value;
}
}
}