<
telerik:RadGrid
ID
=
"gridShipmentsToBill"
runat
=
"server"
Width
=
"100%"
DataSourceID
=
"ShipmentsToBill"
AllowSorting
=
"True"
AutoGenerateColumns
=
"False"
GridLines
=
"Vertical"
>
<
ClientSettings
EnablePostBackOnRowClick
=
"true"
EnableRowHoverStyle
=
"True"
>
<
Scrolling
AllowScroll
=
"True"
ScrollHeight
=
"500px"
UseStaticHeaders
=
"true"
></
Scrolling
>
<
Selecting
AllowRowSelect
=
"true"
/>
</
ClientSettings
>
<
MasterTableView
HierarchyLoadMode
=
"ServerBind"
DataKeyNames
=
"Shipment_Key"
DataSourceID
=
"ShipmentsToBill"
RetainExpandStateOnRebind
=
"false"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Shipment_Key"
ReadOnly
=
"True"
HeaderText
=
"CPU #"
SortExpression
=
"Shipment_Key"
UniqueName
=
"Shipment_Key"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Shipment_AWorBOL"
HeaderText
=
"AWB/BOL #"
SortExpression
=
"Shipment_AWorBOL"
UniqueName
=
"Shipment_AWorBOL"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Customer_Name"
HeaderText
=
"Customer"
SortExpression
=
"Customer_Name"
UniqueName
=
"Customer_Name"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Shipment_Description"
HeaderText
=
"Description"
SortExpression
=
"Shipment_Description"
UniqueName
=
"Shipment_Description"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Voyage_ArriveDate"
HeaderText
=
"Arrival Date"
SortExpression
=
"Voyage_ArriveDate"
DataFormatString
=
"{0:MM/dd/yyyy}"
UniqueName
=
"Voyage_ArriveDate"
DataType
=
"System.DateTime"
>
</
telerik:GridBoundColumn
>
</
Columns
>
<
NestedViewSettings
DataSourceID
=
"GeneralShipmentData"
>
<
ParentTableRelation
>
<
telerik:GridRelationFields
MasterKeyField
=
"Shipment_Key"
DetailKeyField
=
"Shipment_Key"
></
telerik:GridRelationFields
>
</
ParentTableRelation
>
</
NestedViewSettings
>
<
NestedViewTemplate
>
<
div
class
=
"generalInfoForm"
>
<
div
class
=
"leftForm"
>
<
span
>
<
label
>Customer:</
label
>
<%# Eval("Customer_Num")%> <%# Eval("Customer_Name") %></
span
>
<
span
>
<
label
>Consignee:</
label
>
<%# Eval("Consignee_Num")%> <%# Eval("Consignee_Name") %></
span
>
<
span
>
<
label
>Arrival Date:</
label
>
<%# Eval("Voyage_ArriveDate", "{0:MM/dd/yyyy}")%></
span
>
</
div
>
<
div
class
=
"rightForm"
>
<
span
>
<
label
>AWB/BOL:</
label
>
<%# Eval("Shipment_AWorBOL")%></
span
>
<
span
>
<
label
>Carrier:</
label
>
<%# Eval("Carrier_Name")%></
span
>
<
span
>
<
label
>Vessel:</
label
>
<%# Eval("Vessel_Name") %></
span
>
<
span
>
<
label
>Forwarding Agent:</
label
>
<%# Eval("ForwardingAgent_Name") %></
span
>
</
div
>
<
div
class
=
"middleForm"
><%# Eval("Shipment_Description")%></
div
>
<
div
class
=
"leftForm"
>
<
span
>
<
label
>Volume Weight:</
label
>
<%# Eval("ShipPackage_VolumeWeight")%></
span
>
<
span
>
<
label
>Weight:</
label
>
<%# Eval("ShipPackage_TotalWeight")%></
span
>
<
span
>
<
label
>Cube:</
label
>
<%# Eval("ShipPackage_TotalVolume")%></
span
>
<
span
>
<
label
>Freight:</
label
>
<%# Eval("ShipmentCover_FaceFreight")%></
span
>
</
div
>
</
div
>
</
NestedViewTemplate
>
</
MasterTableView
>
</
telerik:RadGrid
>
Protected
Sub
gridShipmentsToBill_ItemCommand(sender
As
Object
, e
As
GridCommandEventArgs)
Handles
gridShipmentsToBill.ItemCommand
If
e.CommandName =
"RowClick"
OrElse
e.CommandName = RadGrid.ExpandCollapseCommandName
Then
Dim
previousState
As
Boolean
= e.Item.Expanded
If
e.CommandName =
"ExpandCollapse"
Then
previousState =
Not
previousState
End
If
CollapseAllRows()
e.Item.Expanded =
Not
previousState
End
If
End
Sub
Private
Sub
CollapseAllRows()
For
Each
item
As
GridItem
In
gridShipmentsToBill.MasterTableView.Items
item.Expanded =
False
Next
End
Sub
<
telerik:RadGrid
ID
=
"rgDocuments"
runat
=
"server"
DataSourceID
=
"AssetDocument"
AutoGenerateEditColumn
=
"True"
AllowAutomaticUpdates
=
"True"
>
<
MasterTableView
AutoGenerateColumns
=
"False"
DataKeyNames
=
"Doc_DocumentID"
DataSourceID
=
"AssetDocument"
>
<
Columns
>
<
telerik:GridBoundColumn
Visible
=
"false"
ReadOnly
=
"True"
DataField
=
"Doc_DocumentID"
FilterControlAltText
=
"Filter Doc_DocumentID column"
HeaderText
=
"Doc_DocumentID"
SortExpression
=
"Doc_DocumentID"
UniqueName
=
"Doc_DocumentID"
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
AllowFiltering
=
"false"
UniqueName
=
"LessonColumn"
>
<
ItemTemplate
>
<
a
href
=
"Download.aspx?File=<%#Eval("
Doc_FullFilePath")%>">
<
asp:Image
ImageUrl
=
"images/download.jpg"
ID
=
"imgTest"
runat
=
"server"
Height
=
"25px"
Width
=
"25px"
/>
</
a
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridButtonColumn
HeaderText
=
"Delete"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
FilterControlAltText
=
"Filter DeleteColumn column"
ImageUrl
=
"~/Images/delete_97221.jpg"
Text
=
"Delete"
UniqueName
=
"DeleteColumn"
Resizable
=
"false"
ConfirmText
=
"Are you sure you wish to delete this document from this asset?"
>
<
HeaderStyle
CssClass
=
"rgHeader ButtonColumnHeader"
></
HeaderStyle
>
<
ItemStyle
CssClass
=
"ButtonColumn"
/>
</
telerik:GridButtonColumn
>
<
telerik:GridDropDownColumn
EditFormColumnIndex
=
"1"
DataSourceID
=
"DropDown"
ListTextField
=
"FieldAnswer"
ListValueField
=
"IDNo"
UniqueName
=
"Doc_CategoryID"
HeaderText
=
"Category Column"
DataField
=
"Doc_CategoryID"
AllowAutomaticLoadOnDemand
=
"true"
AllowVirtualScrolling
=
"true"
ShowMoreResultsBox
=
"true"
ItemsPerRequest
=
"10"
>
</
telerik:GridDropDownColumn
>
<
telerik:GridBoundColumn
DataField
=
"Doc_Description"
FilterControlAltText
=
"Filter Doc_Description column"
HeaderText
=
"Description"
SortExpression
=
"Doc_Description"
UniqueName
=
"Doc_Description"
>
<
ColumnValidationSettings
>
<
ModelErrorMessage
Text
=
""
/>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
asp:SqlDataSource
ID
=
"AssetDocument"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:SD %>" SelectCommand="Select Doc_DocumentID,Doc_Description,Doc_LongNotes, Doc_FilePath,Doc_FileName,Doc_CategoryID, Doc_FilePath + Doc_FileName as Doc_FullFilePath from Documents where Doc_AssetID = @AssetID and Doc_Deleted is null order by Doc_DocumentID ASC" UpdateCommand="UPDATE Documents SET Doc_Description = @Doc_Description WHERE (Doc_DocumentID = @Doc_DocumentID) AND (Doc_Deleted IS NULL)">
<
SelectParameters
>
<
asp:SessionParameter
DefaultValue
=
"0"
Name
=
"AssetID"
SessionField
=
"AssetID"
/>
</
SelectParameters
>
<
UpdateParameters
>
<
asp:Parameter
Name
=
"Doc_Description"
/>
<
asp:Parameter
Name
=
"Doc_DocumentID"
/>
</
UpdateParameters
>
</
asp:SqlDataSource
>
<
asp:SqlDataSource
ID
=
"DropDown"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:SD %>" SelectCommand="SELECT IDNO, FieldAnswer from easb_Customisation WHERE (([ScreenName] = 'Documents') AND ([FieldName] = 'Category')) ORDER BY [OrderBy], [FieldAnswer]"></
asp:SqlDataSource
>
Server Error in '/' Application.
Editor cannot be initialized for column: Doc_CategoryID
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Telerik.Web.UI.GridColumnEditorException: Editor cannot be initialized for column: Doc_CategoryID
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadTreeList1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadTreeList1" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<br />
<telerik:RadTreeList ID="RadTreeList1" runat="server" OnNeedDataSource="RadTreeList1_NeedDataSource"
AutoGenerateColumns="false" AllowMultiItemSelection="true"
AllowPaging="false" AllowSorting="true" DataKeyNames="ID"
ParentDataKeyNames="PID" AlternatingItemStyle-BackColor ="#EFF5FB" ItemStyle-BackColor="#E0ECF8" ShowTreeLines="false" >
<Columns>
<telerik:TreeListBoundColumn DataField="Code" UniqueName="Code" HeaderText="Heading" HeaderStyle-Width="90" ItemStyle-Font-Names="Arial, Sans-Serif" />
<telerik:TreeListBoundColumn DataField="StatisticalCode" UniqueName="StatisticalCode" HeaderText="Stats Code" HeaderStyle-Width="50" HeaderStyle-Wrap="true" ItemStyle-Font-Names="Arial, Sans-Serif" ItemStyle-Font-Size="Medium" HeaderStyle-Font-Names="Arial, Sans-Serif" HeaderStyle-Font-Size="Medium" HeaderStyle-Font-Bold="true" HeaderStyle-BackColor="White" ItemStyle-BorderColor="White"/>
<telerik:TreeListBoundColumn DataField="Test" UniqueName="Test"/>
</Columns>
</telerik:RadTreeList>
My problem is when I expand the node I feel the page flickering.How to avoid this flickering (postback) feeling?
Thanks
Sindu