or
protected
override
string
FormatDataValue(
object
dataValue, GridItem item)
{
return
FormatString(dataValue, DataBinder.GetDataItem(item));
}
protected
virtual
string
FormatString(
object
dataValue,
object
DataItem)
{
if
(dataValue !=
null
)
{
String lc = LanguageCodeField.HasValue()
? DataBinder.Eval(DataItem, LanguageCodeField).ToString()
: String.Empty;
CultureInfo ci = lc.HasValue()
?
new
CultureInfo(lc)
: CultureInfo.CurrentCulture;
if
(DataFormatString.HasValue())
{
return
String.Format(ci, DataFormatString, dataValue);
}
if
(dataValue
is
DateTime)
{
return
Dates.GetShortDateTimeString(dataValue
as
DateTime?);
}
if
(IsCurrency)
{
double
dv = Convert.ToDouble(dataValue);
return
Cultures.FormatCurrencyValue(lc, dv);
}
return
String.Format(ci,
"{0}"
, dataValue);
}
return
String.Empty;
}
<
cc2:MyBoundColumn
HeaderText
=
"[Total New]"
UniqueName
=
"TOTALEXPENSECALC2"
DataField
=
"TOTALEXPENSE"
Resizable
=
"false"
Reorderable
=
"false"
LanguageCodeField
=
"LANGUAGECODE"
Aggregate
=
"Sum"
FooterStyle-CssClass
=
"textbold"
FooterText
=
"Page Total "
/>
<
telerik:GridBoundColumn
HeaderText
=
"[Total Standard]"
UniqueName
=
"TOTALEXPENSECALC3"
DataField
=
"TOTALEXPENSE"
Resizable
=
"false"
Reorderable
=
"false"
Aggregate
=
"Sum"
FooterStyle-CssClass
=
"textbold"
FooterText
=
"Page Total "
DataFormatString
=
"{0:C}"
/>
How can I:
1. Add new pagesize values to the RadDataPagerPageSizeField drop-down?
2. Remove, or replace, the hard-coded values?
function OpenCreateVirtualFarmWindow(button, args) {
var oManager = GetRadWindowManager();
var oWnd = oManager.getWindowByName("CaasRADWindow");
//oWnd.SetSize(400, 400);
oWnd.SetHeight(1000);
oWnd.SetWidth(400);
oWnd.SetUrl(
"/CaasCustomerPortal/CreateNewFarm.aspx");
oWnd.Show();
return false;
//CreateAndShowModal('/CreateNewFarm.aspx', 'Modal1', 'Default Window at 450 pixels wide', 450);
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
>
<
title
>HI MIKE</
title
>
</
head
>
<
style
type
=
"text/css"
>
HTML BODY .RadInput .riTextBox
{
border-bottom: 1px solid;
border-left: 1px solid;
padding-bottom: 3px;
padding-left: 1px;
padding-right: 1px;
border-top: 1px solid;
border-right: 1px solid;
padding-top: 2px;
}
.RadInput_Office2007
{
font: 12px "segoe ui", arial, sans-serif;
}
HTML BODY .RadInput_Office2007 .riTextBox
{
border-bottom-color: #abc1de;
border-top-color: #abc1de;
font: 12px "segoe ui", arial, sans-serif;
background: #fff;
color: #000;
border-right-color: #abc1de;
border-left-color: #abc1de;
}
HTML BODY .RadInput_Office2007 .riDisabled
{
border-bottom-color: #ccdbed;
border-top-color: #ccdbed;
color: #8d8d8d;
border-right-color: #ccdbed;
border-left-color: #ccdbed;
cursor: default;
}
</
style
>
<
body
>
<
input
id
=
"Text1"
type
=
"text"
value
=
"Disabled"
disabled
=
"disabled"
/>
<
br
/>
<
input
id
=
"Text2"
type
=
"text"
value
=
"Read Only"
readonly
=
"readonly"
/>
<
br
/>
<
span
id
=
"ctl02_ctl01_OBJ_FIRSTNAME_wrapper"
class
=
"RadInput RadInput_Office2007"
style
=
"white-space:nowrap;"
>
<
input
value
=
"rtyrty"
type
=
"text"
maxlength
=
"25"
size
=
"20"
id
=
"ctl02_ctl01_OBJ_FIRSTNAME_text"
name
=
"ctl02_ctl01_OBJ_FIRSTNAME_text"
class
=
"riTextBox riDisabled"
disabled
=
"disabled"
style
=
"width:25ex;"
/>
</
span
>
</
body
>
</
html
>
<
asp:SqlDataSource
ID
=
"sqlMain"
runat
=
"server"
></
asp:SqlDataSource
>
<
asp:SqlDataSource
ID
=
"sqlUsers"
runat
=
"server"
></
asp:SqlDataSource
>
<
telerik:RadScheduler
ID
=
"radSchedule1"
runat
=
"server"
Height
=
"100%"
MinutesPerRow
=
"15"
Skin
=
"Web20"
StartInsertingInAdvancedForm
=
"True"
AdvancedForm-Modal
=
"True"
AdvancedForm-Width
=
"400px"
TimelineView-GroupBy
=
"Users"
TimelineView-GroupingDirection
=
"Vertical"
FirstDayOfWeek
=
"Monday"
SelectedView
=
"WeekView"
Localization-HeaderWeek
=
"Work Week"
>
<
ResourceTypes
>
<
telerik:ResourceType
KeyField
=
"UserId"
Name
=
"Users"
TextField
=
"Name"
ForeignKeyField
=
"UserId"
DataSourceID
=
"sqlUsers"
/>
</
ResourceTypes
>
<
AdvancedInsertTemplate
>
......
</
AdvancedInsertTemplate
>
<
AdvancedEditTemplate
>
......
</
AdvancedEditTemplate
>
</
telerik:RadScheduler
>