
protected void RadGrid1_ColumnCreated(object sender, Telerik.Web.UI.GridColumnCreatedEventArgs e) { if (e.Column is GridBoundColumn && (e.Column as GridBoundColumn).DataField == "Sales") { (e.Column as GridBoundColumn).DataFormatString = "{0:C}"; } }I am executing an SSRS rpt and need to duplicate this in a web project with sqldatasource id's.
The ssrs rpt parameters work perfectly as far as being populated, but when I try to get the same thing done in the web version, the second parameter list never gets populated.
The Ship parameter depends upon what is selected in the CruiseLine parameter.
The parameters in the web version are as follows:
<tr> <td> Select a CruiseLine: <telerik:radcombobox id="RadComboBox1" runat="server" checkboxes="True" enablecheckallitemscheckbox="False" skin="Web20" sort="Ascending" allowcustomtext="True" datasourceid="SqlDataSource1" datatextfield="CruiseLine" datavaluefield="CruiseLine"> </telerik:radcombobox> <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator3" ValidationGroup="A" ControlToValidate="RadComboBox1" ErrorMessage="Choose a CruiseLine!"></asp:RequiredFieldValidator> </td> <td> Select a Ship: <telerik:radcombobox id="RadComboBox2" runat="server" checkboxes="True" enablecheckallitemscheckbox="False" skin="Web20" sort="Ascending" allowcustomtext="True" datasourceid="SqlDataSource2" datatextfield="Ship" datavaluefield="Ship"> </telerik:radcombobox> <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ValidationGroup="A" ControlToValidate="RadComboBox2" ErrorMessage="Choose a Ship!"></asp:RequiredFieldValidator> </td> </tr><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:PrepaidConnectionString %>" SelectCommand="SelectCruiseLine" DataSourceMode="DataSet" EnableCaching="true" SelectCommandType="StoredProcedure"></asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:PrepaidConnectionString %>" SelectCommand="SelectShip" DataSourceMode="DataSet" EnableCaching="true" SelectCommandType="StoredProcedure"> <SelectParameters> <asp:Parameter Name="CruiseLine" Type="String" /> </SelectParameters> </asp:SqlDataSource>SELECT DISTINCT CruiseLine FROM dbo.ShipProductPrices ORDER BY CruiseLineALTER PROCEDURE [dbo].[SelectShip] @CruiseLine NVARCHAR(MAX) AS BEGIN SET NOCOUNT ON; SELECT DISTINCT Ship FROM dbo.ShipProductPrices WHERE CruiseLine IN (SELECT * FROM dbo.SplitParameterValues(@CruiseLine, ',')) ORDER BY Ship ENDSELECT DISTINCT Ship FROM dbo.ShipProductPrices WHERE CruiseLine IN (SELECT * FROM dbo.SplitParameterValues('CCL', ',')) ORDER BY ShipNotice the parameter type of the Ship combobox and the type of the SelectParameter of the SelectShip datasource. They are a little bit different. Don't know if this makes a difference or not.
The SelectShip SPROC executes a UDF which again is part of the sproc that I ran above manually with data coming out in sql management studio.
What do I need to do in order to populate the second combobox?
oWnd.add_close(function (sender, args) { windowHandler(sender, "close"); });<telerik:RadGrid ID="RadGrid" runat="server" AutoGenerateColumns="False" AllowSorting="True" AllowFilteringByColumn="True"> <ClientSettings AllowColumnsReorder="True"> <Scrolling UseStaticHeaders="True" AllowScroll="True" SaveScrollPosition="True" ScrollHeight="500px"/> </ClientSettings> <GroupingSettings CaseSensitive="False"/> <MasterTableView> <Columns> <telerik:GridBoundColumn UniqueName="Name" DataField="Name" HeaderText="Name" AutoPostBackOnFilter="True" HeaderStyle-Width="35%" ItemStyle-HorizontalAlign="Left"/> <telerik:GridBoundColumn UniqueName="Common" DataField="Common" HeaderText="Common" AutoPostBackOnFilter="True" HeaderStyle-HorizontalAlign="Center"/> </Columns> </MasterTableView></telerik:RadGrid>Protected Sub Export_Klanten_Click(sender As Object, e As EventArgs) Handles btn_Export_Klanten.ClickRadFilter2.FireApplyCommand()dtgKlanten.ExportSettings.ExportOnlyData = true dtgKlanten.ExportSettings.IgnorePaging = truedtgKlanten.MasterTableView.AllowFilteringByColumn = falsedtgKlanten.ExportSettings.OpenInNewWindow = truedtgKlanten.ExportSettings.HideStructureColumns = truedtgKlanten.MasterTableView.ExportToExcel()End SubProtected Sub RadFilter2_ApplyExpressions(sender As Object, e As RadFilterApplyExpressionsEventArgs) Dim provider As New RadFilterSqlQueryProvider() provider.ProcessGroup(e.ExpressionRoot) dtgKlanten.MasterTableView.FilterExpression = provider.Result dtgKlanten.Rebind()End Sub