Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
143 views
Hi

I have a javascript function that validates client input as they're typing.  If the user types an invalid character, the function (decOnlyKey below) returns false.

function RadComboBoxKeyPressing(combo, eventArgs) {
    var key = eventArgs.get_domEvent().keyCode;
    var allow = decOnlyKey(key, combo.get_text());
 
//    if (!allow)
//        eventArgs.set_cancel(true);
}

It appears this eventArgs object does not have a set_cancel method (hence commented out above).

How can I get the RadComboBox to reject the key press?

Thanks
Clinton Smyth
Top achievements
Rank 1
 answered on 24 Aug 2010
2 answers
158 views
Hi,

This is probably a simple fix but, I have java script that is called by the onselectedchanged() event for a combobox. I want to get the value of the new selected item. However, the value I get is the old value that was selected. Here is my code.

<tr id="trForwardEmail" runat="server">
            <td>
                Forward Email To:
            </td>
            <td width="10">
            </td>
            <td>
                <telerik:RadComboBox ID="cmboForwardEmail" runat="server" width="200" OnClientSelectedIndexChanging="ShowCheckbox"/>
            </td>
        </tr>
function ShowCheckbox(sender, eventArgs)
 {
     
    var checkbox = document.getElementById("<%= trSaveEmail.ClientID %>");
    var cmboBox = $find("<%= cmboForwardEmail.ClientID %>");
    alert(cmboBox.get_text());
   if(cmboBox.get_selectedItem().get_text() != "No Forwarder")
   {
        checkbox.style.visibility = "hidden"; 
   }
   else
   {
        checkbox.style.visibility = "visible";
   }
}

Any help?

Thanks,
Trevor
Trevor
Top achievements
Rank 1
 answered on 24 Aug 2010
1 answer
97 views
Hello,

I am looking for an example how to override the loading image that gets displayed when the window is opening up.   The Vista skin is being applied and I am using the asp:ScriptManager.  Also, if I wanted to hide the loading image altogether how can I achieve this?

Thanks,
Feizal
Cori
Top achievements
Rank 2
 answered on 24 Aug 2010
7 answers
116 views
I am using Radgrid without using the skin
I dont know how to align the pager

<telerik:RadScriptManager ID="RadScriptManager" runat="server"> </telerik:RadScriptManager>
                         <telerik:RadGrid id="RadGrid1" ShowStatusBar="false" Skin="" HeaderStyle-CssClass="RGHeader" CssClass="RadGrid" ItemStyle-CssClass="RGItem" AlternatingItemStyle-CssClass="RGAltItem"  ShowFooter="true"  runat="server" AllowPaging="True"
                                AllowSorting="True" AllowMultiRowSelection="True"  AutoGenerateColumns="false" width="375px" Height="575px">
                            <ClientSettings  
                            EnableRowHoverStyle="false"
                            Resizing-AllowColumnResize="true"
                            Resizing-EnableRealTimeResize="true"
                            Scrolling-AllowScroll="true"
                            Scrolling-UseStaticHeaders="true">
                            <ClientEvents  />                               
                            </ClientSettings>
                            <MasterTableView>
                            <PagerStyle Mode="NumericPages" CssClass="RadGridPager"></PagerStyle>
                            <Columns>
                              <telerik:GridTemplateColumn HeaderText="ID" DataField="A_ID" SortExpression="A_ID" Resizable="false">
                                                    <HeaderStyle Width="50px" />
                                                    <ItemTemplate>                                   
                                                        <a href="Audit_Edit.asp?AU=<%#DataBinder.Eval(Container.DataItem, "A_ID")%>"><%#DataBinder.Eval(Container.DataItem, "A_ID")%></a>
                                                    </ItemTemplate>
                                                    
                                                </telerik:GridTemplateColumn>

                            <telerik:GridBoundColumn UniqueName="Added" HeaderText="Title"  DataField="TITLE" Resizable="false">
                            <HeaderStyle Width="300px" />
                             <ItemStyle CssClass="f2" />
                            </telerik:GridBoundColumn>
                            
                            </Columns>
                            </MasterTableView>     
                        </telerik:RadGrid> 
