Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
144 views
Hi

For our site I use the Metro Skin, however for certain buttons I want to overwrite the Background color. I am able to do this except for when the button is pressed. I created a CSS class and used the PressedCssClass but it doesn't do anything. Here is my code

<td align="right" height="30">
        <telerik:RadButton ID="RadButton3" runat="server"  ButtonType="LinkButton" OnClick="orderupdate_Click" PressedCssClass="buttonpressed" HoveredCssClass="buttonpressed">
        </telerik:RadButton> 
</td>

and the CSS class

.buttonpressed {
    background-color: #000000 !important;
   }

thank you
Danail Vasilev
Telerik team
 answered on 11 Nov 2013
10 answers
223 views
I am after similair functionality as this demo example for combobox:

http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/treeviewcombobox/defaultcs.aspx?product=combobox

Is there anyway to close the control after a selection has been made after the first level in the tree?
Peter Filipov
Telerik team
 answered on 11 Nov 2013
9 answers
533 views
I'm currently using a RadComboBox with a RadTreeView to accomplish the same thing this new control does.  So, logically, I'd like to replace what I am using now with the RadDropDownTree.  Unfortunately I can't figure out how to do some of the client-side stuff I'm doing with the other controls.  For now I just need to expand or collapse the dropdown.  could someone point me to where that's documented?  I couldn't find it in the online docs...

Also, since I'm here, keyboard control is spotty so far.  Once I click within the dropdown tree I can then go up and down to select different nodes, but if I tab to the control and then hit the down arrow nothing happens.  It requires two mouse clicks to begin keyboard control.  Am I missing something?

Thanks!
Peter Filipov
Telerik team
 answered on 11 Nov 2013
1 answer
97 views
Hello !
It's possible to use RadBinaryImage and InfiniteScroll ? or in other words, load image client-side ?
Not add image url (otherwise the image is not resize) but add the "Telerik.Web.UI.WebResource.axd?imgid=423e8ea1c0c54bf49213ea52a8f45ea6&type=rbi"
Thank you
Manu

Vasil
Telerik team
 answered on 11 Nov 2013
3 answers
815 views
Hello,

I want to use a CustomValidator for a RadTextBox. The RadTextbox is inside an asp:Panel which is ajaxified with the RadAjaxManager. I have a CustomValidator with a ClientValidationFunction and ValidateEmptyText="True". However, the client side validation function is never called. 

Below is the code extract from the control and validator. Note that the RequiredFieldValidator (again inside the Panel) works fine. Note that I am using Q3 2013

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadAjaxManager ID="RadAjaxManager2" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnSubmit">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Panel1" UpdatePanelCssClass="" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadFormDecorator id="FormDecorator1" runat="server" DecoratedControls="All" Skin="Metro"></telerik:RadFormDecorator>
    <asp:Panel runat="server" ID="Panel1">
    <table>
    <tr>
            <td class="auto-style5">
                <label>Father's Name:</label>
            </td>
            <td style="width:100px">
                <telerik:RadTextBox ID="txtFathersName" Runat="server" EmptyMessage="Father's Name" LabelWidth="64px" Resize="None" Width="160px" DisabledStyle-BackColor="Silver">
                </telerik:RadTextBox>
            </td>
            <td><asp:CustomValidator runat="server" ID="CustomFieldValidator1" ControlToValidate="txtFathersName" ClientValidationFunction="RequiredIfPhysical" ErrorMessage="<img src='images/Exclamation.png' Title='Required Field'/>" ValidateEmptyText="True" Display="Dynamic" ></asp:CustomValidator>
                </td>
        </tr>
        <tr>
            <td class="auto-style5">
                <label>City:</label>
            </td>
            <td class="auto-style6">
                <telerik:RadTextBox ID="txtCity" Runat="server" EmptyMessage="City" LabelWidth="64px" Resize="None" Width="160px" Wrap="False" CausesValidation="False">
                </telerik:RadTextBox>
                 
            </td>
            <td><asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtCity"
                    runat="server" ErrorMessage="<img src='images/Exclamation.png' Title='Required Field'/>" Display="Dynamic" ></asp:RequiredFieldValidator></td>
        </tr>
        </table>
    </asp:Panel>    
Further below there is also the javascript validator:


<telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
        <script type="text/javascript">
            function RequiredIfPhysical(sender, args) {
                var chkBoxPhysical = $find("<%=rdBtnPhysical.ClientID%>");
                chkBoxPhysical = $telerik.toButton(chkBoxPhysical);
                if (chkBoxPhysical.get_checked()) {
                    if (args.Value == "") {
                        args.IsValid = false;
                    }
                    else {
                        args.IsValid = true;
                    }
                } else {
                    args.IsValid = true;
                }
            }
        </script>
</telerik:RadCodeBlock>



Shinu
Top achievements
Rank 2
 answered on 11 Nov 2013
5 answers
325 views
Hi Everyone,

I'm new to telerik and I recently started to explore with it and love it.  I build a page with it and I want to have 3 separate collapsible Dock within one page.  I created it like this:

<telerik:RadDockLayout ID="RadDockLayout2" runat="server">
                            <telerik:RadDockZone ID="RadDockZone3" runat="server" Height="300px" Width="300px">
                                <telerik:RadDock ID="RadDock3" runat="server" Width="300px" Title="Dock1" Text="Dock1">
                                <Commands>
                                <telerik:DockExpandCollapseCommand />
                                </Commands>
                                <ContentTemplate>
                                  --Contents here---
                                </ContentTemplate>
                                </telerik:RadDock>
                            </telerik:RadDockZone>
                            <telerik:RadDockZone ID="RadDockZone4" runat="server" Height="300px" Width="300px">
                                <telerik:RadDock ID="RadDock4" runat="server" Width="300px" Title="Dock2" Text="Dock2">
                                <Commands>
                                <telerik:DockExpandCollapseCommand />
                                </Commands>
                                <ContentTemplate>
                                --Contents here---
                                </ContentTemplate>
                                </telerik:RadDock>
                            </telerik:RadDockZone>
 
                            <telerik:RadDockZone ID="RadDockZone5" runat="server" Height="300px" Width="300px">
                                <telerik:RadDock ID="RadDock5" runat="server" Width="300px" Title="Dock2" Text="Dock2">
                                <Commands>
                                <telerik:DockExpandCollapseCommand />
                                </Commands>
                                <ContentTemplate>
                                  --Contents here---
                                </ContentTemplate>
                                </telerik:RadDock>
                            </telerik:RadDockZone>
                        </telerik:RadDockLayout>

My problem is that I have some textbox/combobox in Dock1 and need to create a SqlDataSource in dock2 but  use the  textbox/combobox as variable in the SqlDataSource.  When I try to run it, I get a "Cannot find the Control" for SqlDataSource.  Is there any way I can work around  this or a simple way of creating such  page?

Shinu
Top achievements
Rank 2
 answered on 11 Nov 2013
1 answer
131 views
Hi,

I have an issue with the RadScheduler. If I use a TimeLineView with no resources or appointments, the "Navigate to date" window cannot be used to navigate t an date where there might be data, because the window expands beyond the Scheduler's area and thereby the web part (i guess). See the screenshot for what I mean.

I have tried setting the height of the TimelineView but it doesn't work and I have read that setting the height of a TimelineView is not supported anyway. I have also tried setting the height of the SharePoint Webpart containing the scheduler to 1000 pixels through the SharePoint UI, but still no luck. Finally, I have tried wrapping the scheduler in a div and set the height of the div to 1000px, but that doesn't work either. 

Do you have any solution to how to make the navigation pane show properly when there are no items in the TimelineView?
Plamen
Telerik team
 answered on 11 Nov 2013
2 answers
155 views
I'm seeing an issue with a RadGrid using client-side databinding where if the user changes the page size using the dropdown in the paging footer, the additional rows don't get some of the column settings (like horizontal alignment, CSS class, etc) that they should.

The grid is set up like so:
<telerik:RadGrid runat="server" ID="RadGrid1" AutoGenerateColumns="false"
    Width="100%" GridLines="None" PageSize="5" AllowFilteringByColumn="true" AllowPaging="true"
    AllowSorting="true">
    <MasterTableView EnableViewState="False" EnableNoRecordsTemplate="true" IsFilterItemExpanded="false">
        <NoRecordsTemplate>
            There are no available records.
        </NoRecordsTemplate>
        <RowIndicatorColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <telerik:GridHyperLinkColumn SortExpression="Name" ItemStyle-CssClass="gridLink" ItemStyle-Wrap="true" HeaderText="Description"
                UniqueName="Name" DataTextField="Name" FilterControlWidth="55px" CurrentFilterFunction="Contains">
            </telerik:GridHyperLinkColumn>
            <telerik:GridDateTimeColumn AllowFiltering="true" AllowSorting="true"
                ItemStyle-Wrap="false" DataField="DueDate" DataFormatString="{0:M/d/yyyy}" HeaderText="Scheduled"
                UniqueName="DueDate" ItemStyle-Width="85" HeaderStyle-HorizontalAlign="Right"
                ItemStyle-HorizontalAlign="Right" CurrentFilterFunction="GreaterThanOrEqualTo">
            </telerik:GridDateTimeColumn>
            <telerik:GridDateTimeColumn AllowFiltering="true" AllowSorting="true"
                ItemStyle-Wrap="false" DataField="DoneDate" DataFormatString="{0:M/d/yyyy}" HeaderText="Done"
                UniqueName="DoneDate" ItemStyle-Width="55" HeaderStyle-HorizontalAlign="Right"
                ItemStyle-HorizontalAlign="Right" CurrentFilterFunction="GreaterThanOrEqualTo">
            </telerik:GridDateTimeColumn>
        </Columns>
    </MasterTableView>
    <PagerStyle Mode="NextPrevAndNumeric" />
    <ClientSettings>
        <ClientEvents 
            OnDataBinding="RadGrid1_OnDataBinding" 
            OnDataBound="RadGrid1_OnDataBound" 
            OnRowDataBound="RadGrid1_OnRowDataBound"
            OnDataBindingFailed="RadGrid1_OnDataBindingFailed" />
        <DataBinding Location="~/Services/RadGrid1Service.svc" SelectMethod="GetRadGrid1Data" SortParameterType="String" FilterParameterType="String">
        </DataBinding>
    </ClientSettings>
