Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
78 views
My SEO team wants me to use an external JS or jQuery so the links are not crawled by Google.

Is it possible to setup RadMenu this way?

We currently use noindex nofollow, but the SEO team does not want us to use noindex nofollow on internal links.

Kate
Telerik team
 answered on 07 Feb 2014
1 answer
82 views
I have a linq data source returning rows. Each row contains a date and 8 counters. I want the date to appear in the X-Axis labels and the 8 counters to form the stacked bar. I am using the DataBound event of the chart to set the colors to use. I can't seem to get the XD-Axis labels to appear and I am getting 3 bars per date.

The chart is defined as:
<telerik:RadChart runat="server" DefaultType="StackedBar100"
Width="1100px" ID="ReportChart" Height="450px" DataSourceID="ChartDataSource" OnDataBound="ReportChart_DataBound">
<Appearance>
<Border Visible="False" />
</Appearance>
<Series>
<telerik:ChartSeries Name="Normal" Type="StackedBar100" DataYColumn="Normal">
<Appearance ShowLabels="False">
<LabelAppearance Visible="False">
</LabelAppearance>
</Appearance>
</telerik:ChartSeries>
<telerik:ChartSeries Name="Warnings" Type="StackedBar100" DataYColumn="Warnings">
<Appearance ShowLabels="False">
<LabelAppearance Visible="False"/>
</Appearance>
</telerik:ChartSeries>
<telerik:ChartSeries Name="Fixture_Malfunction" Type="StackedBar100" DataYColumn="Fixture_Malfunction">
<Appearance ShowLabels="False">
<LabelAppearance Visible="False" />
</Appearance>
</telerik:ChartSeries>
<telerik:ChartSeries Name="No_Comm" Type="StackedBar100" DataYColumn="No_Comm">
<Appearance ShowLabels="False">
<LabelAppearance Visible="False" />
</Appearance>
</telerik:ChartSeries>
<telerik:ChartSeries Name="Extended_No_Comm" Type="StackedBar100" DataYColumn="Extended_No_Comm">
<Appearance ShowLabels="False">
<LabelAppearance Visible="False" />
</Appearance>
</telerik:ChartSeries>
<telerik:ChartSeries Name="Partial_Report" Type="StackedBar100" DataYColumn="Partial_Report">
<Appearance ShowLabels="False">
<LabelAppearance Visible="False" />
</Appearance>
</telerik:ChartSeries>
<telerik:ChartSeries Name="Unregistered" Type="StackedBar100" DataYColumn="Unregistered">
<Appearance ShowLabels="False">
<LabelAppearance Visible="False" />
</Appearance>
</telerik:ChartSeries>
<telerik:ChartSeries Name="No_Power" Type="StackedBar100" DataYColumn="No_Power">
<Appearance ShowLabels="False">
<LabelAppearance Visible="False" />
</Appearance>
</telerik:ChartSeries>
</Series>
<PlotArea>
<Appearance>
<Border Visible="False" />
</Appearance>
</PlotArea>
</telerik:RadChart>












Danail Vasilev
Telerik team
 answered on 07 Feb 2014
3 answers
98 views
I have a chart with some options next to it. I'd like to have it that when I change the options, it changes the column chart but doesn't start from zero every time.

So if a value was 6 and it was going to 3, I'd like it to display from 6 -> 3 not 6 -> 0 -> 3.

TIA - Jeff

(Used Telerik a couple of years ago and loved it. Got a new job and trying to convince the boss we need it!)
Danail Vasilev
Telerik team
 answered on 07 Feb 2014
3 answers
109 views
This isn't really a Telerik question but more of a general charting question.

We've got a spot where a person can choose 1 of 4 options. Depending of what they choose from drop down lists, different options are better. My boss has suggested a column chart where it will show the columns with an arbitrary value but you can look at it and see that 'option 2 is best for this set of options but option 3 is best for these options.'

Is using a column chart reasonable or is there some better way to do it.

I have already seen that there is no way to put custom labels on an HtmlChart so I'd have to hide the values (probably between 0 and 1) and put something there instead.

TIA - Jeff (Used Telerik years ago and now at a new job trying to use it again.....)
Danail Vasilev
Telerik team
 answered on 07 Feb 2014