santhosh
Top achievements
Rank 1
 answered on 24 Aug 2010
3 answers
92 views
I have bunch of RadControls on my page and then each control calls the seperate JS file that it require for its functionality. So, having number of them on page calls many .js files
Do we have a way to reduce the number of .js calls so that they can be collaborate into 1 js call ......thats it !

Thanks !
Sabby
Top achievements
Rank 1
 answered on 24 Aug 2010
2 answers
127 views
There seems to be a problem with the RadDatePicker in multiple versions of Internet Explorer. Now I know that styling issues in IE abound, but this borders on buggy.

Procedure:
  1. Load a page containing a RadDatePicker (connected to a RadTextBox) in IE.
  2. Select the current date (the popup stays open). Select it again to make the box close.
  3. Click the Calendar icon again (DO NOT move the cursor) note that the selected date is still selected and is also highlighted.
  4. Now move your cursor without hovering over the selected date and select any other date in the same month.
  5. Repeat this process over and over and you will see that IE does not reset the highlighted dates even though the selected date changes.

Now follow this exact same procedure in Firefox. It won't take long to see that this is an IE thing.

So, how do I fix it?

Anyone else notice this?
johnv
Top achievements
Rank 2
 answered on 24 Aug 2010
2 answers
161 views
hi,

I am using RadEditor with default toolset. The issue is, by default value of RadEditor content is EmptyString. I need to validate if user made an entry.

If I enter some data which has a line break, I am unable to remove the data completely. There is always a line break remaining (below HTML).

<p>&nbsp;</p>

I do not see this happening in demo editor, but this is something happening in all screens we are using RadEditor.

This issue is only happening in IE. It's working fine in Mozilla. As attached, I am unable to get rid of that additional line break once I delete the text.
spt3210
Top achievements
Rank 1
 answered on 24 Aug 2010
4 answers
173 views
I hope that this will be an easy problem to solve! I have the following ComboBox in my page:

<telerik:RadComboBox ID="rcbLocation" runat="server" AllowCustomText="True" DataSourceID="sdsLocation" DataTextField="Location_Name" DataValueField="Location_ID" MarkFirstMatch="True">
</telerik:RadComboBox>

And in Page_Load() I attempt to set the value as follows (the DataBind is just there to make sure!):

rcbLocation.DataBind();
rcbLocation.SelectedValue = ReturnedData["Master_Location"].ToString();

However, even though the SelectedValue on the ComboBox is set, the Text is blank and the SelectedIndex appears to have a value of "-1".

Am I doing something incredibly stupid here, or am I required to perform some kind of work-around (as opposed to how I may handle a DropDownList, for example)? Having read other threads, I have also tried setting the SelectedIndex using the FindItemIndexByValue functionality, but this doesn't seem to work either.

Any help would be appreciated. Thanks,
Jason Thacker
Top achievements
Rank 1
 answered on 24 Aug 2010
4 answers
209 views
Hello,

I would like some direction or code samples in how to set file attributes during file uploads using FileExplorer. I was able to display the file Created Date and Owner Name attributes in the grid using the examples on this site, however, my requirement is to display the name of the user who uploaded the file (the Owner Name is always BUILTIN/Administrators).

Regards,
Leo
Aaron C
Top achievements
Rank 1
 answered on 24 Aug 2010
1 answer
386 views
Hi,

I have a RadGrid control which I want to bind to a linq data source which uses a stored procedure.
The data bind should happen in the code behind and not on the aspx page cause I use my own filter to search on grid results.
I would appreciate a code sample.

Thanks,
Aviram 
Rosen
Telerik team
 answered on 24 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?