Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
130 views
Hello

I'm writing some javascript that will allow our users to navigate through the fields of a webpage using their keyboard and either the enter or down arrows in addition to the default tab keystroke. This is working great however there are some quirks when it comes to the combobox, as hitting down it should select the next item and not jump out.  Instead it is doing both and even after switching fields it leaves the combobox open.  Much like I did for the radiogroup I wanted to make it so down would cycle through each option until the last when it would break out of the combobox and onto the next control.  I have been unable to do this as the javascript type is always returned as text, I assume this is because behind the scenes the rad combobox is actually a set of stacked text fields. That's all fine and dandy however I need a way to distinguish this control from other control types.

Here's some sample code:

    document.onkeydown = function (e) {
        e = e || window.event;
        if (typeof e != 'undefined') {
            var tgt = e.target || e.srcElement;

            // If the keypress was ENTER (13) or DOWN (40)
            if (e.keyCode == 13 || e.keyCode == 40) {
                // Determine which element we're currently on
                currentField = e.target;
                 alert(currentField.type);
            }
      }
   }

I stripped out most of the logic here, all it's doing is listening for a keypress and if it's enter or down it will show the control type.  As already said I'm getting "text" for a combobox which leave same with no way to identify it (without knowing the name ahead of time,which isn't an option here). 

So my questions is: is there a way to get the type of the combobox control through JavaScript? Or is this a bug in the telerik controls that needs to be fixed?

Thanks in advance :)
Ivana
Telerik team
 answered on 25 Jan 2012
1 answer
84 views
Hi There,I would like to use read only RadScheduler to display data from Oracle DB which i am going to consume through WCF service in sharepoint 2007 but i have lots off other fields besides startDate,End Date and Subject so how i can bind all those fields to Appointment object.

Please advise
Thanks
Ronak
Kalina
Telerik team
 answered on 25 Jan 2012
6 answers
179 views
Hello,

I've a RadPanelBar on a dynamiclly loaded UserControl. In that UserControl I've placed a RadScriptBlock where my javascript functions are defined. I'm trying to execute the get_element() and/or get_items() functions but I always get the error that the function is not supported.
var $ = $telerik.$;
 
var categoryPanelBar = $(this).find("<%=RadPanelBar1.ClientID%>");
 
alert(categoryPanelBar.get_items());

With this code the PanelBar object can be found only the function get_items() will not be excuted because it tells me that this function is not support for the element.

Can someone help me with this?

Regards,
  Jos Meerkerk,
Ivana
Telerik team
 answered on 25 Jan 2012
1 answer
170 views
I have a RadWindow configured to be opened via a "username" hyperlink on my master page - this RadWindow is setup to allow impersonation of other users for the purpose of troublshooting issues.  The first RadComboBox is populated server side while the second combo box is dynamically populated but is tied to the selected value from the first RadComboBox.  For some reason when I change the selected value in the first RadComboBox that value is not being transferred back to the server but dynamic data I type into the second RadComboBox which has EnableLoadOnDemand set to true does - since both controls are on the RadWindow I can see no reason why the updated selected value (altered from when combo was first loaded) is not - below you will find the markup for the RadWindow and the server side event for the second RadComboBox that is using the selected value from the first - any thoughts/help would be much appreciated as I am pulling my hair out - please note that I've stepped through the code and the code that loads the first combo box is not being called on postback (which would reset the combobox) so I don't think that is the issue.

<telerik:RadWindow ID="ImpersonationWindow" runat="server" Height="200px" Width="500px" IconUrl="/Content/Images/user16.png"
					Animation="Fade" Modal="true" Title="User Impersonation" Behaviors="Close" KeepInScreenBounds="true" 
					ReloadOnShow="false" DestroyOnClose="false">
					<ContentTemplate>
						<div class="row">
							<span class="label" style="width30%;">
								<span class="small-red-bold-label">Business Unit:</span>
							</span>
							<span class="field" style="width65%;">
								<telerik:RadComboBox ID="ImpersonatedBusinessUnitRadComboBox" runat="server" Width="275px" CausesValidation="false"
									DataTextField="FormalName" DataValueField="CentralBusinessUnitNo">
								</telerik:RadComboBox>
							</span>
						</div>
						<div class="row">
							<span class="label" style="width30%;">
								<span class="small-red-bold-label">Employee:</span>
							</span>
							<span class="field" style="width65%;">
								<telerik:RadComboBox ID="ImpersonatedEmployeeRadComboBox" runat="server" Width="275px" Height="200px" CausesValidation="false"
									DataValueField="EmpID" DataTextField="FullName" 
									ShowDropDownOnTextboxClick="false" EnableLoadOnDemand="true" MarkFirstMatch="false" ItemRequestTimeout="500"
									EmptyMessage="Type Employee Name..." MinFilterLength="2" OnItemsRequested="ImpersonatedEmployeeRadComboBox_ItemsRequested">
								</telerik:RadComboBox>
							</span>
						</div>
						<div class="row"><span class="label"></span><span class="field"></span></div>
						<div class="row">
							<span class="label" style="width48%;">
								<asp:Button ID="ImpersonateButton" runat="server" Text="Impersonate" Width="100px" OnClick="ImpersonateButton_Click" />
							</span>
							<span class="field" style="width48%;">
								<asp:Button ID="ResetButton" runat="server" Text="Reset" Width="100px" OnClick="ResetButton_Click" />
							</span>
						</div>
					</ContentTemplate>
				</telerik:RadWindow>


