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

I need the FileExplorer control to handle encrypted files. Since all access to the files needs a encryption/decryption key is there an easy way to accomplish this?

If the only way is to override all the controls functionality is there a same project of overriding everything out there?

Vessy
Telerik team
 answered on 25 Aug 2015
1 answer
244 views

I am trying to work with the HTMLChart negative numbers while setting the Min & Max values on the Y axis.  Logic works fine with all dollar/percentages whose values are greater than 0 (zero).  The X-axis is all the way in the middle and I have implemented the code suggested here

Any other suggestions on how I can get the X-axis to remain at the bottom even for negative numbers?  I have included the code below

<telerik:RadScriptBlock runat="server">
        <script>
            function BottomXAxisLabels() {
                var chart = $find("<%=RadHtmlChart1.ClientID%>").get_kendoWidget();
            var axis = $telerik.$.extend(true, {}, chart.options.categoryAxis);
            axis.line.visible = false;
            chart.setOptions({ categoryAxis: [{}, axis] });
            chart.options.valueAxis.axisCrossingValues = [0, -99999999999];
            chart.redraw();
            }
 
            function onRequestStart(sender, args) {
                if (args.get_eventTarget().indexOf("_btnXLSExport") >= 0) {
                    args.set_enableAjax(false);
                }
            }
            function OnSeriesClick(args) {
                var kendoWidget = args.sender;
                alert("You clicked on a series item with value '" + args.value + "' from category '" + args.category + "'.");
            }
 
    </script>
    </telerik:RadScriptBlock>
 
                    <telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" Visible="false" Legend-Appearance-Position="Top" Width="95%">
                        <ClientEvents OnLoad="BottomXAxisLabels" OnSeriesClick="OnSeriesClick" />
                        <PlotArea>
                            <Series>
                                <telerik:ScatterLineSeries DataFieldY="ReturnedValue" DataFieldX="cycle_Date">
                                    <TooltipsAppearance Color="White" >
                                    </TooltipsAppearance>
                                    <LabelsAppearance Visible="false">
                                    </LabelsAppearance>
                                </telerik:ScatterLineSeries>
                            </Series>
                            <YAxis>
                                <LabelsAppearance>
                                    <TextStyle Bold="true" />
                                </LabelsAppearance>
                                <MinorGridLines Visible="false"></MinorGridLines>
                                <MajorGridLines Visible="false"></MajorGridLines>
                            </YAxis>
                            <XAxis DataLabelsField="cycle_Date" BaseUnit="Years" MajorTickSize="1" >
                                <LabelsAppearance Visible="true" RotationAngle="90" DataFormatString="Year {0:yyyy}">
                                    <TextStyle Bold="true" />
                                </LabelsAppearance>
                                <TitleAppearance Text="Dates">
                                    <TextStyle Bold="true" />
                                </TitleAppearance>
                                <MinorGridLines Visible="false"></MinorGridLines>
                                <MajorGridLines Visible="true"></MajorGridLines>
                            </XAxis>
                        </PlotArea>
                        <ChartTitle>
                            <Appearance>
                                <TextStyle Bold="true" />
                            </Appearance>
                        </ChartTitle>
                        <Legend>
                            <Appearance Visible="true" Position="Bottom"></Appearance>
                        </Legend>
                    </telerik:RadHtmlChart>

 

The min value may be something like -0.0545423.  I am attempting to create a buffer to the min value and max value. 

Private Sub grdResults_SelectedIndexChanged(sender As Object, e As EventArgs) Handles grdResults.SelectedIndexChanged
     For Each item As GridDataItem In grdResults.SelectedItems
         Dim strID As String = TryCast(item.FindControl("lblRowField"), Label).Text
         Dim strID2 As String = TryCast(item.FindControl("lblRowText"), Label).Text
         Dim strID3 As String = TryCast(item.FindControl("lblRowNumber"), Label).Text
         Me.RadHtmlChart1.Visible = True
         GetData(strID, strID2, strID3)
 
     Next
 End Sub
 
