Hello guys. I'm attempting to tackle a situation where, in the database, there are three columns in a table called JobDate, StartTime, and EndTime. StartTime and EndTime are also stored as a smalldatetime like JobDate. Also, the date portion of StartTime and EndTime is equal to JobDate.
Now, upon clicking the Edit Icon, I see the results as shown in "step-01". Although the values are correct, it still shows up as incorrect. Upon clicking either of the two field while in edit mode, the results achieved are shown in "step-02".
I don't want to show the date portion while editing StartTime and EndTime. This because the date portion will be same as JobDate and a JobDate cannot be changed. Not even by an accident.
Kindly help.
Now, upon clicking the Edit Icon, I see the results as shown in "step-01". Although the values are correct, it still shows up as incorrect. Upon clicking either of the two field while in edit mode, the results achieved are shown in "step-02".
I don't want to show the date portion while editing StartTime and EndTime. This because the date portion will be same as JobDate and a JobDate cannot be changed. Not even by an accident.
Kindly help.
<
telerik:RadGrid
ID
=
"RadGridJobs"
runat
=
"server"
AutoGenerateColumns
=
"False"
AllowPaging
=
"True"
PageSize
=
"25"
AllowSorting
=
"false"
GridLines
=
"None"
Width
=
"885px"
Skin
=
"Office2007"
SkinID
=
"RadGrid_UnPageable"
OnNeedDataSource
=
"RadGridJobs_NeedDataSource"
OnUpdateCommand
=
"RadGridJobs_UpdateCommand"
OnDeleteCommand
=
"RadGridJobs_DeleteCommand"
OnItemCreated
=
"RadGridJobs_ItemCreated"
>
<
MasterTableView
ClientDataKeyNames
=
"OID"
DataKeyNames
=
"OID"
CommandItemDisplay
=
"Top"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"PharmacyName"
HeaderText
=
"Pharmacy"
ReadOnly
=
"True"
SortExpression
=
"PharmacyName"
UniqueName
=
"columnPharmacy"
/>
<
telerik:GridBoundColumn
DataField
=
"CoordinatorName"
HeaderText
=
"Coordinator"
ReadOnly
=
"true"
SortExpression
=
"CoordinatorName"
UniqueName
=
"columnCoordinator"
/>
<
telerik:GridBoundColumn
DataField
=
"JobDate"
HeaderText
=
"Date"
ReadOnly
=
"true"
SortExpression
=
"JobDate"
UniqueName
=
"columnDate"
DataType
=
"System.DateTime"
DataFormatString
=
"{0:dd-MMM-yyyy}"
/>
<
telerik:GridBoundColumn
DataField
=
"StartTime"
HeaderText
=
"Start"
UniqueName
=
"columnStart"
DataType
=
"System.DateTime"
DataFormatString
=
"{0:hh:mm tt}"
/>
<
telerik:GridBoundColumn
DataField
=
"EndTime"
HeaderText
=
"End"
UniqueName
=
"columnEnd"
DataType
=
"System.DateTime"
DataFormatString
=
"{0:hh:mm tt}"
/>
<
telerik:GridBoundColumn
DataField
=
"Rate"
HeaderText
=
"Rate"
UniqueName
=
"columnRate"
DataType
=
"System.Decimal"
DataFormatString
=
"{0:c}"
/>
<
telerik:GridBoundColumn
DataField
=
"RatePlus"
HeaderText
=
"Rate +"
UniqueName
=
"columnRatePlus"
DataType
=
"System.Decimal"
DataFormatString
=
"{0:c}"
/>
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
/>
<
telerik:GridButtonColumn
ConfirmText
=
"Delete this Job?"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"Delete"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
/>
<
telerik:GridTemplateColumn
HeaderText
=
""
UniqueName
=
"NoteColumn"
HeaderStyle-Width
=
"10px"
ItemStyle-Width
=
"10px"
>
<
ItemTemplate
>
<
a
href
=
"../Notes/NotesManager.aspx?RecordID=<%# Eval("
OID") %>&NoteTypeID=3">
<
asp:Image
ID
=
"ImageEditNote"
runat
=
"server"
ImageUrl
=
"~/Images/notes-icon.gif"
AlternateText
=
"Add notes"
Width
=
"15px"
ToolTip
=
"Add notes"
/>
</
a
>
</
ItemTemplate
>
<
HeaderStyle
Width
=
"10px"
></
HeaderStyle
>
<
ItemStyle
Width
=
"10px"
></
ItemStyle
>
</
telerik:GridTemplateColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
ButtonType
=
"ImageButton"
/>
</
EditFormSettings
>
<
CommandItemSettings
ShowRefreshButton
=
"true"
ShowAddNewRecordButton
=
"false"
ShowExportToWordButton
=
"false"
ShowExportToExcelButton
=
"true"
ShowExportToPdfButton
=
"true"
ShowExportToCsvButton
=
"true"
/>
<
PagerStyle
AlwaysVisible
=
"true"
Mode
=
"NextPrevAndNumeric"
Position
=
"TopAndBottom"
/>
</
MasterTableView
>
<
ExportSettings
HideStructureColumns
=
"false"
/>
<
ClientSettings
>
<
Selecting
AllowRowSelect
=
"True"
/>
<
ClientEvents
OnRowDblClick
=
"RadGridJobs_OnRowDblClick"
/>
<
Scrolling
UseStaticHeaders
=
"True"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
<
telerik:RadInputManager
runat
=
"server"
ID
=
"RadInputManagerJobs"
Enabled
=
"true"
>
<
telerik:DateInputSetting
BehaviorID
=
"DateInputSettingStartEnd"
DateFormat
=
"hh:mm:ss tt"
DisplayDateFormat
=
"hh:mm tt"
EmptyMessage
=
"Cannot be empty"
ErrorMessage
=
"Enter valid time"
/>
<
telerik:NumericTextBoxSetting
BehaviorID
=
"NumericTextBoxSettingRate"
Type
=
"Currency"
AllowRounding
=
"true"
DecimalDigits
=
"2"
MinValue
=
"0"
EmptyMessage
=
"Cannot be empty"
ErrorMessage
=
"Enter valid currency"
/>
</
telerik:RadInputManager
>