Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
343 views
Hi

I am simply trying to set a textbox to readonly on a client side button click.

I have seen examples that mention getting the _textBoxElement, but that doesn't work.
Or I should say attempting to use that mechanism says _textBoxElement isn't supported
on the client side object I have.

Here is my script:

var

 

 

tbConnectionName = document.getElementById( "ConnectionNameTextBox" );

 

 

 

var cbInitiate = document.getElementById( "InitiateConnectionCheckBox" );

 

 

 

var tb = $telerik.toTextBox( tbConnectionName );

 

 

 

//tb._textBoxElement.readOnly = true;

 

 

 


var
e = tb.get_element;

 

 

tbConnectionName.readonly =

 

true;

 

cbInitiate.disabled = bDisabled;

Disabling the cbInitiate object works fine, but none of my attempts to set readonly
on the tbConnectionName object have been successful.

BTW here is the corresponding HTML:

 

 

 

<div style="width:85%; float:right;">

 

 

 

 

<telerik:RadTextBox

 

 

 

ID="ConnectionNameTextBox"

 

 

 

ClientIDMode="Static"

 

 

 

MaxLength="80"

 

 

 

runat="server"

 

 

 

Width="300px" TabIndex="4" />

 

 

 

</div>

 

 

 

<div style="width:85%; float:right;">

 

 

 

 

<asp:CheckBox ID="InitiateConnectionCheckBox" runat="server"

 

 

 

AutoPostBack="True"

 

 

 

AccessKey="I"

 

 

 

ClientIDMode="Static"

 

 

 

OnCheckedChanged="InitiateConnectionCheckBoxClicked"

 

 

 

TabIndex="5" Text="Initiate a connection if not already connected" />

 

 

 

</div>

 


Right now I am considering maing an Ajax request in my onclick event and setting
the property in server side code. We can set ReadOnly quite successfully all over the place in server side code. Doing this seems excessive though.

Any help greatly appreaciated.

Vasil
Telerik team
 answered on 09 Mar 2012
7 answers
959 views
This might be an easy question but i can not find the answer.  If you have a radgrid with a filter on a numeric value it shows that value in the filter box with a comma if it is over 999 (NOT in the data itself).  I.E.  you want to filter on OrderID and that is numeric.  If you try to filter on OrderID and the value you are looking for is 12345 in the filter box it shows it as 12,345.  is there a way that the filter box will not show comma's? 
Naresh
Top achievements
Rank 1
 answered on 09 Mar 2012
1 answer
336 views
Hi,

is there a way to fit my grid width to the parent DIV without using JS? I tried with Width="100%", but it overflow like 2-3 pixels out.

If not, how can I achieve this with JS?

Thanks.
Shinu
Top achievements
Rank 2
 answered on 09 Mar 2012
2 answers
143 views
I have a raddatepicker on a page and if I use a radwindowmanager the date picker popup will not display when I include clientside events in the radwindowsmanager - only relates to FIREFOX newest download.. Works perfectly in Chrome and IE (newest versions)
If I remove the client side events from the window manager everything works pefectly....

         OnClientClose="OnClientclose"

This behavior only occurs in the latest version of Firefox...

Any ideas on how to solve this issue?
So if I don't use the radwindow manager events and instead use a bit of inline javascript on the button in the modal window that does a redirect everything works ->   What is the deal here..grrrr   I WOULD RATHER use the radwindowmanager clientside API...

<asp:ImageButton ID="imbBTN1" runat="server" AlternateText="Close"
           OnClientClick="javascript:top.document.location.href='./closing.aspx';return false;" ImageUrl="~/Images/Approve.gif" />

My raddatepicker code

<telerik:RadDatePicker ID="radDatePickerStartDate1" runat="server" Culture="en-US"
                  EnableTyping="False" Enabled="False" ZIndex="1000" Skin="Outlook">
                  <Calendar ID="Calendar1" runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False"
                      ViewSelectorText="x" Skin="Outlook">
                  </Calendar>
                  <DateInput ID="DateInput1" runat="server" DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy"
                      ReadOnly="True">
                  </DateInput>
                  <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
              </telerik:RadDatePicker>


<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Modal="True"  Title="Archive Progress..." ShowContentDuringLoad="False" ReloadOnShow="True"
        VisibleStatusbar="False" EnableViewState="False"  
        OnClientClose="OnClientclose">
        <Windows>
            <telerik:RadWindow ID="RadWindow1" runat="server" Height="600px" Modal="True" VisibleOnPageLoad="false"
                ReloadOnShow="True" ShowContentDuringLoad="False" Style="display: none;" Title="Archive Progress..."
                VisibleStatusbar="False" Width="800px" KeepInScreenBounds="True" EnableViewState="false"
                Behavior="Move" Behaviors="Move" Skin="Outlook">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>


My javascript
<script type="text/jscript" language="javascript">
       /**********************************************************
       Window Events
       **********************************************************/
      
 
       function OnClientclose(sender, eventArgs) {
          window.location = "./closing.aspx";
 
       }
 
    
   </script>
