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

Grid - Binding to Telerik ClientDataSource

16 Answers 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dhamodharan
Top achievements
Rank 1
Dhamodharan asked on 05 Dec 2014, 08:17 AM
Hi Telerik Team,

I am using ASP.NET with vb code. i want to use Grid - Binding to Telerik ClientDataSource. i convert the code using telerik convertor. but i did not get exact code. can you please send same sample program in VB code.



Thanks in advance,
Dhamu.

16 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 10 Dec 2014, 09:47 AM
Hi Dhamu,

You can check the VB code source of our live samples:
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/grouping/clientdatasource-grouping/defaultvb.aspx?product=clientdatasource&show-source=true
http://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/client-side/client-data-source-binding/defaultvb.aspx?product=clientdatasource

Hope this helps.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Dhamodharan
Top achievements
Rank 1
answered on 10 Dec 2014, 12:23 PM
Hi Eyup,

Thanks for your reply. i want vb code for "EditingWcfService.cs". in demo we are able to see only c# code. but i want vb code for that WCF Page like EditingWcfService.vb. i converted that same code from C# to vb. but it cause some error. please send the exact sample file for VB.

Thanks in Advance,
Dhamu.
0
Eyup
Telerik team
answered on 15 Dec 2014, 01:45 PM
Hello Dhamu,

We will prepare a new web site with VB as requested and send it to you when ready.
Thank you for your patience in advance.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Dhamodharan
Top achievements
Rank 1
answered on 15 Dec 2014, 01:50 PM
Hi Eyup,

Thanks for your reply. i am waiting for that code. please explain if we need to any configuration for WCF. if needed please explain step by step. it will helpful for me. please send the Code ASAP.


Thanks in Advance
Dhamu
0
Dhamodharan
Top achievements
Rank 1
answered on 16 Dec 2014, 04:10 AM
Hello Eyup,

however i ran the code into another website using C#. but the clientdatasource not working with WCF page. i put the breakpoint in WCF page. that page not fireing. do you have any idea with this one. Please send the sample website for both vb and C#. it will more helpfull us. it is very urgent, Please send the code ASAP.

Thanks again,
Dhamu
0
Eyup
Telerik team
answered on 17 Dec 2014, 08:40 AM
Hi Dhamu,

Thank you again for your patience.

I'm sending you the isolated version of the demo using the service related to the Northwind database. You can run it by opening Visual Studio and under its File menu  select File->Open->Web Site and choose the corresponding folder.

Note that you will need to change the server name from YUSEIN to your own in the web.config. I strongly suggest you to configure the sample to use your own service with the appropriate data source. If you have difficulties implementing the scenario in your real VB project, please open a formal support ticket and send a runnable version of your application to us for further investigation.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Dhamodharan
Top achievements
Rank 1
answered on 17 Dec 2014, 09:20 AM
Hi Eyup,

did you send the isolated version for VB Code?. if not please send the WCF file with VB code. i tried that C#. it is working. but converting C# to VB i have faced issue. Please send the VB code for WCF ASAP.

Thank in Advance,
Dhamu
0
Eyup
Telerik team
answered on 17 Dec 2014, 10:09 AM
Hi Dhamu,

You can try to convert it using the following tool:
http://converter.telerik.com/

I'm also attaching the converted version.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Dhamodharan
Top achievements
Rank 1
answered on 18 Dec 2014, 11:31 AM
Hi Eyup,

I ran your code with my database. now the WCF fires and bind the data correctly. but while updataing we are facing following issue

List<ServiceCustomer> customers = (List<ServiceCustomer>)serializer.Deserialize(customersJSON, typeof(List<ServiceCustomer>));
above code through error messge like "Value cannot be null.
Parameter name: type"

but i getting values abores customersJSON like

[{"__type":"ServiceCustomer:#","att_typ_code":"HR_APPLI","att_typ_id":214,"description":"APPLICATION FOR EMPLOYMENT tese","secure_flag":"Y","show_in_hierarchy":"N"}]

Please let us know how do we fix this issue



Thanks in Advance,
Dhamu




0
Dhamodharan
Top achievements
Rank 1
answered on 19 Dec 2014, 01:55 PM
Hi,

I got solution. i missed following line in class file.

[DataMember]
public string __type { get; set; }


Thanks again,
Dhamu
0
Dhamodharan
Top achievements
Rank 1
answered on 06 Jan 2015, 10:47 AM
Hi Eyup,

