<
telerik:RadGrid
ID
=
"radgrid1"
runat
=
"server"
Visible
=
"False"
MasterTableView-EnableNoRecordsTemplate
=
"true"
DataSourceID
=
""
AllowPaging
=
"True"
PageSize
=
"20"
OnItemDataBound
=
"radgrid1_ItemDataBound"
>
<
MasterTableView
></
MasterTableView
>
</
telerik:RadGrid
>
If (TypeOf e.Item Is GridDataItem) Then
Dim dataItem As GridDataItem = CType(e.Item, GridDataItem)
dataItem("SSN4").ToolTip = dataItem("SSN").Text
dataItem("Client").ToolTip = dataItem("Description").Text
dataItem("Status").ToolTip = "Change date: " & dataItem("StatusChangeDate").Text
End If
<form id=
"form1"
runat=
"server"
>
<telerik:RadScriptManager ID=
"scriptManagerExc"
runat=
"server"
>
<Scripts>
<%--Needed
for
JavaScript IntelliSense
in
VS2010--%>
<%--For VS2008 replace RadScriptManager with ScriptManager--%>
<asp:ScriptReference Assembly=
"Telerik.Web.UI"
Name=
"Telerik.Web.UI.Common.Core.js"
/>
<asp:ScriptReference Assembly=
"Telerik.Web.UI"
Name=
"Telerik.Web.UI.Common.jQuery.js"
/>
<asp:ScriptReference Assembly=
"Telerik.Web.UI"
Name=
"Telerik.Web.UI.Common.jQueryInclude.js"
/>
</Scripts>
</telerik:RadScriptManager>
<telerik:RadAjaxLoadingPanel ID=
"alpExc"
runat=
"server"
EnableSkinTransparency=
"true"
Skin=
"Office2007"
BackgroundPosition=
"TopLeft"
>
</telerik:RadAjaxLoadingPanel>
<telerik:RadListView ID=
"lvExc"
runat=
"server"
ItemPlaceholderID=
"PlaceHolder1"
AllowMultiFieldSorting=
"true"
AllowPaging=
"true"
Skin=
"Office2007"
OnNeedDataSource=
"lvExc_NeedDataSource"
onprerender=
"lvExc_PreRender"
>
<LayoutTemplate>
<div
class
=
"RadListView RadListView_Office2007"
>
<table cellspacing=
"0"
>
<thead>
<tr
class
=
"rlvHeader"
>
<th style=
"text-align: center;width:190px;"
>
Portfolio
</th>
<th style=
"text-align: center;width:100px;"
>
Average Actuals (SM/M)
</th>
<th style=
"text-align: center;width:100px;"
>
Average Pgm Plan (SM/M)
</th>
<th style=
"text-align: center;width:100px;"
>
Average Grp Plan (SM/M)
</th>
<th style=
"text-align: center;width:100px;"
>
Pgm Plan minus Grp Plan (SM/M)
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan=
"5"
>
<telerik:RadDataPager ID=
"RadDataPager1"
runat=
"server"
PageSize=
"15"
PagedControlID=
"lvExc"
Skin=
"Office2007"
>
<Fields>
<telerik:RadDataPagerButtonField FieldType=
"FirstPrev"
/>
<telerik:RadDataPagerButtonField FieldType=
"Numeric"
/>
<telerik:RadDataPagerButtonField FieldType=
"NextLast"
/>
<telerik:RadDataPagerPageSizeField PageSizeText=
"Page size: "
/>
<telerik:RadDataPagerTemplatePageField>
<PagerTemplate>
<div style=
"float: right"
>
<strong>Items
<asp:Label runat=
"server"
ID=
"CurrentPageLabel"
Text=
"<%# Container.Owner.StartRowIndex+1%>"
/>
to
<asp:Label runat=
"server"
ID=
"TotalPagesLabel"
Text=
"<%# Container.Owner.TotalRowCount > (Container.Owner.StartRowIndex+Container.Owner.PageSize) ? Container.Owner.StartRowIndex+Container.Owner.PageSize : Container.Owner.TotalRowCount %>"
/>
of
<asp:Label runat=
"server"
ID=
"TotalItemsLabel"
Text=
"<%# Container.Owner.TotalRowCount%>"
/>
<br />
</strong>
</div>
</PagerTemplate>
</telerik:RadDataPagerTemplatePageField>
</Fields>
</telerik:RadDataPager>
</td>
</tr>
</tfoot>
<tbody>
<tr style=
"background-color: #9AB5DB;"
>
<td style=
"padding: 5px 7px 4px; text-align: right;"
>
Grand Total:
</td>
<td style=
"text-align: center; padding: 5px 7px 4px;"
>
<asp:Label ID=
"lblTotAvgAct"
runat=
"server"
/>
</td>
<td style=
"text-align: center; padding: 5px 7px 4px;"
>
<asp:Label ID=
"lblTotAvgPgm"
runat=
"server"
/>
</td>
<td style=
"text-align: center; padding: 5px 7px 4px;"
>
<asp:Label ID=
"lblTotAvgGrp"
runat=
"server"
/>
</td>
<td style=
"text-align: center; padding: 5px 7px 4px;"
>
<asp:Label ID=
"lblTotAvgPgmGrp"
runat=
"server"
/>
</td>
</tr>
<tr id=
"PlaceHolder1"
runat=
"server"
>
</tr>
</tbody>
</table>
</div>
</LayoutTemplate>
<ItemTemplate>
<tr
class
=
"rlvI"
>
<td style=
"width:190px;text-align: left;"
>
<asp:HyperLink ID=
"HyperLink1"
NavigateUrl=
'<%# CreateHyperlink(Eval("PORTFOLIO").ToString()) %>'
runat=
"server"
Text=
'<%# Eval("PORTFOLIO").ToString() %>'
></asp:HyperLink>
</td>
<td style=
"width:100px;text-align: center;"
>
<asp:Label ID=
"AvgActualsLabel"
runat=
"server"
Text=
'<%# Eval("AvgActuals") %>'
/>
</td>
<td style=
"width:100px;text-align: center;"
>
<asp:Label ID=
"ProgramPlanLabel"
runat=
"server"
Text=
'<%# Eval("ProgramPlan") %>'
/>
</td>
<td style=
"width:100px;text-align: center;"
>
<asp:Label ID=
"GroupPlanLabel"
runat=
"server"
Text=
'<%# Eval("GroupPlan") %>'
/>
</td>
<td style=
"width:100px;text-align: center;"
>
<asp:Label ID=
"lblPgmGrpVariance"
runat=
"server"
Text=
'<%# Eval("PgmVsGrp") %>'
/>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr
class
=
"rlvA"
>
<td style=
"width:190px;text-align: left;"
>
<asp:HyperLink ID=
"HyperLink1"
NavigateUrl=
'<%# CreateHyperlink(Eval("PORTFOLIO").ToString()) %>'
runat=
"server"
Text=
'<%# Eval("PORTFOLIO").ToString() %>'
></asp:HyperLink>
</td>
<td style=
"width:100px;text-align: center;"
>
<asp:Label ID=
"AvgActualsLabel"
runat=
"server"
Text=
'<%# Eval("AvgActuals") %>'
/>
</td>
<td style=
"width:100px;text-align: center;"
>
<asp:Label ID=
"ProgramPlanLabel"
runat=
"server"
Text=
'<%# Eval("ProgramPlan") %>'
/>
</td>
<td style=
"width:100px;text-align: center;"
>
<asp:Label ID=
"GroupPlanLabel"
runat=
"server"
Text=
'<%# Eval("GroupPlan") %>'
/>
</td>
<td style=
"width:100px;text-align: center;"
>
<asp:Label ID=
"lblPgmGrpVariance"
runat=
"server"
Text=
'<%# Eval("PgmVsGrp") %>'
/>
</td>
</tr>
</AlternatingItemTemplate>
<EmptyDataTemplate>
<div id=
"noRecordsMsg"
>
<asp:Literal ID=
"litMsg"
runat=
"server"
></asp:Literal>
</div>
</EmptyDataTemplate>
</telerik:RadListView>
<telerik:RadAjaxManager ID=
"ramExc"
runat=
"server"
>
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID=
"btnFilterData"
>
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID=
"lvExc"
LoadingPanelID=
"alpExc"
/>
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID=
"btnForceRefresh"
>
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID=
"lvExc"
LoadingPanelID=
"alpExc"
/>
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID=
"lvExc"
>
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID=
"lvExc"
LoadingPanelID=
"alpExc"
/>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<div id=
"submitButton"
>
<asp:Button ID=
"btnFilterData"
runat=
"server"
Text=
"Filter Data"
Font-Names=
"Tahoma, Arial, Helvetica, Sans-Serif"
Font-Size=
"11px"
onclick=
"btnFilterData_Click"
CausesValidation=
"true"
/>
</div>
<div id=
"refreshButton"
>
<asp:Button ID=
"btnForceRefresh"
runat=
"server"
Text=
"Refresh Data"
Font-Names=
"Tahoma, Arial, Helvetica, Sans-Serif"
Font-Size=
"11px"
CausesValidation=
"false"
onclick=
"btnForceRefresh_Click"
/>
</div>
<asp:Label ID="Label1" Text='<%$ appSettings:ImageResizeWidth %>' runat="server" style="display: none;" />
<asp:Label ID="Label2" Text='<%$ appSettings:ImageResizeHeight %>' runat="server" style="display: none;" />
initialize:
function
() {
$IE.Crop.callBaseMethod(
this
,
"initialize"
);
this
._xTxt =
this
._getControlFromParent(
"txtX"
);
this
._yTxt =
this
._getControlFromParent(
"txtY"
);
this
._widthTxt =
this
._getControlFromParent(
"txtWidth"
);
this
._heightTxt =
this
._getControlFromParent(
"txtHeight"
);
this
._presetDD =
this
._findControlFromParent(
"rieAspectRatio"
);
this
._cropBtn =
this
._findControlFromParent(
"btnApply"
);
this
._cancelBtn =
this
._findControlFromParent(
"btnCancel"
);
this
._constraintBtn =
this
._findControlFromParent(
"btnConstraint"
);
this
._swapBtn =
this
._findControlFromParent(
"btnSwap"
);
this
._sizeRatio =
null
;
this
._zoomLevel =
this
._getImageZoomLevel();
this
._createCropBox();
this
._updateControlsFromCropBox();
this
._constraintBtnClick(
this
._constraintBtn);
this
._attachHandlers(
true
);
this
.get_imageEditor().get_formDecorator().decorate($get(
this
.get_parentId() +
"Table"
));
this
.set_width(
this
._getControlFromParent(
"Label1"
).innerText);
//where the size fixing is called
this
.set_height(
this
._getControlFromParent(
"Label2"
).innerText);
//where the size fixing is called
},
.
.
.
set_width:
function
(value) {
var
imageSize =
this
.get_imageSize();
var
bounds =
this
._cropBox.getBounds();
alert(bounds.x);
//returns in Chrome deployed -0.000002741..... all other returns 0
alert(imageSize.width);
//returns in Chrome deployed 257..... all other returns 256
value =
this
._restrictValue(value, 0, imageSize.width - bounds.x);
alert(imageSize.height);
//returns in Chrome deployed 257..... all other returns 256
alert(bounds.y);
//returns in Chrome deployed -0.000002741..... all other returns 0
value =
this
._applyWidthConstraintRatio(value, imageSize.height - bounds.y);
this
.set_inputValue(
this
._widthTxt, value);
}
this
._getControlFromParent(
"Label1"
).innerText and this
._getControlFromParent(
"Label2"
).innerText from code above returns "undefined" instead of 256 like all other browsers mentioned.
Please help
TIA
<
telerik:radgrid
id
=
"rgdApproval"
runat
=
"server"
autogeneratecolumns
=
"False"
cellspacing
=
"0"
cssclass
=
"NoPadding"
gridlines
=
"Vertical"
groupingenabled
=
"False"
height
=
" 200px"
width
=
"98%"
ShowHeader
=
"true"
AllowAutomaticUpdates
=
"True"
onitemcommand
=
"rgdApproval_ItemCommand"
AllowMultiRowSelection
=
"true"
>
<
AlternatingItemStyle
BackColor
=
"#DCE6F1"
Font-Names
=
"Verdana"
Font-Size
=
"9pt"
Height
=
"20px"
/>
<
MasterTableView
AllowMultiColumnSorting
=
"false"
EditMode
=
"Batch"
ClientDataKeyNames
=
"EACCAPV_DOCNO"
Summary
=
"RadGrid table"
TableLayout
=
"Fixed"
Width
=
"100%"
>
<
PagerStyle
AlwaysVisible
=
"true"
/>
<
Columns
>
<
telerik:GridClientSelectColumn
UniqueName
=
"chkTick"
DataType
=
"System.Boolean"
Display
=
"true"
>
<
HeaderStyle
HorizontalAlign
=
"Left"
VerticalAlign
=
"Middle"
Width
=
"50px"
/>
<
ItemStyle
HorizontalAlign
=
"left"
VerticalAlign
=
"Middle"
Width
=
"50px"
/>
</
telerik:GridClientSelectColumn
>
<
telerik:GridCheckBoxColumn
ReadOnly
=
"true"
HeaderText
=
"Out Pay"
UniqueName
=
"chkOUTPAY"
>
<
HeaderStyle
HorizontalAlign
=
"Left"
VerticalAlign
=
"Middle"
Width
=
"60px"
/>
<
ItemStyle
HorizontalAlign
=
"Left"
VerticalAlign
=
"Middle"
Width
=
"60px"
/>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridBoundColumn
ReadOnly
=
"true"
DataField
=
"EACCAPV_OUTSIDEPAY"
Visible
=
"false"
HeaderText
=
""
UniqueName
=
"OUTSIDEPAY"
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Document No"
UniqueName
=
"grvDocumentNo"
>
<
ItemTemplate
>
<
asp:LinkButton
ID
=
"LnkEACCAPV_DOCNO"
runat
=
"server"
CommandArgument="<%#Container.ItemIndex%>" CommandName="ViewDocNo"
Text='<%# Bind("EACCAPV_DOCNO") %>'></
asp:LinkButton
>
</
ItemTemplate
>
<
HeaderStyle
HorizontalAlign
=
"Left"
VerticalAlign
=
"Middle"
Width
=
"135px"
/>
<
ItemStyle
HorizontalAlign
=
"Left"
VerticalAlign
=
"Top"
Width
=
"135px"
/>
</
telerik:GridTemplateColumn
>
</
Columns
>
<
GroupByExpressions
>
<
telerik:GridGroupByExpression
>
<
GroupByFields
>
<
telerik:GridGroupByField
FieldName
=
"EACCAPV_CLMCCY"
></
telerik:GridGroupByField
>
</
GroupByFields
>
<
SelectFields
>
<
telerik:GridGroupByField
FieldName
=
"EACCAPV_CLMCCY"
HeaderText
=
""
></
telerik:GridGroupByField
>
</
SelectFields
>
</
telerik:GridGroupByExpression
>
</
GroupByExpressions
>
</
MasterTableView
>
<
SortingSettings
EnableSkinSortStyles
=
"False"
SortedBackColor
=
"Azure"
/>
<
ClientSettings
EnableRowHoverStyle
=
"true"
>
<
Resizing
AllowColumnResize
=
"True"
AllowRowResize
=
"False"
EnableRealTimeResize
=
"True"
ResizeGridOnColumnResize
=
"False"
/>
<
Selecting
AllowRowSelect
=
"True"
/>
<
Scrolling
AllowScroll
=
"True"
UseStaticHeaders
=
"True"
/>
</
ClientSettings
>
<
PagerStyle
Height
=
"20px"
/>
</
telerik:radgrid
>
<
telerik:radgrid
id
=
"rgdApproval"
runat
=
"server"
autogeneratecolumns
=
"False"
cellspacing
=
"0"
cssclass
=
"NoPadding"
gridlines
=
"Vertical"
groupingenabled
=
"False"
height
=
" 200px"
width
=
"98%"
ShowHeader
=
"true"
AllowAutomaticUpdates
=
"True"
onitemcommand
=
"rgdApproval_ItemCommand"
AllowMultiRowSelection
=
"true"
>
<
AlternatingItemStyle
BackColor
=
"#DCE6F1"
Font-Names
=
"Verdana"
Font-Size
=
"9pt"
Height
=
"20px"
/>
<
MasterTableView
AllowMultiColumnSorting
=
"false"
EditMode
=
"Batch"
ClientDataKeyNames
=
"EACCAPV_DOCNO"
Summary
=
"RadGrid table"
TableLayout
=
"Fixed"
Width
=
"100%"
>
<
PagerStyle
AlwaysVisible
=
"true"
/>
<
Columns
>
<
telerik:GridClientSelectColumn
UniqueName
=
"chkTick"
DataType
=
"System.Boolean"
Display
=
"true"
>
<
HeaderStyle
HorizontalAlign
=
"Left"
VerticalAlign
=
"Middle"
Width
=
"50px"
/>
<
ItemStyle
HorizontalAlign
=
"left"
VerticalAlign
=
"Middle"
Width
=
"50px"
/>
</
telerik:GridClientSelectColumn
>
<
telerik:GridCheckBoxColumn
ReadOnly
=
"true"
HeaderText
=
"Out Pay"
UniqueName
=
"chkOUTPAY"
>
<
HeaderStyle
HorizontalAlign
=
"Left"
VerticalAlign
=
"Middle"
Width
=
"60px"
/>
<
ItemStyle
HorizontalAlign
=
"Left"
VerticalAlign
=
"Middle"
Width
=
"60px"
/>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridBoundColumn
ReadOnly
=
"true"
DataField
=
"EACCAPV_OUTSIDEPAY"
Visible
=
"false"
HeaderText
=
""
UniqueName
=
"OUTSIDEPAY"
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Document No"
UniqueName
=
"grvDocumentNo"
>
<
ItemTemplate
>
<
asp:LinkButton
ID
=
"LnkEACCAPV_DOCNO"
runat
=
"server"
CommandArgument="<%#Container.ItemIndex%>" CommandName="ViewDocNo"
Text='<%# Bind("EACCAPV_DOCNO") %>'></
asp:LinkButton
>
</
ItemTemplate
>
<
HeaderStyle
HorizontalAlign
=
"Left"
VerticalAlign
=
"Middle"
Width
=
"135px"
/>
<
ItemStyle
HorizontalAlign
=
"Left"
VerticalAlign
=
"Top"
Width
=
"135px"
/>
</
telerik:GridTemplateColumn
>
</
Columns
>
<
GroupByExpressions
>
<
telerik:GridGroupByExpression
>
<
GroupByFields
>
<
telerik:GridGroupByField
FieldName
=
"EACCAPV_CLMCCY"
></
telerik:GridGroupByField
>
</
GroupByFields
>
<
SelectFields
>
<
telerik:GridGroupByField
FieldName
=
"EACCAPV_CLMCCY"
HeaderText
=
""
></
telerik:GridGroupByField
>
</
SelectFields
>
</
telerik:GridGroupByExpression
>
</
GroupByExpressions
>
</
MasterTableView
>
<
SortingSettings
EnableSkinSortStyles
=
"False"
SortedBackColor
=
"Azure"
/>
<
ClientSettings
EnableRowHoverStyle
=
"true"
>
<
Resizing
AllowColumnResize
=
"True"
AllowRowResize
=
"False"
EnableRealTimeResize
=
"True"
ResizeGridOnColumnResize
=
"False"
/>
<
Selecting
AllowRowSelect
=
"True"
/>
<
Scrolling
AllowScroll
=
"True"
UseStaticHeaders
=
"True"
/>
</
ClientSettings
>
<
PagerStyle
Height
=
"20px"
/>
</
telerik:radgrid
>
Hi,
I have a RadGrid that binds using NeedDataSource. The NeedDataSource calls a tableadapter that uses a combobox SelectedValue as an input parameter. So the grid is populated based on the SelectedValue.
That works fine when the page first loads. Though I am having issues with when I change a combobox SelectedValue.
I believe it is a matter of the event ordering. As in the NeedDataSource kicks off BEFORE the SelectedIndexChanged is fired.
Below is my RadGrid:
<
telerik:RadGrid
ID
=
"RDHauls"
runat
=
"server"
AutoGenerateEditColumn
=
"True"
GridLines
=
"Horizontal"
AutoGenerateColumns
=
"False"
AlternatingItemStyle-BackColor
=
"#ecf3f4"
BorderColor
=
"#28899A"
EditItemStyle-BackColor
=
"#009999"
EditItemStyle-Font-Bold
=
"true"
OnItemDataBound
=
"RDHauls_ItemDataBound"
OnItemCreated
=
"RDHauls_ItemCreated"
OnNeedDataSource
=
"RDHauls_NeedDataSource"
CssClass
=
"Radgrid"
>
<
AlternatingItemStyle
BackColor
=
"#ECF3F4"
></
AlternatingItemStyle
>
<
HeaderStyle
BorderColor
=
"#28899A"
Font-Bold
=
"True"
Font-Size
=
"12px"
Font-Names
=
"Verdana"
/>
<
MasterTableView
EnableViewState
=
"false"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"TripCode"
FilterControlAltText
=
"Filter TripCode column"
HeaderText
=
"Trip Code"
SortExpression
=
"TripCode"
UniqueName
=
"TripCode"
ReadOnly
=
"true"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"VessReg"
FilterControlAltText
=
"Filter VessReg column"
HeaderText
=
"Vessel"
SortExpression
=
"VessReg"
UniqueName
=
"VessReg"
ReadOnly
=
"true"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"HaulNumber"
HeaderText
=
"Haul"
UniqueName
=
"HaulNumber"
ReadOnly
=
"true"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"RigNumber"
HeaderText
=
"Rig"
UniqueName
=
"RigNumber"
ReadOnly
=
"true"
></
telerik:GridBoundColumn
>
<
telerik:GridDropDownColumn
DataField
=
"Technique"
HeaderText
=
"Technique"
ListTextField
=
"Name"
ListValueField
=
"Code"
UniqueName
=
"Technique"
ColumnEditorID
=
"Technique"
Visible
=
"false"
DropDownControlType
=
"DropDownList"
></
telerik:GridDropDownColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"HaulSampledTrueFalse"
HeaderText
=
"Haul Sampled?"
Visible
=
"false"
UniqueName
=
"HaulSampledTrueFalse"
ColumnEditorID
=
"HaulSampled"
></
telerik:GridCheckBoxColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"TowDisruptedTrueFalse"
HeaderText
=
"Tow Disrupted?"
Visible
=
"false"
UniqueName
=
"TowDisruptedTrueFalse"
></
telerik:GridCheckBoxColumn
>
<
telerik:GridBoundColumn
DataField
=
"CodEnd"
HeaderText
=
"Cod End (mm)"
UniqueName
=
"CodEnd"
ColumnEditorID
=
"CodEnd"
Visible
=
"false"
ConvertEmptyStringToNull
=
"true"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"MeshSize"
HeaderText
=
"Mesh Size (mm)"
UniqueName
=
"MeshSize"
Visible
=
"false"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"SelectivityMesh"
HeaderText
=
"Selectivity Mesh (mm)"
UniqueName
=
"SelectivityMesh"
Visible
=
"false"
></
telerik:GridBoundColumn
>
<
telerik:GridDropDownColumn
DataField
=
"TwineCode"
HeaderText
=
"Twine"
ListTextField
=
"Name"
ListValueField
=
"Code"
UniqueName
=
"TwineCode"
ColumnEditorID
=
"TwineCode"
Visible
=
"false"
DropDownControlType
=
"DropDownList"
></
telerik:GridDropDownColumn
>
<
telerik:GridBoundColumn
DataField
=
"TwineThickness"
HeaderText
=
"Twine Thickness (mm)"
UniqueName
=
"TwineThickness"
Visible
=
"false"
DataType
=
"System.Decimal"
></
telerik:GridBoundColumn
>
<
telerik:GridDropDownColumn
DataField
=
"GroundGear"
HeaderText
=
"Ground Gear"
ListTextField
=
"Name"
ListValueField
=
"Code"
UniqueName
=
"GroundGear"
ColumnEditorID
=
"GroundGear"
Visible
=
"false"
DropDownControlType
=
"DropDownList"
></
telerik:GridDropDownColumn
>
<
telerik:GridBoundColumn
DataField
=
"Bridal"
HeaderText
=
"Bridal (m)"
UniqueName
=
"Bridal"
Visible
=
"false"
DataType
=
"System.Int32"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"HeadlineHeight"
HeaderText
=
"Headline Height (m)"
UniqueName
=
"HeadlineHeight"
Visible
=
"false"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"WarpLength"
HeaderText
=
"Warp Length (fath)"
UniqueName
=
"WarpLength"
Visible
=
"false"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"DoorSpread"
HeaderText
=
"Door Spread (m)"
UniqueName
=
"DoorSpread"
Visible
=
"false"
></
telerik:GridBoundColumn
>
<
telerik:GridDropDownColumn
DataField
=
"TidalStateCode"
HeaderText
=
"Tidal State"
ListTextField
=
"Name"
ListValueField
=
"Code"
UniqueName
=
"TidalStateCode"
ColumnEditorID
=
"TidalStateCode"
Visible
=
"false"
DropDownControlType
=
"DropDownList"
></
telerik:GridDropDownColumn
>
<
telerik:GridDropDownColumn
DataField
=
"TidalStrengthCode"
HeaderText
=
"Tidal Strength"
ListTextField
=
"Name"
ListValueField
=
"Code"
UniqueName
=
"TidalStrengthCode"
ColumnEditorID
=
"TidalStrengthCode"
Visible
=
"false"
DropDownControlType
=
"DropDownList"
></
telerik:GridDropDownColumn
>
<
telerik:GridDropDownColumn
DataField
=
"TidalDirectionCode"
HeaderText
=
"Tidal Direction"
ListTextField
=
"Name"
ListValueField
=
"Code"
UniqueName
=
"TidalDirectionCode"
ColumnEditorID
=
"TidalDirectionCode"
Visible
=
"false"
DropDownControlType
=
"DropDownList"
></
telerik:GridDropDownColumn
>
<
telerik:GridBoundColumn
DataField
=
"GroundSpeed"
HeaderText
=
"Speed Over Ground (kts)"
UniqueName
=
"GroundSpeed"
Visible
=
"false"
DataType
=
"System.Decimal"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"ShotDate"
HeaderText
=
"Shot Date"
UniqueName
=
"ShotDate"
Visible
=
"false"
>
<
ColumnValidationSettings
EnableRequiredFieldValidation
=
"True"
>
<
RequiredFieldValidator
ID
=
"RFShotDate"
Font-Bold
=
"True"
> Enter Shot date</
RequiredFieldValidator
>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
<
telerik:GridDropDownColumn
DataField
=
"ShotTime"
HeaderText
=
"Shot Time"
ListTextField
=
"vchTime"
ListValueField
=
"vchTime"
UniqueName
=
"ShotTime"
ColumnEditorID
=
"ShotTime"
Visible
=
"false"
DropDownControlType
=
"DropDownList"
></
telerik:GridDropDownColumn
>
<
telerik:GridBoundColumn
DataField
=
"ShotDepth"
HeaderText
=
"Shot Depth (fath)"
UniqueName
=
"ShotDepth"
Visible
=
"false"
DataType
=
"System.Decimal"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"ShotLatd"
HeaderText
=
"Shot Latitude (deg)"
UniqueName
=
"ShotLatd"
Visible
=
"false"
>
<
ColumnValidationSettings
EnableRequiredFieldValidation
=
"True"
>
<
RequiredFieldValidator
ID
=
"RFShotLatitudeD"
Font-Bold
=
"True"
> Enter Shot Latitude (deg)</
RequiredFieldValidator
>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"ShotLatm"
HeaderText
=
"Shot Latitude (min)"
UniqueName
=
"ShotLatm"
Visible
=
"false"
>
<
ColumnValidationSettings
EnableRequiredFieldValidation
=
"True"
>
<
RequiredFieldValidator
ID
=
"RFShotLatitudeM"
Font-Bold
=
"True"
> Enter Shot Latitude (min)</
RequiredFieldValidator
>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"ShotLond"
HeaderText
=
"Shot Longitude (deg)"
UniqueName
=
"ShotLond"
Visible
=
"false"
>
<
ColumnValidationSettings
EnableRequiredFieldValidation
=
"True"
>
<
RequiredFieldValidator
ID
=
"RFShotLongitudeD"
Font-Bold
=
"True"
> Enter Shot Longitude (deg)</
RequiredFieldValidator
>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"ShotLonm"
HeaderText
=
"Shot Longitude (min)"
UniqueName
=
"ShotLonm"
Visible
=
"false"
>
<
ColumnValidationSettings
EnableRequiredFieldValidation
=
"True"
>
<
RequiredFieldValidator
ID
=
"RFShotLongitudeM"
Font-Bold
=
"True"
> Enter Shot Longitude (min)</
RequiredFieldValidator
>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
UniqueName
=
"ShotEastWest"
ColumnEditorID
=
"ShotEastWest"
HeaderText
=
"Shot East/West"
Visible
=
"false"
>
<
ItemTemplate
>
<%# Eval("ShotEW")%>
</
ItemTemplate
>
<
EditItemTemplate
>
<
asp:RadioButtonList
ID
=
"rdShotEastWest"
runat
=
"server"
RepeatDirection
=
"Horizontal"
>
<
asp:ListItem
Text
=
"East"
Value
=
"2"
></
asp:ListItem
>
<
asp:ListItem
Text
=
"West"
Value
=
"1"
></
asp:ListItem
>
</
asp:RadioButtonList
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"HaulDate"
HeaderText
=
"Haul Date"
UniqueName
=
"HaulDate"
Visible
=
"false"
>
<
ColumnValidationSettings
EnableRequiredFieldValidation
=
"True"
>
<
RequiredFieldValidator
ID
=
"RFHaulDate"
Font-Bold
=
"True"
> Enter Haul date</
RequiredFieldValidator
>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
<
telerik:GridDropDownColumn
DataField
=
"HaulTime"
HeaderText
=
"Haul Time"
ListTextField
=
"vchTime"
ListValueField
=
"vchTime"
UniqueName
=
"HaulTime"
ColumnEditorID
=
"HaulTime"
Visible
=
"false"
DropDownControlType
=
"DropDownList"
></
telerik:GridDropDownColumn
>
<
telerik:GridBoundColumn
DataField
=
"HaulDepth"
HeaderText
=
"Haul Depth (fath)"
UniqueName
=
"HaulDepth"
Visible
=
"false"
DataType
=
"System.Decimal"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"HaulLatd"
HeaderText
=
"Haul Latitude (deg)"
UniqueName
=
"HaulLatd"
Visible
=
"false"
>
<
ColumnValidationSettings
EnableRequiredFieldValidation
=
"True"
>
<
RequiredFieldValidator
ID
=
"RFHaulLatitudeD"
Font-Bold
=
"True"
> Enter Haul Latitude (deg)</
RequiredFieldValidator
>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"HaulLatm"
HeaderText
=
"Haul Latitude (min)"
UniqueName
=
"HaulLatm"
Visible
=
"false"
>
<
ColumnValidationSettings
EnableRequiredFieldValidation
=
"True"
>
<
RequiredFieldValidator
ID
=
"RFHaulLatitudeM"
Font-Bold
=
"True"
> Enter Haul Latitude (min)</
RequiredFieldValidator
>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"HaulLond"
HeaderText
=
"Haul Longitude (deg)"
UniqueName
=
"HaulLond"
Visible
=
"false"
>
<
ColumnValidationSettings
EnableRequiredFieldValidation
=
"True"
>
<
RequiredFieldValidator
ID
=
"RFHaulLongitudeD"
Font-Bold
=
"True"
> Enter Haul Longitude (deg)</
RequiredFieldValidator
>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"HaulLonm"
HeaderText
=
"Haul Longitude (min)"
UniqueName
=
"HaulLonm"
Visible
=
"false"
>
<
ColumnValidationSettings
EnableRequiredFieldValidation
=
"True"
>
<
RequiredFieldValidator
ID
=
"RFHaulLongitudeM"
Font-Bold
=
"True"
> Enter Haul Longitude (min)</
RequiredFieldValidator
>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
UniqueName
=
"HaulEastWest"
ColumnEditorID
=
"HaulEastWest"
HeaderText
=
"Haul East/West"
Visible
=
"false"
>
<
ItemTemplate
>
<%# Eval("HaulEW")%>
</
ItemTemplate
>
<
EditItemTemplate
>
<
asp:RadioButtonList
ID
=
"rdHaulEastWest"
runat
=
"server"
RepeatDirection
=
"Horizontal"
>
<
asp:ListItem
Text
=
"East"
Value
=
"2"
></
asp:ListItem
>
<
asp:ListItem
Text
=
"West"
Value
=
"1"
></
asp:ListItem
>
</
asp:RadioButtonList
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridDropDownColumn
DataField
=
"TowRegion"
HeaderText
=
"Tow Region"
ListTextField
=
"Name"
ListValueField
=
"Name"
UniqueName
=
"TowRegion"
ColumnEditorID
=
"TowRegion"
Visible
=
"false"
DropDownControlType
=
"DropDownList"
></
telerik:GridDropDownColumn
>
<
telerik:GridDropDownColumn
DataField
=
"HaulRectangle"
HeaderText
=
"Haul Rectangle"
ListTextField
=
"Code"
ListValueField
=
"Code"
UniqueName
=
"HaulRectangle"
ColumnEditorID
=
"HaulRectangle"
Visible
=
"false"
DropDownControlType
=
"DropDownList"
></
telerik:GridDropDownColumn
>
<
telerik:GridDropDownColumn
DataField
=
"WindSpeedCode"
HeaderText
=
"Wind Speed"
ListTextField
=
"Name"
ListValueField
=
"Code"
UniqueName
=
"WindSpeed"
ColumnEditorID
=
"WindSpeed"
Visible
=
"false"
DropDownControlType
=
"DropDownList"
></
telerik:GridDropDownColumn
>
<
telerik:GridDropDownColumn
DataField
=
"WindDirectionCode"
HeaderText
=
"Wind Direction"
ListTextField
=
"Name"
ListValueField
=
"Code"
UniqueName
=
"WindDirection"
ColumnEditorID
=
"WindDirection"
Visible
=
"false"
DropDownControlType
=
"DropDownList"
></
telerik:GridDropDownColumn
>
<
telerik:GridDropDownColumn
DataField
=
"SeaStateCode"
HeaderText
=
"Sea State"
ListTextField
=
"Name"
ListValueField
=
"Code"
UniqueName
=
"SeaState"
ColumnEditorID
=
"SeaState"
Visible
=
"false"
DropDownControlType
=
"DropDownList"
></
telerik:GridDropDownColumn
>
<
telerik:GridDropDownColumn
DataField
=
"SelectivityDeviceCode"
HeaderText
=
"Selectivity Device"
ListTextField
=
"nvcSelectivityDeviceName"
ListValueField
=
"intSelectivityDeviceID"
UniqueName
=
"SelectivityDevice"
Visible
=
"false"
DropDownControlType
=
"DropDownList"
></
telerik:GridDropDownColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
table
class
=
"tbldialog"
id
=
"Table1"
cellspacing
=
"1"
cellpadding
=
"1"
width
=
"500"
border
=
"0"
>
<
tr
>
<
td
><
asp:label
id
=
"lblId"
runat
=
"server"
CssClass
=
"label"
>Observer Name</
asp:label
></
td
>
<
td
>
<
asp:DropDownList
ID
=
"ddlID"
runat
=
"server"
DataSourceID
=
"ODS_Observers"
DataTextField
=
"ObserverName"
DataValueField
=
"ObserverInitials"
CssClass
=
"inputLong"
AutoPostBack
=
"True"
></
asp:DropDownList
>
<
asp:ObjectDataSource
ID
=
"ODS_Observers"
runat
=
"server"
OldValuesParameterFormatString
=
"original_{0}"
SelectMethod
=
"GetData"
TypeName
=
"DS_DiscardsTableAdapters.USP_ObserversSelectTableAdapter"
></
asp:ObjectDataSource
>
</
td
>
</
tr
>
<
tr
>
<
td
><
asp:Label
ID
=
"lblYear"
runat
=
"server"
CssClass
=
"label"
>Year:</
asp:Label
></
td
>
<
td
>
<
asp:DropDownList
ID
=
"ddlYear"
runat
=
"server"
AutoPostBack
=
"True"
CssClass
=
"inputLong"
DataSourceID
=
"objTripCodeYears"
DataTextField
=
"TripYears"
DataValueField
=
"TripYears"
></
asp:DropDownList
>
<
asp:ObjectDataSource
ID
=
"objTripCodeYears"
runat
=
"server"
OldValuesParameterFormatString
=
"original_{0}"
SelectMethod
=
"GetDataTripCodeYears"
TypeName
=
"TripCodeYearsTableAdapters.SelectYearsFromTripCodesByIDTableAdapter"
>
<
SelectParameters
>
<
asp:ControlParameter
ControlID
=
"ddlID"
Name
=
"ObserverID"
PropertyName
=
"SelectedValue"
Type
=
"String"
/>
</
SelectParameters
>
</
asp:ObjectDataSource
>
</
td
>
</
tr
>
<
tr
>
<
td
><
asp:label
id
=
"lblTripCode"
runat
=
"server"
CssClass
=
"label"
>Trip Code:</
asp:label
></
td
>
<
td
>
<
asp:Label
ID
=
"lblTripCount"
runat
=
"server"
CssClass
=
"labelNoCount"
Visible
=
"false"
></
asp:Label
>
<
asp:DropDownList
ID
=
"ddlTripCode"
runat
=
"server"
AutoPostBack
=
"True"
CssClass
=
"inputLong"
DataSourceID
=
"objTripCodes"
DataTextField
=
"TripCode"
DataValueField
=
"TripCode"
></
asp:DropDownList
>
<
asp:ObjectDataSource
ID
=
"objTripCodes"
runat
=
"server"
OldValuesParameterFormatString
=
"original_{0}"
SelectMethod
=
"GetDisTripCodesByIDAndYear"
TypeName
=
"TripCodeYearsTableAdapters.DisGetTripCodesByIDAndYearTableAdapter"
>
<
SelectParameters
>
<
asp:ControlParameter
ControlID
=
"ddlID"
Name
=
"ObserverID"
PropertyName
=
"SelectedValue"
Type
=
"String"
/>
<
asp:ControlParameter
ControlID
=
"ddlYear"
Name
=
"TripYear"
PropertyName
=
"SelectedValue"
Type
=
"Int32"
/>
</
SelectParameters
>
</
asp:ObjectDataSource
>
</
td
>
</
tr
>
</
table
>
Protected
Sub
RDHauls_NeedDataSource(
ByVal
source
As
Object
,
ByVal
e
As
GridNeedDataSourceEventArgs)
Handles
RDHauls.NeedDataSource
' Get the Trip Code for binding the grid
TripCode = RTrim(
CStr
(ddlTripCode.SelectedValue))
' Get all the haul(s) details for the trip code selected
Dim
ds
As
New
DSHaulsTableAdapters.DisGetHaulDetailsByTripcodeTableAdapter
' Bind the grid to the haul(s) details
RDHauls.DataSource = ds.GetHaulDetailsByTripcode(TripCode)
End
Sub
Dim LoadPersister As New GridSettingsPersister(RadGrid1)
LoadPersister.LoadSettings(*some string or session here*)
RadGrid1.Rebind()
<telerik:RadFilter ID="WorkOrderItemsRadFilter" runat="server" Skin="WebBlue" ShowApplyButton="true"
OnApplyExpressions="WorkOrderItemsRadFilter_Apply" ApplyButtonText="Filter Work Order Items"
OnPreRender="WorkOrderItemsRadFilter_PreRender" OnFieldEditorCreating="RadFilter_FieldEditorCreating" OnItemCommand="WorkOrderItemsRadFilter_ItemCommand">
<FieldEditors>
<telerik:RadFilterNumericFieldEditor FieldName="MATERIALGRADEID" DisplayName="Empty Grade" DataType="System.Int32" />else if (myCmdArg == "MATERIALGRADEID")
{
e.Canceled = true;
RadFilterStartsWithFilterExpression item = new RadFilterStartsWithFilterExpression(e.CommandArgument.ToString());
//replace the current item with the new item that has the default filter set to StartsWith
int i = e.ExpressionItem.ItemIndex;
e.ExpressionItem.OwnerGroup.Expression.Expressions.RemoveAt(i);
e.ExpressionItem.OwnerGroup.Expression.Expressions.Insert(i, item);
item.Value = "0";//DEFAULT THIS TO ZERO
WorkOrderItemsRadFilter.RecreateControl();
<
div
class
=
"buttons"
>
<
div
>
<
telerik:RadAsyncUpload
ID
=
"RadAsyncUpload1"
runat
=
"server"
OnClientFileDropped
=
"RadAsyncUpload1_FileDropped"
OnClientFileSelected
=
"RadAsyncUpload1_FileSelected"
OnClientFilesSelected
=
""
HideFileInput
=
"True"
Width
=
"221px"
HttpHandlerUrl
=
"~/CustomHandlers/CropImage.ashx"
ManualUpload
=
"True"
OnClientFileUploaded
=
"RadAsyncUpload1_FileUploaded"
OnClientFileUploading
=
"RadAsyncUpload1_FileUploading"
EnableInlineProgress
=
"True"
DisableChunkUpload
=
"True"
CssClass
=
"radButton"
DropZones
=
"#generated"
OnClientFileUploadRemoved
=
"RadAsyncUpload1_FileUploadRemoved"
Skin
=
"Default"
></
telerik:RadAsyncUpload
>
</
div
>
<
div
>
<
input
ID
=
"UploadButton"
class
=
"upload-file"
type
=
"button"
value
=
"Upload"
onclick
=
"startUpload()"
/></
div
>
<
div
style
=
"clear: both"
>
</
div
>
protected void Page_Load(object sender, EventArgs e)
{
RadAsyncUpload1.PostbackTriggers = new string[] { "UploadButton" };
}
protected void RadAsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e)
{
//nothing yet!
}
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
<%@ Register Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" TagPrefix="telerik" %>
<!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
id
=
"Head1"
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
</
script
>
<
telerik:RadScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
/>
<
telerik:RadAsyncUpload
ID
=
"radAsyncUpload"
runat
=
"server"
EnableInlineProgress
=
"true"
OnFileUploaded
=
"RadAsyncUpload1_FileUploaded"
MaxFileInputsCount
=
"1"
OnClientFileUploaded
=
"onClientFileUploaded"
OnClientFileUploadRemoved
=
"onClientFileUploadRemoved"
PostbackTriggers
=
"radUpload"
HttpHandlerUrl
=
"~/CustomHandler.ashx"
DisableChunkUpload
=
"True"
ManualUpload
=
"True"
OnClientFilesSelected
=
"onClientFileSelected"
/>
<
telerik:RadButton
ID
=
"radUpload"
runat
=
"server"
Text
=
"Upload"
Enabled
=
"false"
CausesValidation
=
"false"
OnClientClicked
=
"radUpload_Clicked"
/>
<
telerik:RadScriptBlock
ID
=
"RadScriptBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function onClientFileUploaded(sender, args) {
var radUpload = $find("<%=radUpload.ClientID %>");
radUpload.set_enabled(true);
}
function onClientFileUploadRemoved(sender, args) {
var radUpload = $find("<%=radUpload.ClientID %>");
radUpload.set_enabled(false);
}
function onClientFileSelected(sender, args) {
var radUpload = $find("<%=radUpload.ClientID %>");
radUpload.set_enabled(true);
}
function radUpload_Clicked(sender,args)
{
var upload = $find('<%=radAsyncUpload.ClientID%>');
upload.startUpload();
}
</
script
>
</
telerik:RadScriptBlock
>
</
form
>
</
body
>
</
html
>