1 answer
64 views
I m using Client Side javascript method to Bind  a RadGrid Control. I m unable to Bind Detail Table inside this RadGrid using Client Side or Server Side.
I didnt Get any Code for binding DetailTable at client side whose Master table is already binded with client methods.

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
                    <script type="text/javascript">
            //<![CDATA[
                        var uid = $("#ddlSender").val();
                        var sid = $("#ddlSession").val();
 
                        function pageLoad(sender, eventArgs) {
                            var tableView = $find("<%= DemomailViewings.ClientID %>").get_masterTableView();
                            $find("<%= RadAjaxLoadingPanel1.ClientID %>").show("<%= DemomailViewings.ClientID %>");
                            PageMethods.GetData(0, tableView.get_pageSize(),
                        tableView.get_sortExpressions().toString(), uid, sid,
                        updateGrid);
                            PageMethods.GetCount(uid, sid, updateVirtualItemCount);
                        }

                        function DemomailViewings_Command(sender, args) {
                            args.set_cancel(true);
                            var pageSize = sender.get_masterTableView().get_pageSize();
                            var sortExpressions = sender.get_masterTableView().get_sortExpressions();
                            var currentPageIndex = sender.get_masterTableView().get_currentPageIndex();
                            if (args.get_commandName() == "Filter")
                                currentPageIndex = 0;

                            var sortExpressionsAsSQL = sortExpressions.toString();

                            $find("<%= RadAjaxLoadingPanel1.ClientID %>").show("<%= DemomailViewings.ClientID %>");

                            PageMethods.GetData(currentPageIndex * pageSize, pageSize, sortExpressionsAsSQL, uid, sid, updateGrid);

                            if (args.get_commandName() == "Filter") {
                                PageMethods.GetCount(uid, sid, updateVirtualItemCount);
                            }
                        }
                        function updateGrid(result) {
                            var tableView = $find("<%= DemomailViewings.ClientID %>").get_masterTableView();
                            tableView.set_dataSource(result);
                            tableView.dataBind();
                            $find("<%= RadAjaxLoadingPanel1.ClientID %>").hide("<%= DemomailViewings.ClientID %>");
                        }
                        function updateVirtualItemCount(result) {
                            var tableView = $find("<%= DemomailViewings.ClientID %>").get_masterTableView();
                            tableView.set_virtualItemCount(result);
                        }
                        function DemomailViewings_RowDataBound(sender, args) {
                            // conditional formatting
                            var row = args.get_item();
                            var viewing = args.get_dataItem();
                            var link = $telerik.findElement(row.get_element(), 'contactLink');
                            var grpImg = $telerik.findElement(row.get_element(), 'grpImage');
                            if (viewing.InGroup) {
                                $(grpImg).attr("src", "Img/true.gif");
                                $(link).text("Group Viewing");
                                $(link).attr("href", "javascript:void(0)");
                                $(link).attr("onclick", "javascript:window.open('groupviewing.aspx<%=this.Request.Url.Query%>&contactid=" + viewing.ContactID + "', 'contacts', 'left=500,top=125,width=500,height=427,resizable=0,scrollbars=1');");
                            }
                            else {
                                $(grpImg).attr("src", "Img/false.gif");
                                $(link).text(viewing.email);
                                $(link).attr("onclick", "GetContactID('" + viewing.email + "')");
                            }
                        }
            //]]>
                    </script>
                </telerik:RadCodeBlock>
                <telerik:RadGrid ID="DemomailViewings" PageSize="50" Skin="Web20" EnableViewState="false"
                    runat="server" AllowPaging="true" AllowSorting="True" GridLines="None">
                    <ItemStyle Wrap="false"></ItemStyle>
                    <MasterTableView DataKeyNames="ContactID" ClientDataKeyNames="ContactID" TableLayout="Fixed"
                        HierarchyLoadMode="Client">
                        <DetailTables>
                            <telerik:GridTableView AllowFilteringByColumn="false" AllowSorting="false" Name="Orders">
                                <ParentTableRelation>
                                    <telerik:GridRelationFields DetailKeyField="ContactID" MasterKeyField="ContactID" />
                                </ParentTableRelation>
                                <%--This detail table will bind to a single related entity -
                                    so paging, sorting and filtering is not requied--%>
                                <PagerStyle Visible="false" />
                                <Columns>
                                    <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" />
                                    <telerik:GridBoundColumn DataField="AccountId" HeaderText="Company Name" />
                                    <telerik:GridBoundColumn DataField="Title" HeaderText="Title" />
                                    <telerik:GridBoundColumn DataField="Phone" HeaderText="Phone" />
                                </Columns>
                            </telerik:GridTableView>
                        </DetailTables>
                        <Columns>
                            <telerik:GridTemplateColumn SortExpression="isvirtualcontact" HeaderText="Group Viewing">
                                <ItemTemplate>
                                    <asp:Image ID="grpImage" runat="server" />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn ShowSortIcon="true" SortExpression="first_name" DataField="FirstName"
                                HeaderText="FirstName">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn ShowSortIcon="true" SortExpression="Last_Name" DataField="LastName"
                                HeaderText="LastName">
                            </telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn SortExpression="email1" UniqueName="Email" HeaderText="Email">
                                <ItemTemplate>
                                    <a id="contactLink" style="cursor: pointer" runat="server"></a>&nbsp;
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn ShowSortIcon="true" SortExpression="businesstitle" AllowSorting="true"
                                DataField="Title" HeaderText="Title">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Phone" SortExpression="Phone1" AllowSorting="true"
                                HeaderText="Phone">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn ShowSortIcon="true" SortExpression="company_name" AllowSorting="true"
                                DataField="CompanyName" HeaderText="CompanyName">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn ShowSortIcon="true" AllowSorting="true" DataField="SessionTitle"
                                SortExpression="title" HeaderText="Video Viewed">
                            </telerik:GridBoundColumn>
                            <telerik:GridDateTimeColumn ShowSortIcon="true" AllowSorting="true" SortExpression="delaysendtime"
                                DataFormatString="{0:MM/dd/yyyy}" DataField="SentDate" HeaderText="SentDate">
                            </telerik:GridDateTimeColumn>
                            <telerik:GridDateTimeColumn ShowSortIcon="true" AllowSorting="true" SortExpression="access_date"
                                DataFormatString="{0:MM/dd/yyyy}" DataField="ViewedDate" HeaderText="ViewedDate">
                            </telerik:GridDateTimeColumn>
                            <telerik:GridBoundColumn ShowSortIcon="true" AllowSorting="true" DataField="DurationText"
                                SortExpression="durationres" HeaderText="DurationText">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn ShowSortIcon="true" AllowSorting="true" SortExpression="IPLocation"
                                DataField="location" HeaderText="location">
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                    <SortingSettings SortedBackColor="#FFF6D6" EnableSkinSortStyles="false"></SortingSettings>
                    <PagerStyle AlwaysVisible="true" Mode="NumericPages"></PagerStyle>
                    <ClientSettings AllowExpandCollapse="true">
                        <ClientEvents  OnCommand="DemomailViewings_Command" OnRowDataBound="DemomailViewings_RowDataBound">
                        </ClientEvents>
                    </ClientSettings>
                </telerik:RadGrid>
                <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Skin="Web20" runat="server">
                </telerik:RadAjaxLoadingPanel>



