Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
154 views
Hi guys,

I am noticing some timezone and DST-related behavior that is confusing me on your demo pages. In particular, there seems to be an inconsistency in the way appointments are rendered when using web-services in comparison to the normal postback-style approach. I will walk you through it so that you can reproduce it and tell me if I am missing something:

Reproduction steps:
1. Change your local system timezone to (UTC + 10:00) Canberra, Melbourne, Sydney (this is my local timezone and the dates you are going to select below are related to DST switches that we have in this timezone, however this problem should theoretically be reproducible for any timezone that observes DST changes)
2. Start your browser fresh (so that your system timezone changes are persisted to it). I used the latest version of Firefox. To check that the system timezone has been persisted to the browser you can open up FireBug and execute "new Date(2000,1,1,9,0,0)" and make sure that the AUS time is shown in the result.
3. Navigate to your demo page: http://demos.telerik.com/aspnet-ajax/scheduler/examples/templates/defaultcs.aspx
4. Choose the day view on the scheduler and navigate to the date: 6 October 2013. Also choose show 24 hrs.
5. Create a new appointment starting at 01:00 (i.e. 1am) lasting for 1 hour or so and click on the create button.
6. Confirm that the new appointment is rendered correctly at 01:00.
7. Navigate to your other page that demonstrates web-service binding: http://demos.telerik.com/aspnet-ajax/scheduler/examples/webservice/defaultcs.aspx
8. Again, choose the day view and navigate to the date: 6 October 2013. Also choose show 24 hrs.
9. Again, create a new appointment starting at 01:00 (i.e. 1am) lasting for 1 hour or so.

Expected results: The appointment renders at 01:00 in the same way as step 6.
Actual results: The appointment renders at 00:00 (i.e. midnight). It appears to have been 'shifted back in time'.

The fact that there is inconsistent behavior in this scenario between web-service binding and postback binding leads me to believe that there may be an issue in the client-side script that renders the appointments that are received from the web-service responses.

I did some light debugging into your javascript and although I might be out of my depth and not understand all the aspects to the problem, I will hesitantly try to identify where I think the problem is. Consider your method...

_toClientDate:function(g){var f=new Date(g.getTime());
var h=f.getTimezoneOffset()*e;
f.setTime(f.getTime()+h);
f.setTime(f.getTime()+this._schedulerTzOffset);
return f;
}

...which is a function in the prototype of Telerik.Web.UI.Scheduler.Rendering.WebServiceRenderingManager. This method seems to be the one responsible for converting the server-received appointment times into times for displaying on the client. Now I don't have time to look into this in depth, however it seems that in the line...

var h=f.getTimezoneOffset()*e;

...you're getting the client-timezone offset of the time BEFORE it has been adjusted by the scheduler timezone offset. In the case that a DST switch is involved, this leads to the one-hour discrepancy that we see in the scenario described above. Without researching it further my gut feeling is that such an offset should be applied AFTER it has been adjusted by the scheduler timezone offset (but I could definitely be wrong on this).

If you were to follow the same approach for the date 7 April 2013 you would see the switch happen the other way (i.e. the appointment is rendered forward one hour). Again this is due to the DST switch (this time going in the opposite direction).

I guess some logical questions might be: how does your logic handle it on the server-side in the postback case, and can this same logic be applied at the client-side so that the web-service binding scenario matches the postback scenario?

We are using web-service binding on our project and this issue is of concern to us. If we are missing something fundamental here then please let us know, otherwise we would appreciate if you could comment on the timeline for resolving this problem, and if there are any workarounds that we can implement. For example, I imagine we might be able to tap into the client 'OnRequestSuccess' method and adjust the dates appropriately in these situations if required...perhaps you could suggest an appropriate code snippet for this.

Cheers,
Sam
Boyan Dimitrov
Telerik team
 answered on 29 Aug 2013
6 answers
256 views
Hi,

I am using a SearchBox with datasource set by a method using fulltext search, case insensitive and accent insensitive. Everything works fine, except the case of accent insensitive, because of Filter.

For example, when users type "to", my fulltext method will return results like "to", "tó", "tô", "tố", ect... But due to Filter of SearchBox, the result will be only "to". Please tell me how to turn off the Filter. The easiest way should be to set Filter="None" (just like with RadComboBox), but not available with SearchBox (currently with only StartsWith and Contains).

