protected void Page_Load(object sender, EventArgs e)
{
DataTable tblTest = new DataTable();
tblTest.Columns.Add("ID");
tblTest.Columns.Add("RoomID");
tblTest.Columns.Add("startdate");
tblTest.Columns.Add("enddate");
tblTest.Columns.Add("Subject");
tblTest.Columns.Add("RoomName");
DataRow drTest;
drTest = tblTest.NewRow();
drTest["ID"] = 2;
drTest["RoomID"] = 2;
drTest["startdate"] = "2011-01-11 10:00:00.000";
drTest["enddate"] = "2011-01-11 12:00:00.000";
drTest["Subject"] = "Scheduled Lesson1";
drTest["RoomName"] = "Room1";
tblTest.Rows.Add(drTest);
drTest = tblTest.NewRow();
drTest["ID"] = 2;
drTest["RoomID"] = 2;
drTest["startdate"] = "2011-01-11 14:00:00.000";
drTest["enddate"] = "2011-01-11 16:00:00.000";
drTest["Subject"] = "Scheduled Lesson2";
drTest["RoomName"] = "Room1";
tblTest.Rows.Add(drTest);
drTest = tblTest.NewRow();
drTest["ID"] = 3;
drTest["RoomID"] = 3;
drTest["startdate"] = "2011-01-11 12:00:00.000";
drTest["enddate"] = "2011-01-11 14:00:00.000";
drTest["Subject"] = "Scheduled Lesson3";
drTest["RoomName"] = "Room2";
tblTest.Rows.Add(drTest);
drTest = tblTest.NewRow();
drTest["ID"] = 4;
drTest["RoomID"] = 4;
drTest["startdate"] = "2011-01-11 12:00:00.000";
drTest["enddate"] = "2011-01-11 14:00:00.000";
drTest["Subject"] = "Scheduled Lesson4";
drTest["RoomName"] = "Room3";
tblTest.Rows.Add(drTest);
RadScheduler2.ResourceTypes[0].DataSource = tblTest;
RadScheduler2.DataSource = tblTest;
RadScheduler2.DataBind();
}
and following is design part(.aspx)
<telerik:RadScheduler ID="RadScheduler2" Skin="Vista" runat="server" DataKeyField="ID"
DataSubjectField="Subject" GroupBy="Room" GroupingDirection="Horizontal" DataStartField="startdate" DataEndField="enddate" Height="552px">
<AdvancedForm Modal="true" />
<TimelineView UserSelectable="false" />
<WeekView UserSelectable="false" />
<MonthView UserSelectable="false" />
<DayView UserSelectable="false" />
<ResourceTypes>
<telerik:ResourceType KeyField="ID" Name="Room" TextField="RoomName" ForeignKeyField="RoomID" />
</ResourceTypes>
<AppointmentTemplate>
<div class="rsAptSubject">
<%# Eval("Subject") %>
</div>
<%# Eval("Description")%>
</AppointmentTemplate>
<TimeSlotContextMenuSettings EnableDefault="true" />
<AppointmentContextMenuSettings EnableDefault="true" />
</telerik:RadScheduler>
You can check its output in attachment.
Is anything wrong with the code?
Can you help?
Thanks & Regards,
Ruchir
Hi
I am trying to hide the GridEditCommandColumn of a GridTableView when the user clicks on the “add new record” commandItem of the GridTableView.
GridEditCommandColumn editColumnMaster = (GridEditCommandColumn)radGridProjects.MasterTableView.GetColumn("masterEditColum");
editColumnMaster.Visible = false;
The above code in the item command event of the grid works perfectly to hide the editcolumn of the mastertableview but not the detail table. It seems to me the GridTableView’s editcolumn only hides after the user clicks on save or cancel. The hierarchy load mode of the grid is set to ServerBind and I am using form templates.
Thank you
Fred

<telerik:GridButtonColumn CommandName="Delete" HeaderStyle-Width="30px" Text="Delete" UniqueName="columnButtonDelete" ConfirmDialogType="RadWindow" ConfirmText="Are you sure to delete the record?" ConfirmTitle="Confirm Delete"></telerik:GridButtonColumn>CType(DataItem("columnButtonDelete").Controls(0), LinkButton).Enabled = False<telerik:RadGrid ID="GridMonies" runat="server"> </telerik:RadGrid>GridMonies.DataSource = WSA.PaymentDrawdownView(WSARecord) GridMonies.DataBind()