<
telerik:radscheduler
id
=
"RadScheduler1"
runat
=
"server"
datadescriptionfield
=
"Description"
dataendfield
=
"End"
datakeyfield
=
"AppointmentId"
datarecurrencefield
=
"RecurrenceRule"
datarecurrenceparentkeyfield
=
"RecurenceParentId"
datasourceid
=
"SDSAppointments"
datastartfield
=
"Start"
datasubjectfield
=
"Subject"
enabledescriptionfield
=
"True"
customattributenames
=
"FlightHours,GroundHours,Comments,IsInactive,IsDelivered,IsEdited,IsDeleted"
enablecustomattributeediting
=
"True"
allowdelete
=
"False"
onclientformcreated
=
"OnClientFormCreated"
onappointmentinsert
=
"RadScheduler1_AppointmentInsert"
onappointmentupdate
=
"RadScheduler1_AppointmentUpdate"
>
<
ResourceTypes
>
<
telerik:ResourceType
DataSourceID
=
"SDSStudents"
ForeignKeyField
=
"CustomerId"
KeyField
=
"CustomerID"
Name
=
"Students"
TextField
=
"StudentName"
/>
<
telerik:ResourceType
DataSourceID
=
"SDSLessons"
ForeignKeyField
=
"LessonTypeId"
KeyField
=
"CategoryID"
Name
=
"Lessons"
TextField
=
"Name"
/>
</
ResourceTypes
>
</
telerik:radscheduler
>
AppointmentId | int |
Subject | nvarchar(50) |
Start | datetime |
[End] | datetime |
LessonTypeId | int |
InstructorId | int |
CustomerId | int |
RecurrenceRule | nvarchar(1024) |
RecurenceParentId | int |
Description | nvarchar(MAX) |
IsInactive | tinyint |
IsDelivered | tinyint |
IsEdited | tinyint |
IsDeleted | tinyint |
FlightHours | decimal(18, 0) |
GroundHours | decimal(18, 0) |
Comments | nvarchar(MAX) |
Hello, I am migrating a control from GridView to RadGrid. With GridView, I was able to extend the GridViewRow class:
Public
Class
GridViewSearchRow
Inherits
GridViewRow
ReadOnly
Property
SearchValueEntry
As
ISearchValueEntry
Get
Return
FirstChildControl(Of ISearchValueEntry)()
End
Get
End
Property
Public
Sub
New
(…)
MyBase
.
New
(…)
End
Sub
End
Class
Protected
Overrides
Function
CreateRow(…)
As
GridViewRow
If
rowType = DataControlRowType.DataRow
Then
Return
New
GridViewSearchRow(…)
Else
Return
MyBase
.CreateRow(…)
End
If
End
Function
In Telerik, I am able to extend the GridDataItem class:
Public
Class
RadSearchRow
Inherits
GridDataItem
ReadOnly
Property
SearchValueEntry
As
ISearchValueEntry
Get
Return
FirstChildControl(Of ISearchValueEntry)()
End
Get
End
Property
Public
Sub
New
(…)
MyBase
.
New
(…)
End
Sub
End
Class
Is there a similar way to ensure that all objects in the .Items() collection are added as RadSearchRow? I’ve noticed that the RadGrid’s GridDataItems are created within the CreateChildControl() sub, but since CreateChildControl() isn’t a function (like GridView’s CreateRow) I’m not sure how to mimic it.
Thank you very much.
<a href="http://www.yahoo.com">http://www.yahoo.com</a>
<a href="http://www.someotherwebsite.com">http://www.yahoo.com</a>
<
telerik:RadGrid ID="grdDailyOvertime" runat="server" AutoGenerateColumns="False"
Enabled="false" AutoGenerateEditColumn="false" EnableTheming="true" OnDeleteCommand="grdDailyOvertime_DeleteCommand"
OnInsertCommand="grdDailyOvertime_InsertCommand" OnNeedDataSource="grdDailyOvertime_NeedDataSource"
OnUpdateCommand="grdDailyOvertime_UpdateCommand" OnItemCommand="grdDailyOvertime_ItemCommand"
HeaderStyle-HorizontalAlign="Center">
<MasterTableView Width="100%" CommandItemSettings-ShowRefreshButton="false" CommandItemStyle-HorizontalAlign="Right"
CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="<%$ Resources:PDICulture, GridAddNewRow %>"
EditMode="InPlace">
<Columns>
<telerik:GridTemplateColumn Visible="false" UniqueName="Key" DataField="Key">
<ItemTemplate>
<asp:Label ID="lblDailyOvertimeID" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Key") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:HiddenField ID="hdnDailyOvertimeID" runat="server" Value='<%#DataBinder.Eval(Container.DataItem,"Key") %>' />
</EditItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridEditCommandColumn HeaderText="<%$ Resources:PDICulture, grdEditColumnHeaderText %>"
HeaderStyle-Width="20%" ButtonType="ImageButton" UniqueName="EditColumn">
<ItemStyle CssClass="MyImageButton" />
</telerik:GridEditCommandColumn>
<telerik:GridTemplateColumn HeaderText="<%$ Resources:PDICulture, grdDailyOvertimeHours %>"
UniqueName="DailyHoursExceeding" DataField="DailyHoursExceeding">
<ItemTemplate>
<asp:Label ID="lblDailyHours" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"DailyHoursExceeding") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadTextBox ID="txtDailyHours" MaxLength="5" Width="53%" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"DailyHoursExceeding") %>'>
</telerik:RadTextBox>
<asp:HiddenField ID="hdnDailyHour" runat="server" Value='<%#DataBinder.Eval(Container.DataItem,"DailyHoursExceeding") %>' />
</EditItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="<%$ Resources:PDICulture, grdDailyOvertimeRate %>"
UniqueName="DailyRate" DataField="DailyRate">
<ItemTemplate>
<asp:Label ID="lblDailyRate" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"DailyRate") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadTextBox ID="txtDailyRate" MaxLength="3" Width="65%" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"DailyRate") %>'>
</telerik:RadTextBox>
<asp:HiddenField ID="hdnDailyRate" runat="server" Value='<%#DataBinder.Eval(Container.DataItem,"DailyRate") %>' />
</EditItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</telerik:GridTemplateColumn>
<telerik:GridButtonColumn HeaderText="<%$ Resources:PDICulture, grdDeleteColumnHeaderText %>"
ConfirmText="<%$ Resources:PDICulture, grdDailyDeleteConfirmText %>" ConfirmDialogType="RadWindow"
ConfirmTitle="<%$ Resources:PDICulture, grdDeleteColumnHeaderText %>" ButtonType="ImageButton"
CommandName="Delete" UniqueName="DeleteColumn">
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</telerik:GridButtonColumn>
</Columns>
<NoRecordsTemplate>
<asp:Label runat="server" ID="lblDOTGrdNoRecord" Text="<%$ Resources:PDICulture, GridEmptyMessage %>">
</asp:Label>
</NoRecordsTemplate>
</MasterTableView>
<HeaderStyle Font-Bold="true" CssClass="contentArea" />
<ItemStyle CssClass="contentArea" />
<AlternatingItemStyle CssClass="contentArea" />
</telerik:RadGrid>
Thanks
Rajesh