</telerik:RadGrid>

I have attached a screenshot showing the problem (rows 6 and on do not have the Scheduled date right-aligned; they also do not get the gridLink CSS class on the Description column).

Is this a known issue/is there a workaround? I've looked at the OnRowDataBound method and it's not doing anything that should interfere with this as far as I know -- all it does is conditionally add a CSS class (using jQuery.addClass) to the Scheduled column if the date is in the past.




 
Vsoni
Top achievements
Rank 1
 answered on 11 Nov 2013
1 answer
163 views
Hi,
In my telerik grid AggregateFiled,I have bind Text box.
This works fine but when i click  on any button on page it shows me java script error message .
i have attached Image for more details.
if i replace Textbox with Lable its working fine.In my case i want to add text box to aggregate field and end user can edit the value and need to save the data.
here is my code.

By Code : Iam getting Error1.jpg
 TelerikPivotGridHelper.PivotGridAggregateFiled(RadGrid1, "", "LoadHours", "LoadHours", 60, "{0:F2}", "{0:F2}", TelerikControlType.TextBox, "lblAmount");

 #region PivotGridAggregateFiled
    public static void PivotGridAggregateFiled(RadPivotGrid grid, String headertext, String datafield, String UniqueName, int Width, String DataFormatString, String totalformatString, TelerikControlType Columntype, String contolID)
    {
        PivotGridAggregateField aggregateField = new PivotGridAggregateField();
        if (Columntype != TelerikControlType.None)
        {
            aggregateField.CellTemplate = new MyTemplate(datafield, Columntype.ToString(), Width - 2, contolID);
        }
        aggregateField.DataField = datafield;
        aggregateField.UniqueName = UniqueName;
        aggregateField.CellStyle.Width = Width;
        aggregateField.DataFormatString = DataFormatString;
        aggregateField.TotalFormatString = totalformatString;
        aggregateField.Caption = headertext;
        grid.Fields.Add(aggregateField);

    }
    #endregion



 public void txtbox1_DataBinding(object sender, EventArgs e)
        {
            TextBox txtbox1 = (TextBox)sender;
            PivotGridDataCell container = (PivotGridDataCell)txtbox1.NamingContainer;
            if (container.DataItem != null)
            {
                txtbox1.Text = container.DataItem.ToString();
            }
            else
            {
                txtbox1.Text = "0";
            }
        }

by Design : Iam getting Error2.jpg
 <telerik:PivotGridAggregateField DataField="LoadHours"  CellStyle-Width="60px">
                <celltemplate >   
                <asp:TextBox ID='txtloadhours' runat="server" Width="46" Text='<%# Container.DataItem%>' ></asp:TextBox>
                <%--  <asp:TextBox ID='txtloadhours' runat="server" Width="46" Text='<%# ProcessMyDataItem(Container.DataItem) %>' ></asp:TextBox>--%>

 
                  </celltemplate>         
                </telerik:PivotGridAggregateField>   
Syed
Top achievements
Rank 1
 answered on 11 Nov 2013
13 answers
1.5K+ views
Hi. I am using IE8 and I get the above JavaScript error in a couple of Telerik Client Side Event handlers. I don't understand why?!

First example, in RadTreeView control:

<telerik:RadTreeView ID="treeView" runat="server" Skin="Vista" OnClientContextMenuItemClicked="onClientContextMenuItemClicking"> 
    <ContextMenus> 
        <telerik:RadTreeViewContextMenu ID="FolderContextMenu" runat="server" Skin="Vista"> 
            <Items> 
                <telerik:RadMenuItem Value="FolderDelete" Text="Delete Folder" PostBack="true"></telerik:RadMenuItem> 
            </Items> 
        </telerik:RadTreeViewContextMenu> 
    </ContextMenus> 
</telerik:RadTreeView> 

Event handler
        function onClientContextMenuItemClicking(sender, args) { 
            var menuItem = args.get_menuItem(); 
            var treeNode = args.get_node(); 
            menuItem.get_menu().hide(); 
 
            switch (menuItem.get_value()) { 
                case "FolderDelete":                    
                    args.set_cancel(true); 
                    break; 
            } 
        } 

...would throw and error in the line where it says: "args.set_cancel(true);"


Same I get in your example of function ShowPopupAbove(sender, eventArgs) - eventArgs.set_cancel(true); just don't work for me!!!




Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.30618; .NET CLR 3.5.21022; .NET CLR 3.5.30729; InfoPath.2)
Timestamp: Tue, 18 Aug 2009 16:00:09 UTC

Message: Object doesn't support this property or method
Line: 183
Char: 21
Code: 0



Ramanathan
Top achievements
Rank 1
 answered on 10 Nov 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?