Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
103 views
I'm having trouble overriding the style applied to a rad panel item, the css shows that the background-position style is 0px 0px and it is being set from webResource.axd.  I'm trying to apply the "selected" look all the time (which has a background-position settting of 0px -400px.

I'm using the default skin (ie. no skin is set on the panelBar or panelItem).

this is a snippet of my page just before the radpanelbar:
<style type="text/css">   
     .RadPanelBar a.rpLink,
     .RadPanelBar div.rpHeaderTemplate,
     .RadPanelBar a.rpExpanded,
     .RadPanelBar div.rpExpanded,
     .RadPanelBar .rpItem a.rpLinkExpandHovered
     .RadPanelBar_Default DIV.rpExpanded
     {
               background-position: 0 -400 !important;
               font: 14px/24px "Segoe UI", Arial, sans-serif;
               padding-bottom: 0px;
               padding-top: 0px;
               background-image: images/button_downloadtopdf.gif;
     }   
     .myStyle DIV.rpExpanded
         {
                background-position: 0 -400 !important;
            }
                              
          </style>

Directly following the style tag I have the following panel bar with the following panel item
<telerik:RadPanelBar id="pbApplicantDetail" runat="server" Width="782px" OnClientItemClicked="pbApplicantDetail_ItemClicked" BackColor="#FFFFCC" CssClass="myStyle"  >
                                    <Items>
                                        <telerik:RadPanelItem Text="Applicant Details" Value="piApplicantDetail">
                                            <HeaderTemplate>
                                                <Applicant:Message runat="server" id="UCApplicantDetail"></Applicant:Message>
                                            </HeaderTemplate>
                                        </telerik:RadPanelItem>
              
                                        <telerik:RadPanelItem runat="server" Text="Rule Information" Visible="true" Expanded="true" BorderStyle="None" Width="779px" CssClass="myStyle" >
                                            <HeaderTemplate>
                                                <asp:PlaceHolder ID="ruleHeaderPlaceholder" runat="server"></asp:PlaceHolder>
                                                <%--<RuleHeader:Message runat="server" ID="UCRulesHeader" />--%>
                                            </HeaderTemplate>
                                            <ContentTemplate>
                                                <%--<asp:PlaceHolder ID="ruleBodyPlaceholder" runat="server"></asp:PlaceHolder>--%>
                                                <Rules:Message runat="server" id="UCRulesDetail"></Rules:Message>
                                            </ContentTemplate>
                                        </telerik:RadPanelItem>

I'm looking at getting the style applied to the "Rule Information" panel item in the header.  It always shows up with the background position set to 0px 0px until the header is clicked, then it changes to 0px -400px which is what I want it to always be.  Setting the selected property to true shows it correct, but once it is not selected then it changes back.

Kate
Telerik team
 answered on 13 Dec 2011
3 answers
79 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
140 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
48 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
200 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.2K+ 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
91 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
307 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
144 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
120 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?