[WebMethod]
    public static int GetCount(string UserId, string Session_ID)
    {
        int count = 0;
        string startDate = "01/01/2013";
        string EndDate = "01/01/2014";
        int startIndex = 0;
        int maximumRows = 999999;
        string sortExpressions = "";
        count = DemoMail.Components.ViewingHelperX.GetViewingsCountForCurrentUser(UserId, startIndex, maximumRows, sortExpressions,
            startDate, EndDate, Session_ID, "count");
        return count;
    }

    [WebMethod]
    public static List<Viewing> GetData(int startIndex, int maximumRows,
    string sortExpressions, string UserId, string Session_ID)
    {                          
        string startDate = "01/01/2013";
        string EndDate = "01/01/2014";
        List<Viewing> list = DemoMail.Components.ViewingHelperX.GetViewingsForCurrentUser(UserId, startIndex, maximumRows, sortExpressions,
            startDate, EndDate, Session_ID,"list");
        return list;
    }
Princy
Top achievements
Rank 2
 answered on 07 Feb 2014
3 answers
322 views
Hi,

I have a RadTreeView inside a RadPageView. Whenever i expand the nodes of the RadTreeViews it overflows out of the container Panel/Div/RadPane (image attached). Please help me choose the right container or styling for the RadTreeView so that it stays inside the container and scrollbars are activated whenever the number of nodes are more than its height. Here is the relevant PageView section of my code :

<telerik:RadMultiPage ID="MultiPage" Width="100%" Height="560px" runat="server" SelectedIndex="0"
    RenderSelectedPageOnly="true">
 
    <telerik:RadPageView ID="ProductsPageView" runat="server" Width="100%" Height="100%">
        <div style="height: 450px; width: 450px; overflow:scroll; border-color: Gray; border-width: thin;
            border-style: solid;">
            <telerik:RadTreeView ID="ProductsTreeView" runat="server"
                CheckBoxes="true" CheckChildNodes="true" MultipleSelect="true" TriStateCheckBoxes="True"
                Height="400px" Width="90%">
            </telerik:RadTreeView>
        </div>
    </telerik:RadPageView>
