<
asp:UpdatePanel
runat
=
"server"
><
ContentTemplate
>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
ShowStatusBar
=
"true"
Skin
=
"Outlook"
AutoGenerateColumns
=
"False"
PageSize
=
"12"
AllowSorting
=
"True"
AllowMultiRowSelection
=
"False"
AllowPaging
=
"True"
OnNeedDataSource
=
"RadGrid1_NeedDataSource"
OnItemCommand
=
"RadGrid1_ItemCommand"
AllowFilteringByColumn
=
"True"
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
></
PagerStyle
>
<
ExportSettings
IgnorePaging
=
"true"
OpenInNewWindow
=
"true"
ExportOnlyData
=
"true"
/>
<
ClientSettings
>
<
Scrolling
AllowScroll
=
"true"
UseStaticHeaders
=
"false"
/>
</
ClientSettings
>
<
MasterTableView
Width
=
"100%"
DataKeyNames
=
"intID"
AllowMultiColumnSorting
=
"True"
CommandItemDisplay
=
"Top"
CommandItemSettings-ShowExportToExcelButton
=
"true"
CommandItemSettings-ShowAddNewRecordButton
=
"false"
UseAllDataFields
=
"true"
>
<
Columns
>
<
telerik:GridEditCommandColumn
></
telerik:GridEditCommandColumn
>
<
telerik:GridButtonColumn
CommandName
=
"Delete"
Text
=
"Delete"
UniqueName
=
"column"
/>
<
telerik:GridBoundColumn
SortExpression
=
"strSiteID"
HeaderText
=
"Location"
HeaderButtonType
=
"LinkButton"
DataField
=
"strSiteID"
>
</
telerik:GridBoundColumn
>
<
telerik:GridDateTimeColumn
SortExpression
=
"dtInvoiceDate"
HeaderText
=
"Invoice Date"
HeaderButtonType
=
"LinkButton"
DataField
=
"dtInvoiceDate"
DataFormatString
=
"{0:d}"
PickerType
=
"DatePicker"
FilterControlWidth
=
"100px"
>
</
telerik:GridDateTimeColumn
>
<
telerik:GridBoundColumn
SortExpression
=
"strInvoiceNo"
HeaderText
=
"Invoice"
HeaderButtonType
=
"LinkButton"
DataField
=
"strInvoiceNo"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
SortExpression
=
"strItemNo"
HeaderText
=
"Part #"
HeaderButtonType
=
"LinkButton"
DataField
=
"strItemNo"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
SortExpression
=
"intItemCount"
HeaderText
=
"QTY"
HeaderButtonType
=
"LinkButton"
DataField
=
"intItemCount"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
SortExpression
=
"strCondition"
HeaderText
=
"Condition"
HeaderButtonType
=
"LinkButton"
DataField
=
"strCondition"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
SortExpression
=
"strStatus"
HeaderText
=
"Status"
HeaderButtonType
=
"LinkButton"
DataField
=
"strStatus"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
SortExpression
=
"strETA"
HeaderText
=
"ETA"
HeaderButtonType
=
"LinkButton"
DataField
=
"strETA"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
SortExpression
=
"strBoxID"
HeaderText
=
"Box ID"
HeaderButtonType
=
"LinkButton"
DataField
=
"strBoxID"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
ContentTemplate
></
asp:UpdatePanel
>
<
td
>
<
div
style
=
"text-align: center"
>
<
telerik:RadTextBox
ID
=
"RadTextBox1"
runat
=
"server"
Style="border-style: solid; border-width: 8px;
border-color: #e9e5d9; font-size: medium; border-radius: 3px 0px 0px 3px; font: bold 15px/10px 'lucida sans', 'trebuchet MS', 'Tahoma';"
Height
=
"48px"
Width
=
"470px"
EmptyMessage
=
"search here......"
>
</
telerik:RadTextBox
><
asp:Button
ID
=
"btnSearch"
runat
=
"server"
Style="overflow: visible; position: absolute;
border: 0px none #d83c3c; padding: 0; cursor: pointer; height: 48px; width: 110px;
font: bold 15px/0px 'lucida sans', 'trebuchet MS', 'Tahoma'; color: #fff; text-transform: uppercase;
border-radius: 0px 3px 3px 0px; background-color: #d83c3c;"
Text
=
"SEARCH"
/>
</
div
>
</
td
>
I need to create some controls dynamically from code behind, and then, I need to add a JavaScript code to this control.. something like this:
Dim radTextbox As Telerik.Web.UI.RadTextBox
radTextbox = New Telerik.Web.UI.RadTextBox
radTextbox.TextMode = Telerik.Web.UI.InputMode.SingleLine
radTextbox.ID = drRow.item("CampoAlias") 'Name added dynamically
radTextbox.EnableViewState = False
radTextbox.Width = "200"
radTextbox.ClientEvents.OnValueChanged = "Titulo___onChange()" 'Function name added dynamically
Dim strString as string 'code will be added dynamically too
strString = "<script type='text/javascript'>"
strString +=" function Titulo___onChange() { alert(' Hello!!!'); }"
strString +="</script>"
//here I have to add the javascript code to the page… how???? I don’t now!!!
// how can I be sure the postback will work very well too.
Other option I tested and It didn’t work out:
------------------------------------------------------------------
I need to create some controls dynamically from code behind, and then, I need to add a JavaScript code to this control.. something like this:
Dim radTextbox As Telerik.Web.UI.RadTextBox
radTextbox = New Telerik.Web.UI.RadTextBox
radTextbox.TextMode = Telerik.Web.UI.InputMode.SingleLine
radTextbox.ID = drRow.item("CampoAlias") 'Name added dynamically
radTextbox.EnableViewState = False
radTextbox.Width = "200"
radTextbox.ClientEvents.OnValueChanged = "Titulo___onChange()" 'Function name added dynamically
Dim scriptText As String = ""
scriptText = "function Titulo___onChange(){"
scriptText += " alert(' Hello '); "
scriptText += " }"
ClientScript.RegisterClientScriptBlock(Me.GetType(), "CounterScript", scriptText, True)
‘The first execution work out well, but in the postback send a error: “Microsoft JScript runtime error: Object expected”
SO THAT unhandeled (system) exceptions get automatically logged to ELMAH table and System Error page is displayed when an such exception occurs.
Can anybody give solution for this?
<
telerik:RadChart
ID
=
"RadChartModelingZones"
runat
=
"server"
DataSourceID
=
"SqlDataSourceModelingZones"
DefaultType
=
"Spline"
Skin
=
"Gray"
ChartTitle-TextBlock-Text
=
"Merit"
>
<
Appearance
Corners
=
"Round, Round, Round, Round, 7"
>
<
FillStyle
FillType
=
"ComplexGradient"
>
<
FillSettings
GradientMode
=
"Horizontal"
>
<
ComplexGradient
>
<
telerik:GradientElement
Color
=
"236, 236, 236"
/>
<
telerik:GradientElement
Color
=
"248, 248, 248"
Position
=
"0.5"
/>
<
telerik:GradientElement
Color
=
"236, 236, 236"
Position
=
"1"
/>
</
ComplexGradient
>
</
FillSettings
>
</
FillStyle
>
<
Border
Color
=
"130, 130, 130"
/>
</
Appearance
>
<
Series
>
<
telerik:ChartSeries
Name
=
"Series 1"
Type
=
"Spline"
>
<
Appearance
>
<
FillStyle
MainColor
=
"164, 164, 164"
>
</
FillStyle
>
<
TextAppearance
TextProperties-Color
=
"51, 51, 51"
>
</
TextAppearance
>
</
Appearance
>
</
telerik:ChartSeries
>
<
telerik:ChartSeries
Name
=
"Series 2"
Type
=
"Spline"
>
<
Appearance
>
<
FillStyle
MainColor
=
"108, 108, 108"
>
</
FillStyle
>
<
TextAppearance
TextProperties-Color
=
"51, 51, 51"
>
</
TextAppearance
>
</
Appearance
>
</
telerik:ChartSeries
>
</
Series
>
<
Legend
>
<
Appearance
Dimensions-Margins
=
"17.6%, 3%, 1px, 1px"
Dimensions-Paddings
=
"2px, 8px, 6px, 3px"
Position-AlignedPosition
=
"TopRight"
>
<
ItemMarkerAppearance
Figure
=
"Square"
>
<
Border
Width
=
"0"
/>
</
ItemMarkerAppearance
>
<
FillStyle
MainColor
=
""
>
</
FillStyle
>
<
Border
Width
=
"0"
/>
</
Appearance
>
</
Legend
>
<
PlotArea
>
<
XAxis
>
<
Appearance
Color
=
"182, 182, 182"
MajorTick-Color
=
"216, 216, 216"
>
<
MajorGridLines
Color
=
"216, 216, 216"
PenStyle
=
"Solid"
/>
<
TextAppearance
TextProperties-Color
=
"51, 51, 51"
>
</
TextAppearance
>
</
Appearance
>
<
AxisLabel
>
<
TextBlock
>
<
Appearance
TextProperties-Color
=
"51, 51, 51"
>
</
Appearance
>
</
TextBlock
>
</
AxisLabel
>
</
XAxis
>
<
YAxis
>
<
Appearance
Color
=
"182, 182, 182"
MajorTick-Color
=
"216, 216, 216"
MinorTick-Color
=
"223, 223, 223"
>
<
MajorGridLines
Color
=
"216, 216, 216"
/>
<
MinorGridLines
Color
=
"223, 223, 223"
/>
<
TextAppearance
TextProperties-Color
=
"51, 51, 51"
>
</
TextAppearance
>
</
Appearance
>
<
AxisLabel
>
<
TextBlock
>
<
Appearance
TextProperties-Color
=
"51, 51, 51"
>
</
Appearance
>
</
TextBlock
>
</
AxisLabel
>
</
YAxis
>
<
Appearance
>
<
FillStyle
FillType
=
"Solid"
MainColor
=
"White"
>
</
FillStyle
>
<
Border
Color
=
"182, 182, 182"
/>
</
Appearance
>
</
PlotArea
>
<
ChartTitle
>
<
Appearance
>
<
FillStyle
MainColor
=
""
>
</
FillStyle
>
</
Appearance
>
<
TextBlock
>
<
Appearance
TextProperties-Color
=
"102, 102, 102"
TextProperties-Font
=
"Arial, 18pt"
>
</
Appearance
>
</
TextBlock
>
</
ChartTitle
>
</
telerik:RadChart
>
<
asp:SqlDataSource
ID
=
"SqlDataSourceModelingZones"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:...%>"
SelectCommand="GetMeritModelingZones"
SelectCommandType="StoredProcedure">
<
SelectParameters
>
<
asp:ControlParameter
ControlID
=
"RadSlider"
DefaultValue
=
"0.00"
Name
=
"Merit"
PropertyName
=
"SelectedValue"
Type
=
"Decimal"
/>
</
SelectParameters
>
</
asp:SqlDataSource
>