I would suggest Filter="None" in the next version.

Thank you.


Plamen
Telerik team
 answered on 29 Aug 2013
4 answers
1.2K+ views
Hi,

I am using version 2012.3.1016 (3.5 Framework) of your ASP.NET for AJAX controls.

My basic question is:  Can I force various resource files to load (WebResource.axd and ScriptResource.axd files)?

The reason why I might want to do this is that I'm experimenting with a free project I got from codeplex that handles the asynchronous loading of ascx controls.  I'm creating a dashboard and I want long running controls to execute after the page loads, and that is what this free project does.

The problem with the free project is:  It is not loading the necessary WebResource.axd and ScriptResource.axd files for the Telerik controls I'm using, so I don't have the needed css and javascript for the controls to work.

I've added link tags to the missing /WebResource.axd?'s and that has made the css available, but I don't know if that is a recommended way of loading these resource files.  Is it?

I've also added script tags like the following, to try to force the javascript to load, but I get javascript errors when the page load, so it isn't working for loading my missing javascript:

<script type="text/javascript" src="/ScriptResource.axd?d=tcuWcqcL5-luLV0wdxLefWCe_aCO56Eh319X6XgtpN2Gtje1MWdgfFfS75k6jswRmNUwWHyiB0uS2ChbFj-BOhVThUoNcyHxhBmYBZ2FX80bd4fNkNBHR8b3D24AhsvzwUlylOd5zfKeaX8EZ1dwg9TXJtU1&t=ffffffff967a6818"></script>

So again, in an ascx file, is there a way to force the loading of the CSS and javascript that Telerik controls will need?  Either from within the resource files, or any other way?  Of course I don't want to have to extract the css and javascript from the resource files and create my own files.  That would probably be hard to maintain when upgrading the Telerik components...

Thanks Much,
Brent
Brent Hetland
Top achievements
Rank 1
 answered on 29 Aug 2013
1 answer
110 views
Hi,

I have RadListView and i would like to know how can i move a selected item in the listview up or down .

There is a method to perform this function ?
Maria Ilieva
Telerik team
 answered on 29 Aug 2013
1 answer
145 views
Hi,


I am using the Telerik.Web.UI.dll and Telerik.Web.UI.Skins.dll with version number : 2012.3.1308.35 in my currently running application  but now we are updating the dll version to  2013.2.717.40 so I am getting an error at run time in RadGridView Control :

Error : I am getting the data-type conversion issue

Here is my code :
              <telerik:RadGrid OnNeedDataSource="rgrd_NeedDataSource" AlternatingItemStyle-HorizontalAlign="Left"
                            ItemStyle-HorizontalAlign="Left" runat="server" ID="rgrd" OnPreRender="rgrd_OnPreRender"
                            OnItemCommand="rgrd_ItemCommand" AllowPaging="True" Skin="WebBlue" Width="99%"
                            AutoGenerateColumns="false" GridLines="None" AllowSorting="True" PageSize="10"
                            OnItemDataBound="rgrd_OnItemDataBound">
                            <MasterTableView DataKeyNames="UserId" AutoGenerateColumns="False" Width="100%">
                                <NoRecordsTemplate>
                                    No Records
                                </NoRecordsTemplate>
                                <Columns>
                                    <telerik:GridBoundColumn Visible="false" UniqueName="IsEnable" DataField="IsEnable" />
                                    <telerik:GridBoundColumn  UniqueName="Name" DataField="UserName" />
                                </Columns>
                            </MasterTableView>
                            <HeaderStyle HorizontalAlign="Left" />
                        </telerik:RadGrid>
 protected void rgrd_OnPreRender(object source, EventArgs eventArgs)
        {
            var list= (List<User>) rgrd.DataSource;
            if (list=  != null && list= .Count > 0)
            {
                for (int index = 0; index < rgrd.Items.Count; index++)
                {
                    GridDataItem item = rgrd.Items[index];
                    if (item != null)
                    {
                        Boolean isEnable = Convert.ToBoolean(item["IsEnable"].Text); // Getting Error in this code
                    }
                }
            }
      }