</telerik:RadMultiPage>



Also, the RadMultiPage is inside a RadWindow, So, this overflow activates the vertical scrollbars of RadWindow, but i'm not able to keep it inside any other container within the RadWindow. I've tried using Panel, Div and RadPane(with RadSplitter).

I'm using version 2012.3.1205.40 with .NET Framework 4.

Thanks,
Nishant



  
Kate
Telerik team
 answered on 07 Feb 2014
1 answer
123 views
I have a page loading a usercontrol. The User control has a repeater with a link button in it. On every click of the link button I want to reload a RadGrid on the page.  While loading the RadGrid I am showing a RadAjaxLoadingPanel. 

Currently the RadAjaxLoadingPanel appears only for the click event of the first link button of the repeater. For the other link buttons, it does a full postback. In the repeater's data bound event  I have the code to wireup the RadAjaxLoadingPanel to show for every item's link button control.

protected void RptLetterIndexItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var btn = e.Item.FindControl("lnkLetter") as LinkButton;
                AjaxManagerProxy1.AjaxSettings.AddAjaxSetting(btn, RadGrid2, RadAjaxLoadingPanel2);
            }            
        }

However when i see the source of the page , I see that the event is only hooked up for the first repeater item. How can I bind the ajaxloadingpanel for every link button in the repeater ?

{InitControlID : "ctl00_ContentMain_SkillsSearchCtl_rptLetterIndex_ctl00_lnkLetter",UpdatedControls : [{ControlID:"ctl00_ContentMain_SkillsSearchCtl_RadGrid2",PanelID:"ctl00_ContentMain_SkillsSearchCtl_RadAjaxLoadingPanel2"}]} 















Maria Ilieva
Telerik team
 answered on 07 Feb 2014
4 answers
228 views
Hi

I have a RadNumericTextBox in  a ListView. II'm trying to conditionally set the RadNumericTextBox's Type from Number to Percent when binding the ListView.

I was trying something like this, with no success. Anybody any ideas.

<telerik:RadListView ID="lvCover"  runat="server" Width="95%" DataKeyNames="Id"
    ItemPlaceholderID="TempContainer"  AllowPaging="false" >
    <LayoutTemplate>
        <asp:PlaceHolder ID="TempContainer" runat="server"></asp:PlaceHolder
    </LayoutTemplate>
    <ItemTemplate>
        <div>
            <table style="width:100%">                               
                <tr>    
                    <td style="width:50%; text-align:left">
                        <%#Eval("CoverType.Description")%>
                    </td>
                    <td style="width:50%; text-align:left">
                        <telerik:RadNumericTextBox ID="txtRate" runat="server"  MaxLength="7"
                            Type='<%#Eval("CoverType.Code") == "NCB" ? Telerik.Web.UI.NumericType.Number : Telerik.Web.UI.NumericType.Percent %>'
                            Text='<%#Eval("Rate")%>'>
                            <NegativeStyle Resize="None" />
                            <NumberFormat DecimalDigits="3" ZeroPattern="n" />
                            <EmptyMessageStyle Resize="None" />
                            <ReadOnlyStyle Resize="None" />
                        </telerik:RadNumericTextBox>
                    </td>
                </tr
            </table>
        </div>
    </ItemTemplate>
</telerik:RadListView>
Nick
Top achievements
Rank 1
 answered on 07 Feb 2014
3 answers
123 views
Is there a way to just show folders?  We are trying to use the file explorer for users to select the folder they want to save into.  We don't want them picking accidentally .pdf file to save into.

Thanks!
Aravind
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 07 Feb 2014
1 answer
327 views
While I have been trying to set the text box height of RadCombobox, I found a forum link to set it by the below styles


<style type="text/css">  
div.RadComboBox_Default table .rcbInputCell, 
div.RadComboBox_Default table .rcbArrowCell  
{  
    background-color: red;  
    height: 35px;   
    line-height: 34px; 
    padding: 0; 
}  
 
div.RadComboBox_Default table .rcbInputCell input 

    height: 35px; 
    line-height: 34px; 
    font:15px arial,verdana,sans-serif; 
    height: 35px; 
    padding: 0; 

.rcbInput 

    height: 35px !important; 

</style> 

However, the result is undesirable. Please find the attached image.
Can you help me in setting the height of rad combo box.
Shinu
Top achievements
Rank 2
 answered on 07 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?