Hello Telerik Team,
I am trying to bind multiple datasources to the RadScheduler. For my code below, I am able to able to bind either Sharepoint List or Just SQL. Please help me correct my code so that I can support both datasources on the RadScheduler. Thanks.
I am trying to bind multiple datasources to the RadScheduler. For my code below, I am able to able to bind either Sharepoint List or Just SQL. Please help me correct my code so that I can support both datasources on the RadScheduler. Thanks.
DataSet dS = new DataSet(); |
DataTable dT = listItems.GetDataTable(); |
dS.Merge(dT); |
dT.Columns.Add("FromSql"); |
SqlDataAdapter myCnd = new SqlDataAdapter(); |
myCnd = new SqlDataAdapter("select tID, tDATE, tTITLE, dDATE from myTable", strConn); |
DataSet dS1 = new DataSet(); |
myCnd.Fill(dS1); |
foreach (DataRow row in dt.Rows) |
{ |
DataRow custdRow = dT.custdRow(); |
custdRow["ID"] = row["tID"].ToString(); |
custdRow["Title"] = row["tTITLE"].ToString(); |
custdRow["strtDate"] = row["tDATE"].ToString(); |
custdRow["endDate"] = row["dDATE"].ToString(); |
custdRow["FromSql"] = "Retrieve"; |
dT.Rows.Add(custdRow); |
} |
dS1.Merge(dT); |
dS.Merge(dS1,true); |
//RadScheduler1.DataSource = dT ; |
RadScheduler1.DataSource = dS; |
RadScheduler1.DataKeyField = "ID"; |
RadScheduler1.DataStartField = "strtDate"; |
RadScheduler1.DataEndField = "endDate"; |
RadScheduler1.DataSubjectField = "Title"; |
RadScheduler1.DataBind(); |