Private Sub GetData(InField As String, InColumnName As String, InRowCount As String)
     Try
         oConn.Open()
 
         Dim ocmd As New SqlCommand("sp_seTrendTracking", oConn)
         ocmd.CommandType = CommandType.StoredProcedure
 
         With ocmd.Parameters
             .Add(New SqlParameter("@charter_num", Session("Charter_Num")))
             '.Add(New SqlParameter("@charter_num", 95778))
             .Add(New SqlParameter("@field", InField))
         End With
 
         reader = ocmd.ExecuteReader
 
         If reader.HasRows Then
             Dim dt As DataTable = New DataTable()
 
             dt.Load(reader)
             RadHtmlChart1.DataSource = dt
             RadHtmlChart1.ChartTitle.Text = InColumnName
 
             Dim dr As DataRow
             dr = dt.Rows(0)
 
             Dim percentage As Double = 0.1D    '10%
             Dim currentValue As Double
 
             If InRowCount <= 6 Then
                 RadHtmlChart1.PlotArea.YAxis.LabelsAppearance.DataFormatString = "{0:c0}"
                 RadHtmlChart1.PlotArea.CommonTooltipsAppearance.DataFormatString = "{0:c0}"
                 'Grab the current value in TextBox1
                 If Double.TryParse(dr("Minvalue"), Globalization.NumberStyles.Number, Nothing, currentValue) Then
                     'Add 10% of the value to it
                     currentValue -= dr("Minvalue") * percentage
                     RadHtmlChart1.PlotArea.YAxis.MinValue = currentValue.ToString
                 End If
 
                 If Double.TryParse(dr("MaxValue"), Globalization.NumberStyles.Number, Nothing, currentValue) Then
                     'Add 10% of the value to it
                     currentValue += dr("MaxValue") * percentage
                     RadHtmlChart1.PlotArea.YAxis.MaxValue = currentValue.ToString
                 End If
                 RadHtmlChart1.PlotArea.CommonTooltipsAppearance.DataFormatString = "{1:c0}<br/>{0:MMM yyyy}"
             Else
                 RadHtmlChart1.PlotArea.YAxis.LabelsAppearance.DataFormatString = "{0:p2}"
                 RadHtmlChart1.PlotArea.CommonTooltipsAppearance.DataFormatString = "{0:p2}"
                 If Double.TryParse(dr("Minvalue"), Globalization.NumberStyles.Number, Nothing, currentValue) Then
                     Dim MinValue As Decimal
                     MinValue = dr("Minvalue")
                     If dr("MinValue") < 0 Then
                         'percentage = -1.5D
                         currentValue += MinValue * percentage
                     Else
                         'Add 10% of the value to it
                         currentValue -= dr("Minvalue") * percentage
                     End If
                     RadHtmlChart1.PlotArea.YAxis.MinValue = currentValue
                 End If
 
                 If Double.TryParse(dr("MaxValue"), Globalization.NumberStyles.Number, Nothing, currentValue) Then
                     'Add 10% of the value to it
                     currentValue += dr("MaxValue") * percentage
                     RadHtmlChart1.PlotArea.YAxis.MaxValue = currentValue
                 End If
                 RadHtmlChart1.PlotArea.CommonTooltipsAppearance.DataFormatString = "{1:p2}<br/>{0:MMM yyyy}"
             End If
             RadHtmlChart1.DataBind()
         End If
     Catch ex As Exception
         MyLabel.Text = ex.Message
     Finally
         oConn.Close()
     End Try
 End Sub

 

 

 

Danail Vasilev
Telerik team
 answered on 25 Aug 2015
2 answers
192 views

Hi

In my grid, when I used Grouping, how do we remove the first row which it was a sort button. Please see attachment.