"Boolean isEnable = Convert.ToBoolean(item["IsEnable"].Text);"
With old dll version I am getting here item["IsEnable"].Text ="True"
but with newer version of dll I am getting here item["IsEnable"].Text="&nbsp;"
so I do not understand What can I do in this case ?
Please Help.

Thanks,
Aditya

Princy
Top achievements
Rank 2
 answered on 29 Aug 2013
3 answers
158 views
Hello,


I am trying to set up a sample project binding the RadScheduler to a RadODataDataSource, but the RadScheduler is not getting any data from the oData service.

In VS2012 the RadScheduler "design time tool" is only able to Choose ODataSource and DataModelID into the Drop down boxes, from the RadODataDataSource. The remaining drop down boxes, like: DataKeyField, DataStartField, DataEndfield....etc. is not filled. Even if I hand code these values to connect to the RadODataSource, the Scheduler is not returning any data.

I have tested both Telerik.Web.UI 2013.2.717.40 and 2013.2.820.40.

To ensure that I am not totally misunderstood I also inserted a RadListBox using the same RadODataDataSource in the same .ascx contol, and this is working flawlessly both in design and run time returning "parts of the data" that the RadScheduler "were supposed to display".
(This trial module is cross domain and running in a DotNetNuke module)

1. Am I overlooking anything, or is the latest versions of RadScheduler not working with the RadODataDataSource ?

2. When using oData as feed for RadScheduler what limitations does the  readonly="True" pose for functionality ?

SwanB
Plamen
Telerik team
 answered on 29 Aug 2013
1 answer
133 views
Hi,
I am trying to create a new website using Telerik but I get the warning in subject.
See attached picture.
Why new web site is not supported?
Do I have to install additional/different components?
Dyanko
Telerik team
 answered on 29 Aug 2013
3 answers
144 views
Hi guys

I was trying to manually upload files and thought that IE uses the SL module for uploading files. I have read the same thing and when I checked I found that the IFrame is being used and I didnt add any js code to disable the silverlight. I was trying the exact manual upload sample in the demo.

Thanks
Shahi.
Shinu
Top achievements
Rank 2
 answered on 29 Aug 2013
2 answers
181 views
Hello Team,


        I have a paid dll of telerik controls so i have to ask that may i use this dll in my more than 1 projects or not and if not than what is the alternate?

Thanks & Regrads
Sunny
Sunny
Top achievements
Rank 1
 answered on 29 Aug 2013
3 answers
873 views
Hi,
We are using RadGrid with ASP.NET. My grid has templated column with textbox. When the page loads, I am populating Templated column Textbox with the amount that comes from database. Not all rows will have amount. For example, if my grid has 10 rows, only 3 rows may have amount. So, when the page load on client side I have routine that checks for amount in textbox. If it is empty, then hides the row like this:
function GridCreated(sender, eventArgs) {
  //loop thru grid rows and hide the row
  var inputElem = MasterTable.get_dataItems()[i].findElement("txtBoxAmount");
   if (inputElem.value > 0)
      MasterTable.get_dataItems()[i].set_visible(true);
   else
      MasterTable.get_dataItems()[i].set_visible(false);
}
  
  
This code is working fine and hiding row. After all work is done, when the user clicks on 'Submit' button,
Then in my routine on server side, I need to check for visibility property and then get the amounts like this:
foreach (GridDataItem row in rgdAccounts.Items)
            {
                if (row.Visible)
                {//Account is part of the selected template (row is visible).
                    string value = ((TextBox)row.FindControl("txtBoxAmount")).Text;
                     if (value == "")
                        value = "0.00";
                    if (value != "0.00")
                        //Get the amount
           }
 }
  
This check for visibility is alwasy true, even though rows are hidden. So, from this what I understand is that
if rows are hidden on clientside using client side logic, when page gets posted, that won't be taken into
considertation on server side. 
I am not using 'NEED Datasource' event for binding, because for our
architecture, it will not suite to use it. So, I am binding the grid when ever is required. 
Please let me know how to take care of this situation.
  
Thanks,
Prathiba.
Princy
Top achievements
Rank 2
 answered on 29 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?