Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
107 views
Dear Telerik support team,

We use the RadDatePicker in our application and server-side I disable the popup button. Now I want to enable the button again when I start to edit the date client-side, but I can not find a way to do this.

I don't want to disable the whole datepicker, because it can not get any focus anymore after that.

Is it possible to do this client-side?

Erik Brink
Maria Ilieva
Telerik team
 answered on 13 Dec 2011
3 answers
176 views
I'm using a table to build a form and everytime a control is focused, I'm trying to change the background color of the table row to highlight the focus on that control. I'm doing that by changing the class of the row where the control is contained. I noticed that on the first page load all radcombobox controls get focused somehow but do not get unfocused so this makes that some rows are imediate highlighted even if the user didn't even go near those controls. When the control loses the focus it changes the row class back to the unselected state.

Is there anyway of this controls not getting focused on pageload?

I've tried to set focus on some other control (the button this case) to see if it would trigger the onblur of the radcombobox but didn't work.

My markup and javascript functions look like this

<script type="text/javascript">
        function findControl(tagName, controlId) {
            var aControls = document.getElementsByTagName(tagName);
            if (aControls == null)
                return null;
            for (var i = 0; i < aControls.length; i++) {
                var j = aControls[i].id.lastIndexOf(controlId);
                if ((j - 1) && (j == (aControls[i].id.length - controlId.length)))
                    return aControls[i];
            }
            return null;
        }
 
        function HighlightRow(focus, CStableElemID, CSControlID) {
            //alert("I'm Here")
            var input = findControl(CStableElemID, CSControlID)
            //alert(input)
            if (focus) input.className = "tableFormRowSelected";
            else input.className = "tableFormRowUnselected";
        }
</script>
<table id="tableform" runat="server">
                <tr id="fromAccountRow">
                    <td nowrap="nowrap">
                        <asp:Label ID="lblFromAccount" runat="server" Text="From Account: "></asp:Label>
                    </td>
                    <td>
                        <telerik:RadComboBox ID="fromAccount" Runat="server" AutoPostBack="True" CausesValidation="False" DropDownWidth="330px" Width="200px" EnableLoadOnDemand="true" EmptyMessage="Please Select" HighlightTemplatedItems="true" AllowCustomText="true" OnClientFocus="HighlightRow(true, 'tr', 'fromAccountRow')" OnClientBlur="HighlightRow(false, 'tr', 'fromAccountRow')">
                            <ItemTemplate>
                                <ul>
                                    <li class="fromAccountCol1">a</li>
                                    <li class="fromAccountCol2">b</li>
                                    <li class="fromAccountCol3">d</li>
                                </ul>
                            </ItemTemplate>
                        </telerik:RadComboBox>
                        <asp:RequiredFieldValidator
                            ID="RequiredFromAccountValidator"
                            runat="server"
                            ErrorMessage="!"
                            ControlToValidate="fromAccount">
                        </asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr id="fromAccountTextRow">
                    <td>
                        <asp:Label ID="lblFromAccountText" runat="server" Text="Text On Account Statement: "></asp:Label>
                    </td>
                    <td>
                        <telerik:RadTextBox ID="Description" runat="server" MaxLength="128" onBlur="HighlightRow(false, 'tr', 'fromAccountTextRow')" OnFocus="HighlightRow(true, 'tr', 'fromAccountTextRow')"></telerik:RadTextBox>
                        <asp:RequiredFieldValidator ID="FromDescriptionRequiredValidator" runat="server" ErrorMessage="!" ControlToValidate="Description"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr id="toAccountRow">
                    <td>
                        <asp:Label ID="lblToAccount" runat="server" Text="To Account: "></asp:Label>
                    </td>
                    <td>
                        <telerik:RadComboBox ID="toAccount" runat="server" CausesValidation="false" EmptyMessage="Please Select" DropDownWidth="330px" Width="200px" AllowCustomText="True" HighlightTemplatedItems="true" OnClientFocus="HighlightRow(true, 'tr', 'toAccountRow')" OnClientBlur="HighlightRow(false, 'tr', 'toAccountRow')">
                            <ItemTemplate>
                                <ul>
                                    <li class="toAccountCol1"><%# DataBinder.Eval(Container.DataItem, "Account")%></li>
                                    <li class="toAccountCol2"><%# DataBinder.Eval(Container.DataItem, "AccountNumber")%></li>
                                    <li class="toAccountCol3"><%# DataBinder.Eval(Container.DataItem, "Balance", "{0:c}")%></li>
                                </ul>
                            </ItemTemplate>
                        </telerik:RadComboBox>
                </td>
                </tr>
                <tr id="toAccountTextRow">
                    <td>
                        <asp:Label ID="lblToAccountText" runat="server" Text="Reference: "></asp:Label>
                    </td>
                    <td>
                        <telerik:RadTextBox ID="Reference" runat="server" MaxLength="128" onBlur="HighlightRow(false, 'tr', 'toAccountTextRow')" OnFocus="HighlightRow(true, 'tr', 'toAccountTextRow')"></telerik:RadTextBox><asp:RequiredFieldValidator ID="ToDescriptionRequiredValidator" runat="server" ErrorMessage="!" ControlToValidate="Reference"></asp:RequiredFieldValidator>
                    </td>
                </tr>
            </table>
            <telerik:RadButton ID="btnTransfer" runat="server" Text="Transfer"></telerik:RadButton>

