Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
120 views
Hi there.
Unsure if I'm missing something here.

I have a RadDatePicker on my form.
The user enters a date (e.g. 6th June 2009)

When I attempt to get the date from this combox box in Javascript, (using get_selectedDate()) I'm returned a DateTime of... 5th June 2009 11:00pm

Given we'e in Daylight Savings at the moment, I can see what's happening: It's applying the local TimezoneOffset to the date in the control to convert to GMT (if i do get_selectedDate().getTimezoneOffset() I get -60)

So why is this happening, and what can I do to stop it?

If a user chooses 6th June 2009 in the date picker, then I expect to get 6th June 2009 when i get the selected date in Javascript!

ASPX code for control is here:

<telerik:RadDatePicker
            ID="txtDate"
            runat="server"
            TabIndex="2"
            AccessKey="t"
            Width="220px"
            MaxLength="10"
            ToolTip="Enter a Date"
            Skin="Default"
            ClientEvents-OnDateSelected="txtDate_OnDateSelected" />

Thanks!

Daniel.
Martin
Telerik team
 answered on 27 Jul 2009
2 answers
739 views
Hi,

I thought AppendDataBoundItems does add items from databinding to the existing "markup items".
So a grid defined like this:
<telerik:RadComboBox Width="200px" ID="cbJugendlicherZiel" runat="server" DataSourceID="ldsJugendlicheZiel" SelecetedValue="-1" AppendDataBoundItems="true" DataTextField="Kennung" DataValueField="JugendlicherID" AutoPostBack="true">  
            <Items> 
                <telerik:RadComboBoxItem Text="auswählen..." Value="-1" /> 
            </Items> 
    </telerik:RadComboBox> 
offers the "auswählen..." item plus the items from databinding.

This seems to be incorrect - instead AppendDataBoundItems adds new databound items to the existing ones - no matter where the come from.
In other words - if I "autobind" (datasource filtered via Control Parameter) every binding adds it's items to the one in the combobox.
Example: I have a radiobutton array - when I select something there it works as parameter for the datasource of the combobox.
At startup the combo has only the value "select something...". Than I check one of the radiobuttons - and the datasource give "One, Two, Three" - wich results in the following Combobox items:
"select something..."
One
Two
Three
--So far it works as I expected.
Now I check a different radiobutton - my datasource gives "Four, Five" for this selection:
The combo now has:
"select something..."
One
Two
Three
Four
Five

Instead of
"select something..."
Four
Five
--As I would expect.

Is this like it should be?
If so I have to rethink the use of AppenDataboundItems - and go back to datasources with a "dummy record".

Regards

Manfred
ManniAT
Top achievements
Rank 2
 answered on 27 Jul 2009
3 answers
239 views
Hi,

I am binding radtreeview to a sitemap file. Is it possible to hide specific nodes at runtime - how should I go about this?
Atanas Korchev
Telerik team
 answered on 27 Jul 2009
1 answer
73 views

I would like to know which method (WebService or WCF) is recommended to use with the RadComboBox with LoadOnDemand and why ?

Atanas Korchev
Telerik team
 answered on 27 Jul 2009
1 answer
343 views
One of the vulnerabilities I noticed recently with the RAD Editor is the ability to inject javascript on the page. Allowing users into the "HTML" view of the page is a little dangerous. Luckily it's not on this page, or all users would be going to my site :). What is the best way to deal with this problem? Not enable HTML view for users?

Thanks,
Sam

Rumen
Telerik team
 answered on 27 Jul 2009
1 answer
121 views
Good Morning,
I have a FileExplorer displaying documents associated with a selected piece of equipment. In Page Load, the InitialPath assignment displays the documents in the root folder. However, when a piece of equipment is selected via a TreeView, no documents are displayed in the FileExplorer. Below in the code dynamically defining the path used for InitialPath:

 

Dim path As String

 

 

If upsRadTreeView.SelectedValue = Nothing Then

 