This is my code

 <telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="true" CssClass="RadGrid RadGrid_Silk" OnItemCommand="itemClickRadGrid" Visible="true" OnItemDataBound="RadGrid1_ItemDataBound"                AllowSorting="True" AllowPaging="True" PageSize="100" ShowGroupPanel="True" AutoGenerateColumns="false" AllowFilteringByColumn="false" OnNeedDataSource="RadGrid1_NeedDataSource1">                <MasterTableView GroupLoadMode="Client" TableLayout="Fixed" EnableGroupsExpandAll="false" DataKeyNames="FilingIdentifier" ShowHeader="false">                    <GroupByExpressions>                        <telerik:GridGroupByExpression>                            <SelectFields>                                <telerik:GridGroupByField HeaderValueSeparator=" " HeaderText=" " FieldName="Name"></telerik:GridGroupByField>                            </SelectFields>                            <GroupByFields>                                <telerik:GridGroupByField FieldName="Name" SortOrder="None"></telerik:GridGroupByField>                            </GroupByFields>                        </telerik:GridGroupByExpression>                    </GroupByExpressions>                    <Columns>                        <telerik:GridBoundColumn DataField="TaxYear" HeaderText="Year" UniqueName="TaxYear"></telerik:GridBoundColumn>                        <telerik:GridBoundColumn DataField="PreviousFiling" Visible="false" UniqueName="PreviousFiling"></telerik:GridBoundColumn>                        <telerik:GridBoundColumn DataField="ForwardFiling" Visible="false" UniqueName="ForwardFiling"></telerik:GridBoundColumn>                        <telerik:GridButtonColumn Text="Launch" UniqueName="lauchrow" CommandName="launchRow" ButtonType="PushButton" HeaderStyle-Width="70px"></telerik:GridButtonColumn>                        <telerik:GridButtonColumn Text="Add tax year" UniqueName="addTaxYear" CommandName="cf" ButtonType="PushButton" HeaderStyle-Width="110px"></telerik:GridButtonColumn>                    </Columns>                </MasterTableView>                <GroupingSettings />                <ClientSettings AllowDragToGroup="false">                    <Selecting AllowRowSelect="true" />                </ClientSettings>            </telerik:RadGrid>

 

 

Thanks

Charles
Top achievements
Rank 1
 answered on 24 Aug 2015
6 answers
200 views
            <telerik:RadTreeView ID="rtvQuickshop" 
                                 runat="server" 
                                 LoadingMessage="Loading ... " 
                                 CheckBoxes="true" 
                                 PersistLoadOnDemandNodes="false" 
                                 EnableViewState="false" 
                                 ShowLineImages="false" 
                                 EnableEmbeddedScripts="false" 
                                 OnNodeDataBound="rtvQuickshop_OnNodeDataBound" 
                                 OnClientNodeChecking="NodeChecking" 
                                 OnClientNodePopulating="NodePopulating" 
                                 Skin="Web20"
                <WebServiceSettings Path="~/QuickShop.asmx" Method="GetNodes" /> 
             
            </telerik:RadTreeView> 

I have the following RadTreeView and in the client NodeChecking event I have the following

function NodeChecking(sender, eventArgs) 
    var node = eventArgs.get_node(); 
    if(node.get_checked()) 
    { 
        node.set_text('<img src="/Images/Refreshing.gif" alt="Removing from basket, please wait..." class="qs_refresh" /> <span class="qs_normal">Removing from basket, please wait...</span>'); 
    } 
    else 
    { 
        node.set_text('<img src="/Images/Refreshing.gif" alt="Adding to basket, please wait..." class="qs_refresh" /> <span class="qs_normal">Adding to basket, please wait...</span>'); 
    } 

But node.set_text does not work??????????????????????????????????????
Ivan Danchev
Telerik team
 answered on 24 Aug 2015
3 answers
111 views

    I have an ASP form which includes a Menu in the master page. In the attached image you will see it as a mobile-mode control with the "burger", to the left of the page title "LulaVision".

 I have a problem with one page based on this master, which includes a databound Panel control.

 The menu expands, but contents appear behind the Panel control even after adjusting the z-order settings.

 I have pushed the Panel down by 100px so that you can see it expand, yet additional items render BELOW the Panel, which is contrary to the defined layering in z-order.

Looking for suggestions on how to fix.

 Using v2015.2.623.45

Ivan Danchev
Telerik team
 answered on 24 Aug 2015
4 answers
129 views
Is there a way to add a custom button to the ImageGalllery toolbar that calls a javascript function?
Cheri Verdend
Top achievements
Rank 1
 answered on 24 Aug 2015