protected void ImpersonatedEmployeeRadComboBox_ItemsRequested(object sender,RadComboBoxItemsRequestedEventArgs e)
        {
            if(!string.IsNullOrEmpty(e.Text))
            {
                if(e.Text.Length >= 2)
                {
                    List<FindEmployeeView> employees = new List<FindEmployeeView>();
                    // get data from data context
                    using(CommonDataContext context = new CommonDataContext(ConfigurationManager.ConnectionStrings["CEO"].ConnectionString))
                    {
                        employees = 
                            context.FindEmployeesByFullName(
                                0,
                                e.Text,
                                AnyOrganizationFilter,
                                "|" + ImpersonatedBusinessUnitRadComboBox.SelectedValue + "|",
                                AnyOrganizationFilter,
                                1).ToList();
                    }
                    // databind
                    ImpersonatedEmployeeRadComboBox.DataSource = employees;
                    ImpersonatedEmployeeRadComboBox.DataBind();
                }
            }
        }
Michael
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 25 Jan 2012
0 answers
127 views
Edit: Ignore me...It wasn't mention in the documentation, but I was missing the true parameter in the  eventArgs.set_cancel function, thus the error.
Colin
Top achievements
Rank 1
 asked on 25 Jan 2012
1 answer
109 views
Currently I am trying to format and style a chart legend according to the design given to me by the design team on the project.

*see attached image ChartDesign.PNG*

However I am sofar unable to even put the chart Legend in the correct position, let alone divide the markers.

The code below would logically do the trick to position the block to bottom left but it stays at bottom CENTER.
chart.Legend.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.BottomLeft;

*edit*
I just found out by trial and error that the line
chart.AutoLayout = true;
Prevents the legend from being aligned to the left.. I still find this quite strange and would expect other behaviour.
*/edit*

Can anyone give me some tips or hints on how to move the legend to bottom left and divide the items so that it won't be just a long vertical list?

Cheers,

Maarten
Maarten Bos
Top achievements
Rank 1
 answered on 25 Jan 2012
6 answers
610 views
If I dynamically add three items to a RadDockLayout, I get an error message: "Invalid JSON primitive: ." Any inter-action with the RadDock controlss after that causes the same error message to be displayed.

Any ideas?


Randy
Slav
Telerik team
 answered on 25 Jan 2012
1 answer
52 views

Hi, I have a dynamic user control in aspx page.

The problem is than the skin is not load correctly in IE.

The skin of the radbutton is lost and this is conflicted with radcombobox.

Any idea?

Teo
Top achievements
Rank 1
 answered on 25 Jan 2012
3 answers
80 views

I have server RadSocialButtons on my RadSocial Share Control.  The dialog sizes are working for all of the buttons except for the SendEmail button.
Here's the mark-up.

<telerik:RadSocialShare runat="server" ID="RadSocialShare1" UrlToShare="http://www.jennalogan.com"
                        TitleToShare="JennaLogan.com, the Internet's premiere fine jewelry lender."
                        DialogHeight="550px" DialogWidth="950px"
                        onprerender="RadSocialShare1_PreRender">
                        <MainButtons>
<telerik:RadSocialButton SocialNetType="ShareOnFacebook" ToolTip="Share on Facebook" DialogHeight="550px" DialogWidth="990px" />
<telerik:RadSocialButton SocialNetType="ShareOnTwitter" DialogHeight="480px" DialogWidth="640px" ToolTip="Tweet about this." />
<telerik:RadSocialButton SocialNetType="Blogger" DialogHeight="660px" DialogWidth="950px" ToolTip="Blog about this." />
 <telerik:RadSocialButton SocialNetType="SendEmail" DialogHeight="550px"  DialogWidth="1000px" ToolTip="Email this to a friend" />
</MainButtons>
</telerik:RadSocialShare>

 

Am I missing something?
Thx,
Lee


Marin Bratanov
Telerik team
 answered on 25 Jan 2012
18 answers
158 views
Hi

I realise there has been a lot of forum traffic on this in the last year or so, with earlier
version of the controls and of IE, but I haven't seen an apropriate solution...

I am using Q2 2009 production release and my problem is with IE8;  it seems to require
at least three quick clicks on the select button to get the dialog box box to open. 

Firefox and Safari browsers are OK. I have not tested Opera.

It is the same behavior on my local machine (windows Vista, IIS7) and on the remote server
(Windows Server 2003, IIS 6)

As noticed by other contributors, if I set EnableFileInputSkinning = false, it works OK in IE 8,
but the button of course then does not match the rest, so that is not really a solution.

What do you suggest?

Thanks

Clive

P.S  I get the same (in)action when I try to browse for an avatar in my Telerik account on this site
IE 8 version is 8.06.001

Guy
Top achievements
Rank 1
 answered on 25 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?