Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
57 views

Hello!

 

Is there a possibility to scroll list od items inside radmenu by more elements than just 1? My goal is to move all visible elements.

eg: I have 30 elements, but window width allows me to show only 10, so after clicking on the arrow I would like elements from 11 to 20 to be shown.
Thanks for all the answers!

Arkadiusz
Top achievements
Rank 1
 answered on 23 Jan 2017
4 answers
253 views

Hello,

When I use async upload with the image manager, the file is correctly uploaded to the folder but when it try to see the image, I have an error : "Unauthorized: Access is denied due to invalid credentials".
My folder has this permission :
IUSR

  • Read & Execute
  • List Folder Contents
  • Read

But the uploaded image has not IUSR in the security tab. If I add IUSR user with read permission, it works.

 

When I use classic upload, the image is correctly uploaded and I have no error.
And the uploaded image has IUSR in the security tab.

Any idea why I have this bug ?

 

Rumen
Telerik team
 answered on 23 Jan 2017
1 answer
426 views

Hello,

I am creating htmlCharts dynamically from server side and trying to put a tooltip which shows both x and y axis values in the tooltip label.

As everything is dynamic, I can only code from the server side. I tried using

areaSeries.TooltipsAppearance.DataFormatString = "{0}% FCI in {1}Year";

but it looks like that we can't use {1} for areaSeries.

Then I tried using clientTemplate following the demo:

http://demos.telerik.com/aspnet-ajax/htmlchart/examples/functionality/clienttemplates/defaultcs.aspx

http://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/functionality/clienttemplate/overview

but none of these tell how to code purely from server side. I am pasting my concerned code for better insight

//To create chart

RadHtmlChart htmlChartACIOverStudyPeriod = CreateHtmlChart("Year", "FCI", "%");
htmlChartACIOverStudyPeriod.ChartTitle.Text = "FCI Over Study Period";
htmlChartACIOverStudyPeriod.ID = "rhcFCIOverStudyPeriod";
//To clear the plotarea and xaxis for the chart
htmlChartACIOverStudyPeriod.PlotArea.XAxis.Items.Clear();

htmlChartACIOverStudyPeriod.PlotArea.Series.Clear();
 //To check if datatable has some value for selected agency and facility
if (dtCurEstTotalOverStudyPeriod.Rows.Count > 0)
{
  int rowCount = 0;
  ColumnSeries columnSeries = new ColumnSeries();
  columnSeries.LabelsAppearance.Visible = false;

  //  columnSeries.TooltipsAppearance.DataFormatString = "{0}% FCI in {1}Year";
  columnSeries.TooltipsAppearance.ClientTemplate = " #=dataItem.CurEstTotal#  justForTest";


  for (Int32 intCurrent = intFiscalYear; intCurrent <= intMaxYear; intCurrent++)
  {
    htmlChartACIOverStudyPeriod.PlotArea.XAxis.Items.Add(new AxisItem(intCurrent.ToString()));
  decimal ACI = 0;
  CategorySeriesItem categorySeriesItem = new CategorySeriesItem();
    //to check if row in the table exists
   if (rowCount < dtCurEstTotalOverStudyPeriod.Rows.Count)
  {
    if (dtCurEstTotalOverStudyPeriod.Rows[rowCount]["AnoFiscalYear"].Equals(intCurrent))
      {
     //To plot the y-axis
        ACI = (Convert.ToDecimal(dtCurEstTotalOverStudyPeriod.Rows[rowCount]["CurEstTotal"]) / CurEstReplOverStudyPeriod) * 100;
        rowCount++;
          }
        else
          {
          ACI = 0;
          }
   categorySeriesItem.Y = Math.Round(ACI, 3);
   columnSeries.SeriesItems.Add(categorySeriesItem);
   }
  }
 htmlChartACIOverStudyPeriod.PlotArea.Series.Add(columnSeries);   
}
dockA2.ContentContainer.Controls.Add(htmlChartACIOverStudyPeriod);

 

this results into attached snapshot. Please help me to get x-axis value in the tooltip of ColumnChart.

 

Thnaks,

Somya

Stamo Gochev
Telerik team
 answered on 23 Jan 2017
1 answer
601 views

Hi,

I have a radgrid with a lazy load method to handle the binding. The binding is done via a button's CustomParameter that, when it's clicked, provides the parameters for the query that populates the grid. Problem is: the Grid's NeedDataSource is triggered before the rebind call on the button's click event and messes up the whole thing.

Here is the grid NeedDataSource, where the 'bind' variable is to prevent the call when first accessing the page

protected void Quotas_Table_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
                if (bind && Session["SessionId"] != null)
                {
                    Quotas_Table.DataSource = Empresas_DAL.GetQuotasList((string)Session["TP_QT_" + (string)Session["SessionId"]], int.Parse((string)Session["PRD_QT_" + (string)Session["SessionId"]]), DateTime.Now.Year);
                }
        }

 

and here is the button's event, where all variables here are strings:

protected void Compilar_Click(object sender, EventArgs e)
        {
            LinkButton lnk = sender as LinkButton;
            string param = lnk.Attributes["CustomParameter"];
 
            tipo = param.Substring(0, 1);
            periodo = param.Substring(1);
 
            Session["TP_QT_" + (string)Session["SessionId"]] = tipo;
            Session["PRD_QT_" + (string)Session["SessionId"]] = periodo;
 
            bind = true;
            Quotas_Table.Rebind();
        }
Konstantin Dikov
Telerik team
 answered on 23 Jan 2017
1 answer
102 views

Hi

Is it possible to change in the code behind the order for statically created panels?

The only way I can think of doing it is to create each panel as a user control, and dynamically add them.

 

Andy

 

 

Ivan Danchev
Telerik team
 answered on 23 Jan 2017
4 answers
182 views
Hello Telerik Team,

I am getting one error in javascript displaying as "OnClientClose " is undefined.

Below are the steps.
1) I am opening a popup through the below code:

 

 

 

 

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" VisibleStatusbar="false" >
<Windows >
<telerik:RadWindow ID="TaskList" runat="server" Title="TaskList" modal="true" 
OnClientClose="OnClientClose"></telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>


//Call a javacript code 
  
<script type="text/javascript">
function OnClientClose(oWnd, args)  
        oWnd.setUrl("XYZ.aspx"); 
}
</script>
Till here its no problem it works perfectly, but as soon as I put this line of of code in javascript shown below
< src="../../includes/validate.js">

It fires the above message saying OnClientClose is undefined on status bar of IE.
If removed the above line again it works perfectly.

Can anyone Please suggest any solution for this.

Regards
Sudhakar

 

 

 



 

Season
Top achievements
Rank 1
 answered on 20 Jan 2017
12 answers
1.3K+ views
Hi,
I have a column StartDate type Datetime. But when i click on column header for sorting it is not sorting properly in acs or desc. it is showing sorting only on month part of date
Like
08/21/2012
07/21/2014
06/26/2013
06/26/2013
It is in descending order but it is wrong.

<telerik:GridBoundColumn DataField="StartDate" HeaderText="Start Date" SortExpression="StartDate" DataType="System.DateTime"
UniqueName="StartDate"DataFormatString="{0:MM/dd/yyyy}" ReadOnly="true"
 ItemStyle-Width="80px" HeaderStyle-Width="80px">
</telerik:GridBoundColumn>
I have tried this http://www.telerik.com/community/forums/aspnet-ajax/grid/sort-the-date-column-in-radgrid-on-clicking-of-the-header.aspx but still no success. Please find screen shot of problem.
Viktor Tachev
Telerik team
 answered on 20 Jan 2017
4 answers
300 views

Hello,

I have a bar chart (attached) the labels need to be moved outside the chart on the left so they are not covering the bars.

I have seen this as an issue going back to 2012 in the forums.. Its 2017 so I cant imagine this is still an issue.

If it is still an issue what is the work around? Is there a hack? I looked to see if I could use CSS but it does not seem so.

I tried AxisCrossingValue... it moves the bars so they don't line up with the correct X-Axis Labels... so that does not work.

 

I really need this to work.

Thanks,

Charles

 

Stamo Gochev
Telerik team
 answered on 20 Jan 2017
2 answers
248 views

I have a RadAsyncUpload somewhere on a page and a RadGrid in the same page.The RadGrid has a column for every row that is a LinkButton which executes a grid ItemCommand. The ItemCommand fetches the ID associated to the row and stores it in a session variable. I want the item command to also then bring up the RadAsyncUpload window so the user could select files.

 

The way I tried to achieve this so far is by calling a javascript function which finds the RadAsyncUpload control and performs a button click. This does not happen after postback, however. 

 

It is crucial to me that each file I upload is associated with a row ID. Is there a way I can achieve this scenario or am I limited by the RadAsyncUpload controls functionality?

Ivan Danchev
Telerik team
 answered on 20 Jan 2017
0 answers
147 views

I am trying to change the background colors of individual bars to red and green

TryCast(RadHtmlChart1.PlotArea.Series(0), BarSeries).SeriesItems(0).BackgroundColor = System.Drawing.Color.Red.

Chart works great and I am binding to a datatable

RadHtmlChart1.DataSource = DifferenceDT
RadHtmlChart1.DataBind()

 

The error is on SeriesItems (Out of Range) and count is 0 when I inspect. 

Am I  doing something wrong?

Here is my .aspx code

<telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" Style="width: 100%; height: 98%;">
    <PlotArea>
        <Series>
            <telerik:BarSeries DataFieldY="Count" Name="Count" >
                <LabelsAppearance>
                    <TextStyle Color="White" />
                </LabelsAppearance>
            </telerik:BarSeries>
        </Series>
        <XAxis DataLabelsField="Name"  >
            <LabelsAppearance>
                <TextStyle Color="White" />
            </LabelsAppearance>
            <MinorGridLines Visible="false" />
        </XAxis>
        <YAxis AxisCrossingValue="0" Step="1"  >
            <MinorGridLines Visible="false" />
            <LabelsAppearance>
                <TextStyle Color="Blue" />
            </LabelsAppearance>
        </YAxis>
    </PlotArea>
</telerik:RadHtmlChart>
Charles
Top achievements
Rank 1
 asked on 19 Jan 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?