7 answers
185 views
I have a RadGrid in a RadWindow.  On an iPad3 when it loads up the width of it jumps as if it's trying to make room for a scrollbar and then jumps back.  This happens several times a second and is quite annoying.  If you zoom or drag the page around at all the flickering stops, but it'd be better if it didn't do it at all.

It doesn't seem to happen to all grids, so before I go to the trouble of figuring out exactly what triggers it has anyone else seen the same issue?
Pavlina
Telerik team
 answered on 24 Aug 2015
1 answer
175 views
Dear Team,

 

I'm using RadDataPager inside a ListView. I need to reset the current page index to 1 in one specific scenario using javascript.

 

I'm using the below javascript code to reset the grid. but it is unable to find the DataPager Control. Please help on achieving the required functionality. 

var gridImages = $find("#<%=RadDataPagerLibraryVideos.ClientID %>");
gridImages.set_currentPageIndex(1);

 

ListView:

 
<telerik:RadListView CssClass="thumbnail" AllowPaging="true" ItemPlaceholderID="VideosHolder" runat="server" ID="LibraryVideoListView" DataKeyNames="AssetID" OnNeedDataSource="LibraryVideoListView_NeedDataSource" OnItemDataBound="LibraryVideoListView_ItemDataBound">
                          <LayoutTemplate>
                                     <fieldset id="LibraryVideoListView">
                                  <telerik:RadDataPager ID="RadDataPagerLibraryVideos" runat="server" PagedControlID="LibraryVideoListView"
                                      PageSize="15" OnPageIndexChanged="RadDataPagerLibraryVideos_PageIndexChanged">
                                      <Fields>
                                          <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                                          <telerik:RadDataPagerButtonField FieldType="Numeric" />
                                          <telerik:RadDataPagerButtonField FieldType="NextLast" />
                                          <telerik:RadDataPagerPageSizeField PageSizeText="Page size: " />
                                          <telerik:RadDataPagerGoToPageField CurrentPageText="Page: " TotalPageText="of" SubmitButtonText="Go"
                                              TextBoxWidth="15" />
                                          <telerik:RadDataPagerTemplatePageField>
                                              <PagerTemplate>
                                                  <div style="float: right">
                                                      <b>Items
                                                              <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>" />
                                                          to
                                                              <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# Container.Owner.StartRowIndex+Container.Owner.PageSize %>" />
                                                          of
                                                              <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
                                                          <br />
                                                      </b>
                                                  </div>
                                              </PagerTemplate>
                                          </telerik:RadDataPagerTemplatePageField>
                                      </Fields>
                                  </telerik:RadDataPager>
                              </fieldset>
                              <div class="horizontal-list center-block">
                                  <asp:Panel ID="VideosHolder" runat="server" />
                              </div>
                          </LayoutTemplate>
                          <ItemTemplate>
                              <div class="imgLibraryItem">
                                  <a href="#" class="videoSelected thumbnail has-hover" assetid='<%# Eval("AssetID") %>'>
                                      <asp:Image runat="server" ID="imgVideoThumbnail" CssClass="libraryImg" />
                                  </a>
                              </div>
                          </ItemTemplate>
                      </telerik:RadListView>

 

Thanks in Advance,

Phani

Eyup
Telerik team
 answered on 24 Aug 2015
3 answers
221 views

I am currently using the RadImageGallery to allow users to add pics for a failure report.  I am currently embedding the pictures within the project and creating an directory if needed.  However, I have found that these images get erased easily and I would like to just upload and pull the images directly from the database.  Basically store the images in the database.  Does RadImageGallery have the ability to upload images to the database in that format?  I

 

thanks

 

doug

Maria Ilieva
Telerik team
 answered on 24 Aug 2015
2 answers
130 views

Is there a client-side test to determine whether a page is contained within a RadWindow or not?

Sometimes, pages can be navigated to directly from the browser's address bar, showing content that is originally designed to be inside a RadWindow.

 If this were to happen, I would like to perform a test that determines if the page is contained within a RadWindow or not so that I can then decide how do show the page.

 Can anyone provide ideas/samples for this?

Stanimir
Telerik team
 answered on 24 Aug 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?