Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
86 views
Hello Team,

can you please provide me sample/example/demo where i can do multiple selection with rad toolbar items. Also can you suggest what control can be used instead of toolbar which supports multiple selections.

Thanks

Mukesh
Kate
Telerik team
 answered on 16 Jun 2011
1 answer
60 views
hi
i use RadDatePicker in column  of gird . this grid has multiple columns so there is scrolling to see all columns of it
when mouse over RadDatePicker scrolling disappear  and i can't see some columns of grid ....

why scroll disappear ? ?

thanks
Eman 
O'Man
Top achievements
Rank 1
 answered on 16 Jun 2011
1 answer
63 views
Hello ,

can you please provide me  the example how can work multiple selection with rad toolbar items. Also can you suggest me which control can be used instead of toolbar which supports multiple selections.

Thanks

Shiv Kishor
Dimitar Terziev
Telerik team
 answered on 16 Jun 2011
11 answers
423 views
Hi Telerik Team

I have a RadGrid which is fetching data from a DataTable and uses OnNeedDataSource event for databinding. The columns are generated dynamically at runtime based on data from DataTable.
One of the columns of the RadGrid requires a hyperlink to the text displayed. I achieved this in ItemDataBound event where in I added a Hyperlink control to the cell.
This works fine.
But when the page postback occurs due to a change in server-side drop-down outside the Telerik RadGrid, the hyperlinks are not retained.
After page postback occurs, the hyperlinks are gone and data is displayed as plain text instead of hyperlinks.

One of the resolutions I tried is to ReBind() the RadGrid in PreRender event. But after doing that, Export To Excel functionality gives a problem. It gives excel file with an extra cell wherein where in I get custom-added URLS and images which is not expected. I also added IgnorePaging=true and ExportOnlyData=true for the same.

Please provide a resolution for the issue of retaining hyperlinks without affecting the functionality of Export to Excel.
unnati
Top achievements
Rank 1
 answered on 16 Jun 2011
2 answers
112 views
I've not used the charting controls before and have been playing with them today as it looks like we'll need to start using them soon.

All I want to do is display the chart minus any of the titles and legends etc and am having trouble getting the ASP.Net version of the control to sit nicely in the border of the chart, but this seemed fairly easy to do in the WinForms control simply by hiding the legend and the chart title. I tried this in the ASP.Net version but it doesn;t appear to work.

I've attached a couple of images to show what I mean. I would like my chart to appear like the Winforms image below (note the uniform padding/margin around the chart) in my ASP.Net pages, but as you can see, this uniform spacing is lacking in the ASP.Net control.

I've also attached my code so you can see how I have generated the ASP.Net charts and hopefully someone will show me how to correctly set the appearance of my ASP.Net chart.

Thanks.
<telerik:RadChart ID="TestRadChart" runat="server" Width="465px" Height="200px" 
    Legend-Visible="False" ChartTitle-Visible="False" DefaultType="Line" 
    Skin="Default" >
</telerik:RadChart>

protected void Page_Load(object sender, EventArgs e)
{
    Random random = new Random((int)DateTime.Now.Ticks);
    int testValue;
    ChartSeriesItem seriesItem;
    ChartSeriesItemsCollection series1Items = new ChartSeriesItemsCollection();
    ChartSeriesItemsCollection series2Items = new ChartSeriesItemsCollection();
    for (int i = 0; i < 20; i++)
    {
        testValue = random.Next(0, 10);
        seriesItem = new ChartSeriesItem(testValue, (i+1).ToString());
        series1Items.Add(seriesItem);
    }
    for (int i = 0; i < 20; i++)
    {
        testValue = random.Next(0, 10);
        seriesItem = new ChartSeriesItem(testValue, (i + 1).ToString());
        series2Items.Add(seriesItem);
    }
    ChartSeries chartSeries1 = new ChartSeries();
    chartSeries1.Items.AddRange(series1Items);
    chartSeries1.Appearance.TextAppearance.Visible = false;
    chartSeries1.Type = ChartSeriesType.Line;
    chartSeries1.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.Nothing;
    ChartSeries chartSeries2 = new ChartSeries();
    chartSeries2.Items.AddRange(series2Items);
    chartSeries2.Appearance.TextAppearance.Visible = false;
    chartSeries2.Type = ChartSeriesType.Line;
    chartSeries2.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.Nothing;
    TestRadChart.Series.Add(chartSeries1);
    TestRadChart.Series.Add(chartSeries2);
    TestRadChart.Legend.Visible = false;
      
}
Karl
Top achievements
Rank 1
 answered on 16 Jun 2011
15 answers
209 views
Ive been following the example in the help files for placing the submit button in the upload div and put the following javascrip in the page, when I load the page I get this error

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
<script type="text/javascript">  
function pageLoad()  
{  
   var upload = $find("<%= RadUpload1.ClientID %>");     
   var uploaduploadDiv = upload.get_element();  
     
   var input = document.createElement("input");  
   input.type = "submit";  
   input.className = "ruButton";  
   input.value = "Submit";  
   inputinput.id = input.name = upload.getID("submit");  
     
   //the UL element of the upload  
   var ul = uploadDiv.getElementsByTagName("UL");  
   //the array of all LI elements of the UL element  
   var LIs = ul[0].getElementsByTagName("LI");  
   //Last LI item - the button area  
   var lastLi = LIs[LIs.length - 1];  
   lastLi.appendChild(input);     
}  
</script>   
Genady Sergeev
Telerik team
 answered on 16 Jun 2011
