or
<
DetailTables
>
<
telerik:GridTableView
runat
=
"server"
AllowAutomaticDeletes
=
"True"
AllowAutomaticUpdates
=
"True"
DataKeyNames
=
"ID"
DataSourceID
=
"EntityDataSource2"
Name
=
"TestChoice"
CommandItemDisplay
=
"Top"
>
<
ParentTableRelation
>
<
telerik:GridRelationFields
DetailKeyField
=
"OfQuestion"
MasterKeyField
=
"ID"
/>
</
ParentTableRelation
>
....
</
DetailTables
>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AllowPaging
=
"True"
AllowSorting
=
"True"
CellSpacing
=
"0"
DataSourceID
=
"EntityDataSource1"
GridLines
=
"None"
AllowCustomPaging
=
"True"
PageSize
=
"25"
AutoGenerateColumns
=
"False"
>
<
ClientSettings
AllowColumnsReorder
=
"True"
ReorderColumnsOnClient
=
"True"
>
<
Selecting
AllowRowSelect
=
"True"
/>
</
ClientSettings
>
<
MasterTableView
AllowAutomaticDeletes
=
"True"
AllowAutomaticUpdates
=
"True"
CommandItemDisplay
=
"Top"
DataKeyNames
=
"ID"
DataSourceID
=
"EntityDataSource1"
AllowCustomPaging
=
"False"
PageSize
=
"10"
Name
=
"TestQuestion"
>
<
telerik:GridTableView
runat
=
"server"
AllowAutomaticDeletes
=
"True"
AllowAutomaticUpdates
=
"True"
DataKeyNames
=
"ID"
DataSourceID
=
"EntityDataSource2"
Name
=
"TestChoice"
CommandItemDisplay
=
"Top"
>
<
ParentTableRelation
>
<
telerik:GridRelationFields
DetailKeyField
=
"OfQuestion"
MasterKeyField
=
"ID"
/>
</
ParentTableRelation
>
...
if (cs.Index == chart.Series.Count-1)
{
cs.DefaultLabelValue = "#STSUM";
cs.Appearance.LabelAppearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.Top;
cs.Appearance.LabelAppearance.LabelLocation = Telerik.Charting.Styles.StyleSeriesItemLabel.ItemLabelLocation.Auto;
}
cs.DefaultLabelValue = "#STSUM"; So that i could add one more series with all the values as 1 and substracting 1 from the total.
Regards
Arima
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AutoGenerateColumns
=
"true"
AllowCustomPaging
=
"true"
AllowMultiRowSelection
=
"true"
>
<
MasterTableView
DataKeyNames
=
"ID"
ClientDataKeyNames
=
"ID"
InsertItemPageIndexAction
=
"ShowItemOnCurrentPage"
>
<
Columns
>
<
telerik:GridButtonColumn
ButtonType
=
"ImageButton"
ImageUrl
=
"~/Images/Icons/Edit.png"
CommandName
=
"Edit"
Text
=
"Edit"
UniqueName
=
"EditColumn"
>
</
telerik:GridButtonColumn
>
<
telerik:GridButtonColumn
ButtonType
=
"ImageButton"
ImageUrl
=
"~/Images/Icons/Delete.png"
CommandName
=
"DeleteShift"
ConfirmText
=
"Do you want to delete this Shift?"
ConfirmDialogHeight
=
"150"
ConfirmTitle
=
"Confirmation"
ConfirmDialogType
=
"RadWindow"
Text
=
"Delete"
UniqueName
=
"DeleteColumn"
>
</
telerik:GridButtonColumn
>
<
telerik:GridButtonColumn
ButtonType
=
"ImageButton"
ImageUrl
=
"~/Images/Icons/AddRecord.png"
CommandName
=
"AddJob"
Text
=
"Add Job"
UniqueName
=
"AddJob"
>
</
telerik:GridButtonColumn
>
<
telerik:GridButtonColumn
ButtonType
=
"ImageButton"
ImageUrl
=
"~/Images/Icons/ExportCSV.png"
CommandName
=
"ExportJobsCSV"
Text
=
"Export Jobs"
UniqueName
=
"ExportJobsCSV"
>
</
telerik:GridButtonColumn
>
<
telerik:GridBoundColumn
DataField
=
"ID"
HeaderText
=
"ID"
UniqueName
=
"ID"
Visible
=
"False"
>
</
telerik:GridBoundColumn
>
</
Columns
>
<
DetailTables
>
<
telerik:GridTableView
Width
=
"100%"
runat
=
"server"
DataKeyNames
=
"ID"
ClientDataKeyNames
=
"ID"
AllowFilteringByColumn
=
"false"
AllowPaging
=
"false"
ItemStyle-BackColor
=
"#DCD9C5"
AlternatingItemStyle-BackColor
=
"#C0BDAE"
AllowSorting
=
"false"
>
<%--<
ParentTableRelation
>
<
telerik:GridRelationFields
DetailKeyField
=
"ShiftID"
MasterKeyField
=
"ID"
/>
</
ParentTableRelation
>--%>
<
Columns
>
<%-- <
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
EditImageUrl
=
"~/Images/Icons/Edit.png"
HeaderStyle-Font-Size
=
"Smaller"
HeaderStyle-Width
=
"34px"
HeaderText
=
"Edit"
UniqueName
=
"EditColumn"
/>--%>
<
telerik:GridButtonColumn
ButtonType
=
"ImageButton"
ImageUrl
=
"~/Images/Icons/Edit.png"
CommandName
=
"EditJob"
UniqueName
=
"EditColumn"
Text
=
"Edit"
>
</
telerik:GridButtonColumn
>
<
telerik:GridButtonColumn
ButtonType
=
"ImageButton"
ImageUrl
=
"~/Images/Icons/Delete.png"
CommandName
=
"DeleteJob"
ConfirmTitle
=
"Confirmation"
ConfirmText
=
"Are you sure you want do delete this Job?"
ConfirmDialogHeight
=
"150"
ConfirmDialogType
=
"RadWindow"
Text
=
"Delete"
UniqueName
=
"DeleteColumn"
/>
</
Columns
>
</
telerik:GridTableView
>
</
DetailTables
>
<
CommandItemTemplate
>
<
div
class
=
"cmdItem"
>
<
asp:LinkButton
ID
=
"btnAddShift"
runat
=
"server"
CommandName
=
"Add Shift"
OnClientClick
=
"javascript:lastTableView=null;"
>
<
img
alt
=
""
src
=
"../../Images/Icons/AddRecord.png"
/>Add Shift</
asp:LinkButton
>
<
asp:LinkButton
ID
=
"btnExportCSV"
runat
=
"server"
CommandName
=
"Export CSV"
OnClientClick
=
"return exportGrid('CSV');"
><
img
alt
=
""
src
=
"../../Images/Icons/ExportCSV.png"
/>Export to CSV</
asp:LinkButton
>
<
asp:LinkButton
ID
=
"btnManageShiftColumns"
runat
=
"server"
CommandName
=
"Manage Shift Columns"
>
<
img
alt
=
""
src
=
"../../Images/Icons/Columns.png"
/>Manage Shift Columns</
asp:LinkButton
>
<
asp:LinkButton
ID
=
"btnManageJobColumns"
runat
=
"server"
CommandName
=
"Manage Job Columns"
>
<
img
alt
=
""
src
=
"../../Images/Icons/Columns.png"
/>Manage Job Columns</
asp:LinkButton
>
<%--<
asp:LinkButton
ID
=
"btnDetailedExportCSV"
runat
=
"server"
CommandName
=
"Export CSV Detailed"
OnClientClick
=
"return exportGrid('CSVDetailed');"
><
img
alt
=
""
src
=
"../../Images/Icons/ExportCSV.png"
/>Detailed Export to CSV</
asp:LinkButton
>
<
asp:LinkButton
ID
=
"btnExportPDF"
runat
=
"server"
CommandName
=
"Export PDF"
OnClientClick
=
"return exportGrid('PDF');"
><
img
alt
=
""
src
=
"../../Images/Icons/ExportPDF.png"
/>Export to PDF</
asp:LinkButton
> --%>
</
div
>
</
CommandItemTemplate
>
</
MasterTableView
>
<
ClientSettings
>
<
ClientEvents
OnCommand
=
"gridCommand"
/>
<
Selecting
AllowRowSelect
=
"True"
UseClientSelectColumnOnly
=
"true"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
function refreshGrid(sender) {
$find("<%= RadGrid1.ClientID %>").get_masterTableView().rebind();
showScrollBars();
}
CType(sender, DropDownList).Attributes.Add("onChange", "window.focus();") |
protected
void
exportToExcel_Click(
object
sender, ImageClickEventArgs e) {
radGridVesselUtil.ExportSettings.IgnorePaging =
true
;
radGridVesselUtil.ExportSettings.OpenInNewWindow =
true
;
radGridVesselUtil.ExportSettings.ExportOnlyData =
true
;
radGridVesselUtil.ExportSettings.FileName =
"vessel_util_"
+ DateTime.Now.ToShortDateString();
radGridVesselUtil.MasterTableView.ExportToExcel();
}
protected void gridDpSummary_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e) {
gridDpSummary.DataSource = SqlDataSource1;
}
<
telerik:RadGrid
ID
=
"radGridVesselUtil"
runat
=
"server"
CellSpacing
=
"0"
AllowPaging
=
"True"
AllowSorting
=
"True"
PageSize
=
"25"
GridLines
=
"None"
EnableEmbeddedSkins
=
"False"
Skin
=
"dpgrid"
ShowGroupPanel
=
"True"
AutoGenerateColumns
=
"False"
onneeddatasource
=
"radGridVesselUtil_NeedDataSource"
>
<
MasterTableView
>
<
CommandItemSettings
ShowExportToExcelButton
=
"true"
></
CommandItemSettings
>
<
RowIndicatorColumn
Visible
=
"True"
FilterControlAltText
=
"Filter RowIndicator column"
></
RowIndicatorColumn
>
<
ExpandCollapseColumn
FilterControlAltText
=
"Filter ExpandColumn column"
></
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridBoundColumn
FilterControlAltText
=
"Filter Voyage Column"
HeaderText
=
"Voyage"
UniqueName
=
"Voyage"
DataField
=
"VoyageID"
>
<
HeaderStyle
Width
=
"55px"
HorizontalAlign
=
"Center"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
FilterControlAltText
=
"Filter Leg Start Column"
UniqueName
=
"LegStart"
HeaderText
=
"Start Date"
DataField
=
"LegStart"
>
<
HeaderStyle
Width
=
"125px"
HorizontalAlign
=
"Center"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
FilterControlAltText
=
"Filter Leg End Column"
UniqueName
=
"LegEnd"
HeaderText
=
"End Date"
DataField
=
"LegEnd"
>
<
HeaderStyle
Width
=
"125px"
HorizontalAlign
=
"Center"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
FilterControlAltText
=
"Filter Vessel Column"
UniqueName
=
"VesselName"
HeaderText
=
"Vessel"
DataField
=
"VesselName"
>
<
HeaderStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
FilterControlAltText
=
"Filter Facility Column"
UniqueName
=
"FacilityName"
HeaderText
=
"Facility"
DataField
=
"FacilityName"
>
<
HeaderStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
FilterControlAltText
=
"Filter Time Usage column"
HeaderText
=
"Time Usage"
UniqueName
=
"TimeUsage"
DataField
=
"TimeUsage"
>
<
HeaderStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
FilterControlAltText
=
"Filter Volume Usage column"
HeaderText
=
"Volume Usage"
UniqueName
=
"VolumeUsage"
DataField
=
"VolumeUsage"
>
<
HeaderStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
FilterControlAltText
=
"Filter Weight column"
HeaderText
=
"Weight"
UniqueName
=
"Weight"
DataField
=
"Weight"
>
<
HeaderStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
FilterControlAltText
=
"Filter Capacity Usage Column"
HeaderText
=
"Capacity Usage"
UniqueName
=
"CapacityUsage"
DataField
=
"CapacityUsage"
>
<
HeaderStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
FilterControlAltText
=
"Filter Deck Space Usage Column"
HeaderText
=
"Deck Space Usage"
UniqueName
=
"DeckSpaceUsage"
DataField
=
"DeckSpaceUsage"
>
<
HeaderStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridBoundColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
InsertImageUrl
=
"Update.gif"
UpdateImageUrl
=
"Update.gif"
EditImageUrl
=
"Edit.gif"
CancelImageUrl
=
"Cancel.gif"
FilterControlAltText
=
"Filter EditCommandColumn column"
></
EditColumn
>
</
EditFormSettings
>
<
GroupByExpressions
>
<
telerik:GridGroupByExpression
>
<
SelectFields
>
<
telerik:GridGroupByField
FieldName
=
"VoyageID"
HeaderText
=
"Voyage"
/>
</
SelectFields
>
<
GroupByFields
>
<
telerik:GridGroupByField
FieldName
=
"VoyageID"
SortOrder
=
"Descending"
/>
</
GroupByFields
>
</
telerik:GridGroupByExpression
>
</
GroupByExpressions
>
</
MasterTableView
>
<
PagerStyle
Mode
=
"NextPrevNumericAndAdvanced"
/>
<
ClientSettings
ReorderColumnsOnClient
=
"True"
AllowDragToGroup
=
"True"
AllowColumnsReorder
=
"True"
>
<
Resizing
AllowRowResize
=
"True"
AllowColumnResize
=
"True"
EnableRealTimeResize
=
"True"
ResizeGridOnColumnResize
=
"False"
></
Resizing
>
</
ClientSettings
>
<
GroupingSettings
ShowUnGroupButton
=
"true"
/>
<
FilterMenu
EnableImageSprites
=
"False"
></
FilterMenu
>
<
HeaderContextMenu
EnableEmbeddedSkins
=
"False"
CssClass
=
"GridContextMenu GridContextMenu_dpgrid"
></
HeaderContextMenu
>
</
telerik:RadGrid
>
<
telerik:RadGrid
ID
=
"grdCurrentandPrior"
runat
=
"server"
AllowSorting
=
"True"
AutoGenerateColumns
=
"False"
GridLines
=
"Horizontal"
Skin
=
"Web20"
Style
=
"margin-right: 0px"
Width
=
"897px"
Height
=
"252px"
OnNeedDataSource
=
"grdCurrentandPrior_NeedDataSource"
OnExcelMLExportRowCreated
=
"grdCurrentandPrior_ExcelMLExportRowCreated"
OnSortCommand
=
"grdCurrentandPrior_SortCommand"
>
<
ExportSettings
FileName
=
"OpenItemsCurrentInventory"
IgnorePaging
=
"True"
OpenInNewWindow
=
"True"
ExportOnlyData
=
"true"
Excel-Format
=
"ExcelML"
>
</
ExportSettings
>
<
MasterTableView
CommandItemDisplay
=
"Bottom"
AllowNaturalSort
=
"false"
UseAllDataFields
=
"true"
>
<
CommandItemSettings
ShowExportToExcelButton
=
"true"
ShowAddNewRecordButton
=
"false"
ShowRefreshButton
=
"false"
/>
<
Columns
>
<
telerik:GridTemplateColumn
DataField
=
"Assignee"
HeaderText
=
"Assignee"
UniqueName
=
"Assignee"
SortExpression
=
"Assignee"
>
<
HeaderStyle
Font-Bold
=
"True"
Width
=
"150px"
HorizontalAlign
=
"Center"
Font-Names
=
"Arial"
/>
<
ItemTemplate
>
<
asp:Label
ID
=
"lbAssignee"
runat
=
"server"
Text='<%# Eval("Assignee") %>'></
asp:Label
>
</
ItemTemplate
>
<
FooterStyle
HorizontalAlign
=
"Right"
Font-Bold
=
"true"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"State"
HeaderText
=
"State"
UniqueName
=
"State"
SortExpression
=
"State"
Visible
=
"false"
>
<
HeaderStyle
Font-Bold
=
"True"
Width
=
"150px"
HorizontalAlign
=
"Center"
Font-Names
=
"Arial"
/>
<
ItemTemplate
>
<
asp:Label
ID
=
"lbState"
runat
=
"server"
Text='<%# Eval("State") %>'></
asp:Label
>
</
ItemTemplate
>
<
FooterStyle
HorizontalAlign
=
"Right"
Font-Bold
=
"true"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"JurisdictionCount"
HeaderText
=
"Jurisdictions"
UniqueName
=
"JurisdictionCount"
SortExpression
=
"JurisdictionCount"
>
<
HeaderStyle
Font-Bold
=
"True"
Width
=
"80px"
HorizontalAlign
=
"Center"
Font-Names
=
"Arial"
/>
<
ItemTemplate
>
<
asp:Label
ID
=
"lbJurisdiction"
runat
=
"server"
Text='<%# Eval("JurisdictionCount", "{0:N0}")%>'></
asp:Label
>
</
ItemTemplate
>
<
ItemStyle
HorizontalAlign
=
"Right"
ForeColor
=
"Black"
/>
<
FooterStyle
HorizontalAlign
=
"Right"
Font-Bold
=
"true"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"OpenItemsCountPrior"
HeaderText
=
"Prior Open Items"
UniqueName
=
"OpenItemsCountPrior"
SortExpression
=
"OpenItemsCountPrior"
>
<
HeaderStyle
Font-Bold
=
"True"
Width
=
"80px"
HorizontalAlign
=
"Center"
Font-Names
=
"Arial"
/>
<
ItemTemplate
>
<
asp:Label
ID
=
"lbPrior"
runat
=
"server"
Text='<%# Eval("OpenItemsCountPrior", "{0:N0}") %>'></
asp:Label
>
</
ItemTemplate
>
<
ItemStyle
HorizontalAlign
=
"Right"
ForeColor
=
"Black"
/>
<
FooterStyle
HorizontalAlign
=
"Right"
Font-Bold
=
"true"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"OpenItemsCountLastMonth"
HeaderText
=
"Last Month Items"
UniqueName
=
"OpenItemsCountLastMonth"
SortExpression
=
"OpenItemsCountLastMonth"
>
<
HeaderStyle
Font-Bold
=
"True"
Width
=
"80px"
HorizontalAlign
=
"Center"
Font-Names
=
"Arial"
/>
<
ItemTemplate
>
<
asp:Label
ID
=
"lbLastMonth"
runat
=
"server"
Text='<%# Eval("OpenItemsCountLastMonth", "{0:N0}") %>'></
asp:Label
>
</
ItemTemplate
>
<
ItemStyle
HorizontalAlign
=
"Right"
ForeColor
=
"Black"
/>
<
FooterStyle
HorizontalAlign
=
"Right"
Font-Bold
=
"true"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"OpenItemsCountCurrent"
HeaderText
=
"Current Open Items"
UniqueName
=
"OpenItemsCountCurrent"
SortExpression
=
"OpenItemsCountCurrent"
>
<
HeaderStyle
Font-Bold
=
"True"
Width
=
"100px"
HorizontalAlign
=
"Center"
Font-Names
=
"Arial"
/>
<
ItemTemplate
>
<
asp:Label
ID
=
"lbCurrent"
runat
=
"server"
Text='<%# Eval("OpenItemsCountCurrent", "{0:N0}") %>'></
asp:Label
>
</
ItemTemplate
>
<
ItemStyle
HorizontalAlign
=
"Right"
ForeColor
=
"Black"
/>
<
FooterStyle
HorizontalAlign
=
"Right"
Font-Bold
=
"true"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"TotalRemainingItems"
HeaderText
=
"Items Left to Pay"
UniqueName
=
"TotalRemainingItems"
SortExpression
=
"TotalRemainingItems"
>
<
HeaderStyle
Font-Bold
=
"True"
Width
=
"95px"
HorizontalAlign
=
"Center"
Font-Names
=
"Arial"
/>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblTotalRemain"
runat
=
"server"
Text='<%# Eval("TotalRemainingItems", "{0:N0}") %>'></
asp:Label
>
</
ItemTemplate
>
<
ItemStyle
HorizontalAlign
=
"Right"
ForeColor
=
"Black"
/>
<
FooterStyle
HorizontalAlign
=
"Right"
Font-Bold
=
"true"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"CompleteCount"
HeaderText
=
"Complete"
UniqueName
=
"CompleteCount"
SortExpression
=
"CompleteCount"
>
<
HeaderStyle
Font-Bold
=
"True"
Width
=
"80px"
HorizontalAlign
=
"Center"
Font-Names
=
"Arial"
/>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblCompleteCount"
runat
=
"server"
Text='<%# Eval("CompleteCount", "{0:N0}") %>'></
asp:Label
>
</
ItemTemplate
>
<
ItemStyle
HorizontalAlign
=
"Right"
ForeColor
=
"Black"
/>
<
FooterStyle
HorizontalAlign
=
"Right"
Font-Bold
=
"true"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"PercentComplete"
HeaderText
=
"% Complete"
UniqueName
=
"clmPctComplete"
SortExpression
=
"PercentComplete"
>
<
HeaderStyle
Font-Bold
=
"True"
Width
=
"85px"
HorizontalAlign
=
"Center"
Font-Names
=
"Arial"
/>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblPctComplete"
runat
=
"server"
Text='<%# Eval("PercentComplete", "{0:N2}%")%>'></
asp:Label
>
</
ItemTemplate
>
<
ItemStyle
HorizontalAlign
=
"Right"
ForeColor
=
"Black"
/>
<
FooterStyle
HorizontalAlign
=
"Right"
Font-Bold
=
"true"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"AssigneeEmployeeKey"
ReadOnly
=
"True"
UniqueName
=
"AssigneeEmployeeKey"
Visible
=
"False"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
<
HeaderStyle
BorderStyle
=
"Solid"
/>
<
ClientSettings
>
<
Scrolling
AllowScroll
=
"True"
UseStaticHeaders
=
"True"
/>
</
ClientSettings
>
</
telerik:RadGrid
>