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

telerik Grid Master/Details Client-side Data Binding error

1 Answer 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Hemant
Top achievements
Rank 1
Hemant asked on 30 Jun 2011, 06:19 AM
Hi,

I am using Master/Details Client-side Data Binding in latest teletik version - RadControls for ASP.NET AJAX Q1 2011 

'This is my WCF service 
 <OperationContract()> _
    Public Function GetdataSelect(ByVal startRowIndex As Integer, ByVal maximumRows As Integer, ByVal sortExpression As String, ByVal filterExpression As String) As MyData
        Dim data As GridBindingData = RadGrid.GetBindingData("LinqToSql.DataClassesDataContext", "TrnApproval", startRowIndex, maximumRows, sortExpression, filterExpression)
        Dim result As New MyData()
        Dim db As New DataClassesDataContext
        result.Data = From c In db.TrnApprovals Select c.TrnID, c.ApproverID
       
        result.Count = data.Count
        Return result
    End Function

While connecting with WCF service i am getting below error.

System.InvalidOperationException: Could not find the type specified in the ContextTypeName property of LinqDataSource ''. ---> System.Web.HttpException: Could not load type 'LinqToSql.DataClassesDataContext'. at System.Web.UI.WebControls.LinqDataSourceView.get_ContextType()
   at System.Web.UI.WebControls.LinqDataSourceView.CreateContextAndTable(DataSourceOperation operation)
   at System.Web.UI.WebControls.LinqDataSourceView.CreateContextAndTableForSelect()
   at System.Web.UI.WebControls.LinqDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
   at System.Web.UI.WebControls.LinqDataSourceView.Select(DataSourceSelectArguments arguments)
   at Telerik.Web.UI.GridLinqDataSource.GetData()
   at Telerik.Web.UI.RadGrid.GetBindingData(String contextTypeName, String tableName, Int32 startRowIndex, Int32 maximumRows, String sortExpression, String filterExpression)
   at GridBind.GetdataLoad() in E:\Developments\demowcf\App_Code\Gridbind.vb:line 145

Please do the needful.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 30 Jun 2011, 08:06 AM
Hello Hemant,

Check the following forum thread which discussed similar scenario. Hope this helps.

Self-referencing hierarchy with client-side data-binding?

Thanks,
Princy.
Tags
Grid
Asked by
Hemant
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or