Vasil
Telerik team
 answered on 09 Mar 2012
3 answers
58 views

I have an ajaxified textbox in an ajaxified RadGrid.

When I update text in the textbox and click on the save icon in an editable row the server side code gets executed correctly but the ui is not updated (repainted). The row is still in edit mode and there is no save message.

NOTE:  The textbox’s and the save buttons ajax postback occurs at the same time. This is because the textbox has not lost focus until the save button has been clicked. This is where the issue is. If the textbox text is changed and the focus is moved to a second control then the save button is clicked everything works fine.

Note: The textbox is displayed in editable rows of the RadGrid. There is an ontextchange event handler on the textbox. Therefore when text has changed and focus is lost on the textbox an ajax postback occurs to the server.

Any assistance would be much appreciated .

Jayesh Goyani
Top achievements
Rank 2
 answered on 09 Mar 2012
1 answer
86 views
Hi,
I have a RadGrid with around 250 rows and 18 columns.
I did not apply any skin and set my skin property to "".
I did use some styles to render my rows.
I have a color assigned for the selection of the Row in Radgrid.
However when i select another row, it first shows a grey box before showing the Highlighted color.
This happens more frequently if there are some processes running on the machine.
Can you please let me know if there is a solution to avoid this from happening?
Thanks
Srinivas Dhulipala
Shinu
Top achievements
Rank 2
 answered on 09 Mar 2012
4 answers
90 views
Hi,

I want my radgrid to be in edit mode only when i clicks or enters the cell.I am not intented to put textbox or input columns inside the template..Is there any possible way to edit the bound column on click like editting in excel.

Help me
Thnx in advance
Remya
Top achievements
Rank 1
 answered on 09 Mar 2012
1 answer
153 views
Hello,

I have a simple updatepanel and a radnumeric texbox inside it... when the user changes the value and posts back, it is losing its value and displaying the old value.

please test and fix.

thanks.

sathish
Princy
Top achievements
Rank 2
 answered on 09 Mar 2012
2 answers
81 views
RadTimePicker1.TimeView.DataList.DataSource Not Working inside Radgrid template.  Heres my itemdatabound code:
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs)  
        If TypeOf e.Item Is GridEditFormItem AndAlso e.Item.IsInEditMode Then  
            Dim item As GridEditFormItem = DirectCast(e.Item, GridEditFormItem)  
            
            Dim tmeStart As RadTimePicker = DirectCast(item.FindControl("tmeStart"), RadTimePicker)  
             
 
        Dim arrayList As New ArrayList  
        Dim dte As DateTime = CDate(Now.ToShortDateString)  
        arrayList.Add(dte.AddHours(14))  
        arrayList.Add(dte.AddHours(14).AddMinutes(15))  
        arrayList.Add(dte.AddHours(14).AddMinutes(30))  
        arrayList.Add(dte.AddHours(14).AddMinutes(45))  
 
        arrayList.Add(dte.AddHours(15))  
        arrayList.Add(dte.AddHours(15).AddMinutes(15))  
        arrayList.Add(dte.AddHours(15).AddMinutes(30))  
        arrayList.Add(dte.AddHours(15).AddMinutes(45))  
 
        arrayList.Add(dte.AddHours(16))  
        arrayList.Add(dte.AddHours(16).AddMinutes(15))  
        arrayList.Add(dte.AddHours(16).AddMinutes(30))  
        arrayList.Add(dte.AddHours(16).AddMinutes(45))  
 
        arrayList.Add(dte.AddHours(17))  
        arrayList.Add(dte.AddHours(17).AddMinutes(15))  
        arrayList.Add(dte.AddHours(17).AddMinutes(30))  
        arrayList.Add(dte.AddHours(17).AddMinutes(45))  
 
 
            tmeStart.TimeView.DataList.DataSource = arrayList 
              
 
            
        End If  
    End Sub 
I can do change of time view when timepicker is not inside radgrid template. Is there a way to do this also when timepicker is inside radgrid and using template? Thanks in advance.
Chandrasekhar
Top achievements
Rank 1
 answered on 09 Mar 2012
1 answer
112 views
I'm looking at the online documentation for the scheduler and it looks like it is yet to be updated with the recent changes in the 2012 version that was released recently.

I'm trying to understand how the Time Zone stuff works with the scheduler.

If I am in EST zone, and I set the control to the EST Id, and I create a schedule that should start at 9am EST,
Should the recurrence rule contain the time 9am EST? 
Because the scheduler time zone and the chosen appointment time zone are the same, I would think the timestamps in the recurrence rule wouldn't need to change.

Is there any dependence on the server time that is hosting the scheduler web page?

Just wondering if someone could explain to me the thinking behind the time zone Ids in the scheduler control and the appointment objects and how they relate to one another.


Regards,
towpse
Top achievements
Rank 2
 answered on 08 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?