Hi,
I'm using for the Grid a stored Procedure with a parameter as the source.
This stored Procedure works fine. but when i open the "configuration wizard" and i insert the value in context window "Refresh data source schema" i'm getting the error "unable to receive schema. ensure that the Connection string and Selectcommand property are valid. invalid length parameter passed to the LEFT or SUBSTRING function"
When i run the page it woks fine! in case that i need to configure a hierarchical grid i like to open the wizard where i get the error :-(
this is my code:
aspx page:
***********************************************
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<div>
</div>
<div class="demo-container no-bg">
</div>
<div id="AlertDIV" runat="server" class="AlertBOX">
<table>
<tr>
<td>
<asp:SqlDataSource ID="mnv" runat="server" ConnectionString="<%$ ConnectionStrings:connBTDashboard %>" SelectCommand="sp_Playground" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DefaultValue="1" Name="dfg" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="mnv" GroupPanelPosition="Top">
<GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
<MasterTableView DataSourceID="mnv">
</MasterTableView>
</telerik:RadGrid>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
***********************************************
ALTER proc [dbo].[sp_Playground]
@dfg int
as
Declare @Cols varchar(max)= ''
DECLARE @SQL varchar(max)
select @Cols += '['+ [col_Name]+'],'from [dbo].[tbl_Conf_MultiNAV] where col_Group = @dfg
Set @COLS = left(@COLS,len(@COLS)-1)
select @Cols as Value
--********************************
--call of SP in Management Studio => works fine
--********************************
exec [sp_Playground] 1
as a remark ... this code in my test to rebuild this error i have in another project ;-)
i'm using .net 4.0 and UI Version 2015.3.1111.40
does anybody had that problem already ?
thanks a lot
cheers
Dennis
I'm using for the Grid a stored Procedure with a parameter as the source.
This stored Procedure works fine. but when i open the "configuration wizard" and i insert the value in context window "Refresh data source schema" i'm getting the error "unable to receive schema. ensure that the Connection string and Selectcommand property are valid. invalid length parameter passed to the LEFT or SUBSTRING function"
When i run the page it woks fine! in case that i need to configure a hierarchical grid i like to open the wizard where i get the error :-(
this is my code:
aspx page:
***********************************************
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<div>
</div>
<div class="demo-container no-bg">
</div>
<div id="AlertDIV" runat="server" class="AlertBOX">
<table>
<tr>
<td>
<asp:SqlDataSource ID="mnv" runat="server" ConnectionString="<%$ ConnectionStrings:connBTDashboard %>" SelectCommand="sp_Playground" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DefaultValue="1" Name="dfg" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="mnv" GroupPanelPosition="Top">
<GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
<MasterTableView DataSourceID="mnv">
</MasterTableView>
</telerik:RadGrid>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
***********************************************
ALTER proc [dbo].[sp_Playground]
@dfg int
as
Declare @Cols varchar(max)= ''
DECLARE @SQL varchar(max)
select @Cols += '['+ [col_Name]+'],'from [dbo].[tbl_Conf_MultiNAV] where col_Group = @dfg
Set @COLS = left(@COLS,len(@COLS)-1)
select @Cols as Value
--********************************
--call of SP in Management Studio => works fine
--********************************
exec [sp_Playground] 1
as a remark ... this code in my test to rebuild this error i have in another project ;-)
i'm using .net 4.0 and UI Version 2015.3.1111.40
does anybody had that problem already ?
thanks a lot
cheers
Dennis