I am trying to export the data from my RadGrid and keep recieving this error:
Is there anyway that I can exclude the column that contains this control on my export?
My Radgrid Code is below:
The DataSourceID of 'grdShipToCodes' must be the ID of a control of type IDataSource. A control with ID 'dsShipToCodes' could not be found.
Is there anyway that I can exclude the column that contains this control on my export?
My Radgrid Code is below:
<
telerik:RadGrid
ID
=
"grdDistrictGrowthCustomer"
runat
=
"server"
DataSourceID
=
"SqlDataSource1"
GridLines
=
"None"
AllowPaging
=
"True"
AutoGenerateColumns
=
"False"
PageSize
=
"100"
EnableLinqExpressions
=
"False"
AllowFilteringByColumn
=
"True"
AllowSorting
=
"True"
>
<
ExportSettings
IgnorePaging
=
"True"
OpenInNewWindow
=
"True"
>
</
ExportSettings
>
<
ClientSettings
EnableRowHoverStyle
=
"True"
>
</
ClientSettings
>
<
MasterTableView
DataSourceID
=
"SqlDataSource1"
ClientDataKeyNames
=
"CustNo"
CommandItemDisplay
=
"Top"
NoMasterRecordsText
=
"There are no growth account customers in this district."
>
<
CommandItemSettings
ShowAddNewRecordButton
=
"False"
ShowRefreshButton
=
"False"
/>
<
RowIndicatorColumn
>
<
HeaderStyle
Width
=
"20px"
/>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
>
<
HeaderStyle
Width
=
"20px"
/>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridTemplateColumn
DataField
=
"CustNo"
HeaderText
=
"No."
UniqueName
=
"CustNo"
AutoPostBackOnFilter
=
"True"
CurrentFilterFunction
=
"Contains"
FilterControlAltText
=
"Type Number filter and press ENTER."
FilterControlWidth
=
"55px"
ShowFilterIcon
=
"False"
SortExpression
=
"CustNo"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblCustNo"
runat
=
"server"
Text='<%# Eval("CustNo") %>'></
asp:Label
>
</
ItemTemplate
>
<
HeaderStyle
Font-Bold
=
"True"
Font-Italic
=
"False"
Font-Overline
=
"False"
Font-Strikeout
=
"False"
Font-Underline
=
"False"
Width
=
"100px"
Wrap
=
"True"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"CustName"
HeaderText
=
"Name"
UniqueName
=
"CustName"
AndCurrentFilterFunction
=
"Contains"
AutoPostBackOnFilter
=
"True"
FilterControlAltText
=
"Type Name filter and press ENTER."
FilterControlWidth
=
"110px"
ShowFilterIcon
=
"False"
SortExpression
=
"CustName"
>
<
HeaderStyle
Font-Bold
=
"True"
Font-Italic
=
"False"
Font-Overline
=
"False"
Font-Strikeout
=
"False"
Font-Underline
=
"False"
Width
=
"175px"
Wrap
=
"True"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"CustContact"
HeaderText
=
"Contact"
UniqueName
=
"CustContact"
AndCurrentFilterFunction
=
"Contains"
AutoPostBackOnFilter
=
"True"
FilterControlAltText
=
"Type Contact filter and press ENTER."
FilterControlWidth
=
"90px"
ShowFilterIcon
=
"False"
SortExpression
=
"CustContact"
>
<
HeaderStyle
Font-Bold
=
"True"
Font-Italic
=
"False"
Font-Overline
=
"False"
Font-Strikeout
=
"False"
Font-Underline
=
"False"
Width
=
"140px"
Wrap
=
"True"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"CustAddress"
HeaderText
=
"Address"
UniqueName
=
"CustAddress"
AllowFiltering
=
"False"
SortExpression
=
"CustAddress"
>
<
HeaderStyle
Font-Bold
=
"True"
Font-Italic
=
"False"
Font-Overline
=
"False"
Font-Strikeout
=
"False"
Font-Underline
=
"False"
Wrap
=
"True"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"CustCity"
HeaderText
=
"City"
UniqueName
=
"CustCity"
AndCurrentFilterFunction
=
"Contains"
AutoPostBackOnFilter
=
"True"
FilterControlAltText
=
"Type City filter and press ENTER."
FilterControlWidth
=
"70px"
ShowFilterIcon
=
"False"
SortExpression
=
"CustCity"
>
<
HeaderStyle
Font-Bold
=
"True"
Font-Italic
=
"False"
Font-Overline
=
"False"
Font-Strikeout
=
"False"
Font-Underline
=
"False"
Width
=
"140px"
Wrap
=
"True"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"CustState"
HeaderText
=
"State"
UniqueName
=
"CustState"
AndCurrentFilterFunction
=
"Contains"
AutoPostBackOnFilter
=
"True"
FilterControlAltText
=
"Type State filter and press ENTER."
FilterControlWidth
=
"25px"
ShowFilterIcon
=
"False"
SortExpression
=
"CustState"
>
<
HeaderStyle
Font-Bold
=
"True"
Font-Italic
=
"False"
Font-Overline
=
"False"
Font-Strikeout
=
"False"
Font-Underline
=
"False"
Width
=
"40px"
Wrap
=
"True"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"CustPostCode"
HeaderText
=
"Zip"
UniqueName
=
"CustPostCode"
AndCurrentFilterFunction
=
"Contains"
AutoPostBackOnFilter
=
"True"
FilterControlAltText
=
"Type Zip filter and press ENTER."
FilterControlWidth
=
"35px"
ShowFilterIcon
=
"False"
SortExpression
=
"CustPostCode"
>
<
HeaderStyle
Font-Bold
=
"True"
Font-Italic
=
"False"
Font-Overline
=
"False"
Font-Strikeout
=
"False"
Font-Underline
=
"False"
Width
=
"65px"
Wrap
=
"True"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Ship-to Code"
UniqueName
=
"ShipToCodes"
AllowFiltering
=
"False"
Groupable
=
"False"
ShowSortIcon
=
"False"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblCustomerNo"
runat
=
"server"
Text='<%# Eval("CustNo") %>' Visible="False"></
asp:Label
>
<
asp:SqlDataSource
ID
=
"dsShipToCodes"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:RDAConnectionString %>"
SelectCommand="pr_GCP_Find_ShipTo_Codes_By_RDA_District_And_Customer"
SelectCommandType="StoredProcedure">
<
SelectParameters
>
<
asp:Parameter
DefaultValue
=
"INC"
Name
=
"Company"
Type
=
"String"
/>
<
asp:ControlParameter
ControlID
=
"cboDistricts"
DefaultValue
=
""
Name
=
"District"
PropertyName
=
"SelectedItem.Text"
Type
=
"String"
/>
<
asp:ControlParameter
ControlID
=
"lblCustomerNo"
Name
=
"CustomerNo"
PropertyName
=
"Text"
Type
=
"String"
/>
</
SelectParameters
>
</
asp:SqlDataSource
>
<
asp:GridView
ID
=
"grdShipToCodes"
runat
=
"server"
DataSourceID
=
"dsShipToCodes"
AutoGenerateColumns
=
"False"
GridLines
=
"None"
ShowHeader
=
"False"
>
<
Columns
>
<
asp:TemplateField
>
<
ItemTemplate
>
<
div
style
=
"cursor: pointer"
><
asp:Label
ID
=
"lblShipToCode"
runat
=
"server"
Text='<%# Bind("STA_Code") %>' Font-Underline="True" Font-Size="Small"></
asp:Label
></
div
>
<
asp:Label
ID
=
"lblName"
runat
=
"server"
Text='<%# Bind("STA_Name") %>' Visible="false"></
asp:Label
>
<
asp:Label
ID
=
"lblAddress"
runat
=
"server"
Text='<%# Bind("STA_Address") %>' Visible="false"></
asp:Label
>
<
asp:Label
ID
=
"lblAddress2"
runat
=
"server"
Text='<%# Bind("STA_Address2") %>' Visible="false"></
asp:Label
>
<
asp:Label
ID
=
"lblCity"
runat
=
"server"
Text='<%# Bind("STA_City") %>' Visible="false"></
asp:Label
>
<
asp:Label
ID
=
"lblState"
runat
=
"server"
Text='<%# Bind("STA_State") %>' Visible="false"></
asp:Label
>
<
asp:Label
ID
=
"lblPostCode"
runat
=
"server"
Text='<%# Bind("STA_PostCode") %>' Visible="false"></
asp:Label
>
<
asp:Label
ID
=
"lblPhoneNo"
runat
=
"server"
Text='<%# Bind("STA_PhoneNo") %>' Visible="false"></
asp:Label
>
</
ItemTemplate
>
</
asp:TemplateField
>
</
Columns
>
</
asp:GridView
>
</
ItemTemplate
>
<
HeaderStyle
Font-Bold
=
"True"
Font-Italic
=
"False"
Font-Overline
=
"False"
Font-Strikeout
=
"False"
Font-Underline
=
"False"
Width
=
"100px"
Wrap
=
"True"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Linked Custs."
UniqueName
=
"LinkedCust"
AllowFiltering
=
"False"
Groupable
=
"False"
ShowSortIcon
=
"False"
>
<
ItemTemplate
>
<
asp:SqlDataSource
ID
=
"dsLinkedCustomers"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:RDAConnectionString %>"
SelectCommand="pr_GCP_Find_All_Linked_Customers"
SelectCommandType="StoredProcedure">
<
SelectParameters
>
<
asp:Parameter
DefaultValue
=
"INC"
Name
=
"Company"
Type
=
"String"
/>
<
asp:ControlParameter
ControlID
=
"lblCustomerNo"
Name
=
"CustomerNo"
PropertyName
=
"Text"
Type
=
"String"
/>
</
SelectParameters
>
</
asp:SqlDataSource
>
<
asp:GridView
ID
=
"grdLinkedCustomers"
runat
=
"server"
DataSourceID
=
"dsLinkedCustomers"
AutoGenerateColumns
=
"False"
GridLines
=
"None"
ShowHeader
=
"False"
EnableModelValidation
=
"True"
>
</
asp:GridView
>
</
ItemTemplate
>
<
HeaderStyle
Font-Bold
=
"True"
Font-Italic
=
"False"
Font-Overline
=
"False"
Font-Strikeout
=
"False"
Font-Underline
=
"False"
Width
=
"90px"
Wrap
=
"True"
/>
<
ItemStyle
Font-Bold
=
"False"
Font-Italic
=
"False"
Font-Overline
=
"False"
Font-Strikeout
=
"False"
Font-Underline
=
"False"
HorizontalAlign
=
"Left"
Wrap
=
"True"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"BlockType"
HeaderText
=
"Blocked"
UniqueName
=
"BlockType"
AllowFiltering
=
"False"
SortExpression
=
"BlockType"
>
<
HeaderStyle
Font-Bold
=
"True"
Font-Italic
=
"False"
Font-Overline
=
"False"
Font-Strikeout
=
"False"
Font-Underline
=
"False"
Wrap
=
"True"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
UniqueName
=
"Select"
HeaderText
=
"Action"
Groupable
=
"False"
ShowFilterIcon
=
"False"
ShowSortIcon
=
"False"
>
<
ItemTemplate
>
<
asp:LinkButton
ID
=
"btnRequestPromotion"
CommandName
=
"RequestPromotion"
runat
=
"server"
Visible
=
"false"
>Request Promotion</
asp:LinkButton
>
<
asp:LinkButton
ID
=
"btnApprovePromotion"
CommandName
=
"ApprovePromotion"
runat
=
"server"
Visible
=
"false"
>Approve & Promote</
asp:LinkButton
>
</
ItemTemplate
>
<
FilterTemplate
>
<
asp:Button
ID
=
"btnApplyFilters"
runat
=
"server"
CommandName
=
"ApplyFilter"
Height
=
"22px"
Text
=
"Apply Filters"
ToolTip
=
"Click to apply enetered filters, or press enter while in a filter texbox."
Width
=
"115px"
/>
</
FilterTemplate
>
<
HeaderStyle
Width
=
"125px"
Font-Bold
=
"True"
Font-Italic
=
"False"
Font-Overline
=
"False"
HorizontalAlign
=
"Center"
Font-Strikeout
=
"False"
Font-Underline
=
"False"
Wrap
=
"True"
/>
<
ItemStyle
Font-Bold
=
"False"
Font-Italic
=
"False"
Font-Overline
=
"False"
Font-Strikeout
=
"False"
Font-Underline
=
"False"
HorizontalAlign
=
"Center"
Wrap
=
"True"
/>
</
telerik:GridTemplateColumn
>
</
Columns
>
<
ItemStyle
Font-Bold
=
"False"
Font-Italic
=
"False"
Font-Overline
=
"False"
Font-Strikeout
=
"False"
Font-Underline
=
"False"
VerticalAlign
=
"Top"
Wrap
=
"True"
/>
<
AlternatingItemStyle
Font-Bold
=
"False"
Font-Italic
=
"False"
Font-Overline
=
"False"
Font-Strikeout
=
"False"
Font-Underline
=
"False"
VerticalAlign
=
"Top"
Wrap
=
"True"
/>
</
MasterTableView
>
</
telerik:RadGrid
>