path = Page.ResolveUrl(

"~/CustomerData/" & Profile.CustomerNumber.ToString)

 

 

Else

 

path = Page.ResolveUrl(

"~/CustomerData/" & Profile.CustomerNumber.ToString & "/UPSData/" & upsRadTreeView.SelectedNode.Value.ToString)

 

 

End If

 

 

Dim paths As String() = {path}

 

documentsRadFileExplorer.InitialPath = path

documentsRadFileExplorer.Configuration.UploadPaths = paths

documentsRadFileExplorer.Configuration.ViewPaths = paths

*.aspx code:

 

<

 

telerik:RadFileExplorer ID="documentsRadFileExplorer" runat="server" Height="200px" Width="480px" VisibleControls="Grid"

 

 

EnableCreateNewFolder="False" DisplayUpFolderItem="false" Skin="Black"></telerik:RadFileExplorer>

 

 

 

Please advise.

Thanks,
Erik

Fiko
Telerik team
 answered on 27 Jul 2009
2 answers
145 views
    <script type="text/javascript"> 
        function showCreateMenu(e) { 
            var contextMenu = $find("<%= CreateMenuOptions.ClientID %>"); 
 
            if ((!e.relatedTarget) || (!$telerik.isDescendantOrSelf(contextMenu.get_element(), e.relatedTarget))) { 
                contextMenu.show(e); 
            } 
 
            $telerik.cancelRawEvent(e); 
        } 
         
        function OnClientShowingHandler(sender, args) { 
            var element = sender.get_contextMenuElement(); 
            var handler = function(e) { 
                var relatedTarget = e.rawEvent.relatedTarget || e.rawEvent.toElement; 
                if (!$telerik.isDescendantOrSelf(element, relatedTarget)) { 
                    sender.hide(); 
                    $removeHandler(element, "mouseout", handler); 
                    return; 
                } 
            }; 
 
            $addHandler(element, "mouseout", handler); 
        } 
    </script> 

    <telerik:RadContextMenu ID="CreateMenuOptions" runat="server" OnClientShowing="OnClientShowingHandler" ExpandDelay="500"> 
        <Items> 
            <telerik:RadMenuItem Text="Create Sales Order" Value="mnuCreateSO" /> 
            <telerik:RadMenuItem Text="Create Quote" Value="mnuCreateQuote" /> 
        </Items> 
        <Targets> 
            <telerik:ContextMenuControlTarget ControlID="CreateMenuOptions" /> 
        </Targets> 
    </telerik:RadContextMenu>    
     
    <asp:ImageButton ID="btnCreate" runat="server" CommandName="Create" onmouseover="showCreateMenu(event);" ImageUrl="~/images/toolbar_icon.png"></asp:ImageButton> 

I have an ImageButton mouseover event which calls a JS function to show a RadContextMenu. This function works properly. However, the ExpandDelay setting of the RadContextMenu is not being used. When I mouseover the ImageButton the menu is displayed immediately. What can I do about this? I am using the 2009.1.402.35 controls.

Brian Gabel
Top achievements
Rank 1
 answered on 27 Jul 2009
12 answers
153 views
I recently upgraded from the Q3 2008 version to the Q2 2009 version and noticed that my modal popup no longer work. There is no graying of the background, and everything behind the window is clickable. What changed?
Svetlina Anati
Telerik team
 answered on 27 Jul 2009
2 answers
77 views
Is it possible to attach a radtooltip to a radmenuitem?

Thanks,
Larry
Larry
Top achievements
Rank 1
 answered on 27 Jul 2009
1 answer
254 views

var

 

oWnd = radopen("Dialog1.aspx", "RadWindow1");

oWnd.remove_close(ClosingFn);
...
...

But I want to Clare clear_close   
Exp
    oWnd.clear_close();    Or   oWnd.remove_close(ALL);

 

Fiko
Telerik team
 answered on 27 Jul 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?