Also find attached a screenshot of what the form looks like on the first page load. Note that the goal is to have no blue background rows on first page load as there isn't any control focused yet.

Thanks

Joao


Joao
Top achievements
Rank 1
 answered on 13 Dec 2011
3 answers
77 views
Helo all

 Am facing a problem , if i use page scroll tool tip fails to appear .. is this the default behavior ? if not how can i resolve this issue ?? 
thanks in advance

-Prince
Giuseppe
Telerik team
 answered on 13 Dec 2011
2 answers
239 views
Hi,

How to open window.showModalDialog with OnClientItemClicking event and hide context menu? (Context menu always presented and this is very bad!)

Thanks!
Kate
Telerik team
 answered on 13 Dec 2011
25 answers
1.4K+ views
I'm using a RadGrid with a PagerStyle of NextPrevNumericAndAdvanced with VirtualItemCount. Suppose there are 100 rows in the data source, and the default page size is 50 rows. If the user changes to the second page, and then changes the page size to 100 rows. Even after changing the page size, the page index stays on the second page, and no rows are displayed (the NoRecordsTemplate displays).

Can you change the grid to reset the page index to 0 any time the page size is changed?

Thanks,

David
Sebastian
Telerik team
 answered on 13 Dec 2011
3 answers
118 views
I've noticed that when you change a property on the RadTextBox in the designer that the control automatically adds the password strength related tags into my page. I like to use the source editor when creating my pages (I use the designer when I want to set the properties of mulitple controls in one shot), so I don't want to see all these extra tags if I'm not using them.

I was wondering if this feature could be turned off so these tags aren't added every time I make a change to the RadTextBox in the designer.
Vasil
Telerik team
 answered on 13 Dec 2011
6 answers
344 views
Anyone know what causes this error?  I've never seen this one before.

Here's the stack trace:
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Digit expected (at index 81)
   --- End of inner exception stack trace ---
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.a_cm_cl_cs_p_sv_selectionsummary_viewall_aspx.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

We are using version 2011.2.712.35 of the Telerk.Web.UI DLL.  Our web application is ASP.NET/VB.NET.

I did a google search on this error but was not able to find anything.

Thanks,
Marin
Telerik team
 answered on 13 Dec 2011
4 answers
175 views
Hi Team,
             I am facing one problem when i focused rad grid first row  keyboard navigation after grid has binded.Actually I have set the focus of radgrid first row after radgrid has been  binded.I called one client side events(GridCreated) in rad grid  for first row focus.I used following code for set the  row focus.


function RadGrid1Created(sender, args) {




       
        var grid = $find("<%=RadGrid1.ClientID %>");
        var MasterTable = grid.get_masterTableView();
        var data = sender.get_masterTableView().get_dataItems();


        if (data != '') {
            


            var gridview = $find('<%=RadGrid1.ClientID %>');            //                    
            gridview.get_masterTableView().get_dataItems()[0].get_element().cells[1].focus();
            sender.set_activeRow(sender.get_masterTableView().get_dataItems()[0].get_element());
        }




    }

when i pressed keyboard up and down arrow  after grid binded ,page is scorolling,Actually grid keyboard navigation should work.But it is not working.I think it lost focus.But this sample worked perfectly in ie9.But it is not worked in ie8,firefox and chrome...Please give the solution for this...I have attached my sample project.
Raja
Top achievements
Rank 1
 answered on 13 Dec 2011
6 answers
155 views
Is there a way we can define a common footer below tabstrip/multipage? Basically I would need the footer to cover precisely the same area as the tabs and control them from all the tabs.
Kate
Telerik team
 answered on 13 Dec 2011
1 answer
75 views
Load-on-demand is definitely an improvement over re-binding the entire tree on each expand/collapse.  However I'm still not clear on why it is technically infeasible to just load the entire result set ONCE then have all the expand/collapse behavior occur on the client.  Can you explain why that is not possible...because it would seem that would be the best way to implement a grid-like control?  We love the look and feel of this control but performance has become a real issue for us when dealing with larger amounts of data.

I know that there have been multiple posts on this forum regarding this control's performance.  Are there any plans in your development pipeline to remove the re-binding requirements from this control altogether and implement pure client-side expand/collapse behavior?

Thanks for your time!
Radoslav
Telerik team
 answered on 13 Dec 2011
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?