We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Problems with binding data to Range Navigator

Thread ID:

Created:

Updated:

Platform:

Replies:

119142 May 13,2015 12:31 PM May 15,2015 09:21 AM LightSwitch HTML 4
loading
Tags: RangeNavigator
megan brown
Asked On May 13, 2015 12:31 PM

I've run into a problem with feeding data from a sql database to the Range Navigator.  I've tried two approaches, and have not found a solution for how to populate this control.

Approach #1  : Ajax call from aspx page to function in code behind page that populates a datatable with sql data, and returns JSON string in the format / structure given in the online documentation example.  Problem:  decoding JSON leaves sql datatime as a string, but I believe the control expects it to be date data type.

json data structure

Approach #2 : Bind the range navigator control to the data from code behind.  Using the same data structure as before, but instead of converting the data object to JSON, I conver it to a list so it can be cast to IEnumerable.  I then bind this to the control.  When I attempt to run the page, it takes forever, and finally throws an exception (something about null color attribute?)

binding data to control
cont.

How can I get data from sql bound to this control, using one of the approaches I've tried, or something else?

Vinothkumar Arumugam [Syncfusion]
Replied On May 14, 2015 09:14 AM

Hi Megan Brown,

Thanks for using Syncfusion products.

We have analyzed your reported query and found that the images attached in the forum are not uploaded properly and we are not able to view them, so we find difficulty in understanding your way of binding datasource to rangenavigator. However we have prepared a simple sample by using NORTHWNDEntitiesData as a primary database file and connected rangenavigator. In which we are using Orders table to render chart.

Please find below sample and you can download it from below link

Sample Link:
Sample.zip

If this is not your requirements please revert us back by modifying the sample, it will help us to serve you better.

Thanks,

Vinothkumar Arumugam


megan brown
Replied On May 14, 2015 10:26 AM

strange, I can see the images.  i'll take a look at the sample you provided and get back with you.

in the meantime, I'm attaching the images instead of linking them.

image 1:  screenshot of json structure from "approach 1", showing sql date as string data type.
image 2:  screenshot of c# used to structure the sql data and bind to the range navigator control (approach #2)
image 3:  class structure used in image 2 above.

Attachment: images_740bac52.zip

megan brown
Replied On May 14, 2015 05:25 PM

I've also added a fourth image, which shows the crash error I see when I attempt to run my code.

Attachment: image_4_2250220b.zip

Akbar Basha K M [Syncfusion]
Replied On May 15, 2015 09:21 AM

Hi Megan Brown,
As you have already created the same incident in the forum we have updated the response inincident(139097) .we kindly request you tofollowup the same in this regard.
Thanks,
Akbar Basha KM.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;