5 answers
679 views

I have the scenario below:

 ...... inside a RadPanelBar
                <telerik:RadPanelItem Value="SubLocations" Text="Sub Locations" Expanded="true" CssClass="subPanel">  
                    <ItemTemplate> 
                    </ItemTemplate> 
                </telerik:RadPanelItem> 

I want to fill the content of ItemTemplate with a User Control which is decided at runtime. e.g. programatically.

I have tried creating a class derived from ITemplate. e.g. MyTemplateClass. I have overriden the InstantiateIn sub and added my control

    Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements System.Web.UI.ITemplate.InstantiateIn  
 
        Dim locationsTree As SystemExplorerLocationsTree = _  
                DirectCast(m_Page.LoadControl("~/IpscObject/GUI/SystemExplorer/SystemExplorerLocationsTree.ascx"), SystemExplorerLocationsTree)  
 
        container.Controls.Add(locationsTree)  
 
    End Sub 
 


On the aspx's Page_Init handler. I set RadPanelBar.ItemTemplate to a new instance of MyTemplateClass

locationsPanel.ItemTemplate = new MyTemplateClass() 


However, the InstantiateIn function is not called. What am I doing wrong?

Thanks,
Martin


Kate
Telerik team
 answered on 16 Jun 2011
1 answer
101 views
Hi.

I have some folders in my solution such as UserAccount, Admin, etc.
I bind rotator to XmlDataSource, but when I'm not in site root (ex: MySiteName/Admin/Default.aspx) rotator does not work.
Here is the code:

 

 

 

 

<telerik:RadRotator ID="RadRotator1" runat="server" Height="150px"
  ItemHeight="150px" ItemWidth="600px" ScrollDirection="Up" ScrollDuration="4000" 
  Width="600px" DataSourceID="XmlDataSource1">
  <ItemTemplate>
    <div>
      <a href="<%# XPath("href") %>">
        <img src="IMG/<%# XPath("filename") %>" alt="IMG/<%# XPath("filename") %>" style="border: 0px;"/>
      </a>
    </div>
  </ItemTemplate>
</telerik:RadRotator>
</div>
<asp:XmlDataSource ID="XmlDataSource1" runat="server" 
  DataFile="~/Banners.xml" ></asp:XmlDataSource>

 

 

 

Mazdak
Top achievements
Rank 1
 answered on 16 Jun 2011
3 answers
150 views
Hi,

I have a grid which use popup edit mode and set the popup at the center of the screen(http://www.telerik.com/help/aspnet-ajax/grid-center-popup-edit-form.html). Inside the grid, I also included a cascading dropdown in the edit form with ajax postback.

The problem that I am facing now is as below
1) I open edit form  and the popup edit form open at the center of the screen as expected.
2) I manually align it to the right of the screen.
3) Then I selected cascading drop down list and the edit popup screen went back to center again.

How can prevent from going back to center once I align to other area?

Thanks
Marin
Telerik team
 answered on 16 Jun 2011
4 answers
130 views
Hi,

I am putting a "RadDateTimePicker" on a page, and I am also setting the MinDate and MaxDate to DateTime.MinValue and DateTime.MaxValue. After doing all these settings, I am able to select date less than 1980(default MinDate for RadDateTimePicker.) and it is saving fine. But I am selecting the date with year greater than 2100, it is giving warning icon on the UI. Though it is saving. Please see the screenshot attached.

I checked following post, and telerik's demo that is attached with the same is working.
http://www.telerik.com/community/forums/aspnet/calendar/raddatepicker-not-taking-the-value-from-kebord.aspx

Then I checked the dll versions, in which I found that it is working with version no. = "2010.2.826.40"  but we are having dll with version no. = "2009.02.0701.20", which we cannot change currently.

So is there any work-around for fixing this issue?

The code is as following:
.aspx code
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RADDateTimePicker_Telerik_Post.aspx.cs" Inherits="TelerikPlayGround.RADDateTimePicker_Telerik_Post" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>   
        <telerik:RadDateTimePicker ID="dateTimePicker" runat="server"  >
        </telerik:RadDateTimePicker>
        <asp:Button runat = "server" ID= "btnOK" OnClick="btnOK_Click" Text = "OK" />
        <br /> Control value : <asp:Label runat="server" ID="lblDate" Text=""></asp:Label>
    </div>
    </form>
</body>
</html>


.cs code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
namespace TelerikPlayGround
{
    public partial class RADDateTimePicker_Telerik_Post : System.Web.UI.Page
    {
        protected void Page_Load( object sender, EventArgs e )
        {
            if ( !Page.IsPostBack )
            {
                this.dateTimePicker.MinDate = DateTime.MinValue;
                this.dateTimePicker.MaxDate = DateTime.MaxValue;
            }
        }
 
        protected void btnOK_Click( object sender, EventArgs e )
        {
            this.lblDate.Text = this.dateTimePicker.SelectedDate.ToString();
        }
    }
}

web.config file

<?xml version="1.0"?>
 
<!--
  For more information on how to configure your ASP.NET application, please visit
  -->
 
<configuration>
   
 
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
 
 
    <httpHandlers>
      <add verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" />
 
      <add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI" validate="false" />
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI" validate="false" />
 
      <add verb="*" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />
      <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false" />
 
    </httpHandlers>
  </system.web>
 
  <system.webServer>
     <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
</configuration>

Waiting for a quick reply.
Maria Ilieva
Telerik team
 answered on 16 Jun 2011
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?