I am using C# Code in WCF is working fine. but while using your attached code i have getting error name of field or property being initialized in an object initializer must start with '.' .

Public Function GetCustomers() As CustomersResult
        Dim entities As New NorthwindReadWriteEntities()
        Return New CustomersResult() With { _
            Key .Data = entities.Customers.ToList().[Select](Function(c) New ServiceCustomer() With { _
                Key .CustomerID = c.CustomerID, _
                Key .CompanyName = HttpUtility.HtmlEncode(c.CompanyName), _
                Key .ContactName = HttpUtility.HtmlEncode(c.ContactName), _
                Key .ContactTitle = HttpUtility.HtmlEncode(c.ContactTitle), _
                Key .Address = HttpUtility.HtmlEncode(c.Address) _
            }).ToList(), _
            Key .Count = 100 _
        }
    End Function

if i removed key, i am getting this error tolist is not a member of system.data.object.objectset in following line
 Key .Data = entities.Customers.ToList().[Select](Function(c) New ServiceCustomer() With { _


Please check and let me know what i need to done.
0
Dhamodharan
Top achievements
Rank 1
answered on 09 Jan 2015, 08:09 AM
Hi Eyup,

I missed namespace System.Linq. it is ok. but i want get data from 2 tables. like INCLUDE. i added two tables into entity and relationship working fine. but i am not getting value from INCLUDE table. Please help me about this one.

There are two table
1. PART_REPORTING_LOCATIONS
columns: PLN_PRT_ID
               effective_date
               termination_date
               rep_loc_id

2. LEVEL_REP_LOC
              rep_loc_id
              rep_loc_code
i want to show rep_loc_code, effective_date, termination_date. Please check my code and let me know how to get these record

[WebGet]
    [AspNetCacheProfile("NoCache")]
    public LocationResult getLocation()
    {
        NorthwindReadWriteEntities entities = new NorthwindReadWriteEntities();
        return new LocationResult
        {
            Data = entities.PART_REPORTING_LOCATIONS.ToList().Select(c => new ServiceLocations
            {
                prt_loc_id = c.PLN_PRT_ID,
                termination_date = HttpUtility.HtmlEncode(c.TERMINATION_DATE) != null ? HttpUtility.HtmlEncode(c.TERMINATION_DATE) : "",
                effective_date = c.EFFECTIVE_DATE,
                rep_loc_code =_______________________
            }).ToList(),
            Count = 100
        };
    }

public class ServiceLocations
{
    [DataContract]
    public Int32 prt_loc_id { get; set; }
    [DataContract]
    public DateTime effective_date { get; set; }
    [DataContract]
    public string termination_date { get ; set; }
    [DataContract]
    public string rep_loc_code { get; set; }
     [DataMember]
     public string __type { get; set; }     
}

public class LocationResult
{
    public List<ServiceLocations> Data { get; set; }
    public int Count { get; set; }
}

public class LocationEditResult
{
    public List<ServiceLocations> models { get; set; }
}

Please give a solution ASAP. it is very urgent Please help

Thanks in Advance,
Dhamu
0
Kostadin
Telerik team
answered on 09 Jan 2015, 08:18 AM
Hello Dhamu,

Could you please let me know whether you created a new Entity model since the one which Eyup was provided was created by using a C#. In such cases you have to create a new model because App_Code folder could not contains both C# and VB files. If you have created a new model please make sure you have lost a library reference or, more likely, a namespace import which might cause the issue that you are facing.

Regards,
Kostadin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Dhamodharan
Top achievements
Rank 1
answered on 09 Jan 2015, 08:22 AM
Hi Kostadin,

I created new model and using C# not vb. even though i am able get data from single table. but i want to get more than one table. please check my code and advise me. please leave vb now. i am working C#
0
Kostadin
Telerik team
answered on 13 Jan 2015, 03:04 PM
Hi Dhamu,

Note that joining a table is a matter of common knowledge and it is not related with RadControls. You can check the web where a lot of examples are provided and you can start by examine the following one.

Regards,
Kostadin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Dhamodharan
Top achievements
Rank 1
answered on 12 Feb 2015, 07:53 AM
Hi All,

I want to Pass parameter in RadclientDatasource Select Url. Please check that URL http://www.telerik.com/forums/how-to-pass-parameter-in-radclientdatasource-select-url

Please help immediately ASAP.

Thanks in Advance,
Dhamu.
Tags
Grid
Asked by
Dhamodharan
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Dhamodharan
Top achievements
Rank 1
Kostadin
Telerik team
Share this question
or