This is a migrated thread and some comments may be shown as answers.

[Solved] RadGrid Parameter Datasource

2 Answers 224 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 19 Aug 2009, 10:40 AM
Hi,

I was wondering if any one could help me. This is the setup:-
SQL Datasource:-
<asp:SqlDataSource ID="GridSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:connect %>" 
                        SelectCommand="FilterProcMainv2" SelectCommandType="StoredProcedure">  
                        <SelectParameters> 
                            <asp:Parameter Name="owner" Type="Int32" /> 
                            <asp:Parameter DefaultValue="7" Name="team" Type="Int32" /> 
                        </SelectParameters> 
                    </asp:SqlDataSource> 
 Part of the Grid:-
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="GridSqlDataSource" 
                        GridLines="None" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" 
                        PageSize="15" ShowGroupPanel="True">  
                        <MasterTableView DataSourceID="GridSqlDataSource" DataKeyNames="work_request_pk">  
                            <Columns> 
The grid has a number of filter columns dates and combo boxs with their own datasources. The grid loads with out any problems if I set it to  datasource with out any paremeters.

I've checked my sql and it works fine, I've debugged the stored procedure and its returning the results I want.

if anyone could help or point me in the right direction it would be a great help.

Thanks

2 Answers, 1 is accepted

Sort by
0
Karl
Top achievements
Rank 1
answered on 20 Aug 2009, 10:43 AM
Any one out there got any ideas about this one? Thanks
0
Yavor
Telerik team
answered on 21 Aug 2009, 08:50 AM
Hi Karl,

Did you check whether the sql datasource is returning the proper and expected results? It may be, that the parameters are preventing it from returning a valid dataset, from which che grid can be populated. What is the result, if you bind a standard GridView/DataGrid to the same datasource?

Best wishes,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Karl
Top achievements
Rank 1
Answers by
Karl
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or