This method correctly loads the data and binds it to the infragistics control as long as I remove the object source, EventArgs e and call the method from page_load.
Is that a good idea to remove the object source, eventArgs e?
protected void dgvAppts_NeedDataSource(object source, EventArgs e)
{
if (Session.IsNewSession == false)
{
DataTable ApptTable = new DataTable();
ApptTable = objGatewayFunctions.GetAppointmentReCap(Session["LoginID"].ToString(), RecapDate.ToShortDateString(), "R", ConfigurationManager.AppSettings["Connection"].ToString());
this.dgvAppts.DataSource = ApptTable;
//if (ApptTable.Rows.Count == 0)
//{
// this.uwtTabs.Tabs(0).Style.ForeColor = System.Drawing.Color.Gray;
//}
//else
//{
// this.uwtTabs.Tabs(0).Style.ForeColor = System.Drawing.Color.Black;
//}
}
}
If it's better to have the object source, EventArgs e present in the method. How do I call that function so it can load the WebDataGrid?