Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
82 views

i have rad chart with the following sql datasource

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Cnn_StatisticsSql %>"
 SelectCommand="SELECT COUNT(Title) AS Title_Count,
 Title AS Account_Type,
 LEFT(BankingDate, 7) AS Date
 FROM Extracted.Sepordeh_EftetahShodeh
 WHERE LEFT(BankingDate, 4) IN ( '1388' )
 GROUP BY Title , LEFT(BankingDate, 7) ORDER BY 3 "></asp:SqlDataSource>
<telerik:RadChart ID="RadChart1" runat="server" AutoLayout="True" AutoTextWrap="True"
IntelligentLabelsEnabled="True" Width="945px" Height="285px" Skin="DeepBlue"
DataGroupColumn="Account_Type" DataSourceID="SqlDataSource1">
<Appearance>
<FillStyle FillType="ComplexGradient">
<FillSettings>
<ComplexGradient>
<telerik:GradientElement Color="26, 120, 179" />
<telerik:GradientElement Color="35, 189, 254" Position="0.5" />
<telerik:GradientElement Color="26, 120, 179" Position="1" />
</ComplexGradient>
</FillSettings>
</FillStyle>
<Border Color="0, 66, 110" Width="5" />
</Appearance>
<Series>
</Series>
<Legend Visible="False">
<Appearance Dimensions-Margins="1px, 2%, 12%, 1px" Visible="False">
<ItemTextAppearance TextProperties-Color="White">
</ItemTextAppearance>
<FillStyle GammaCorrection="False" MainColor="37, 255, 255, 255">
</FillStyle>
<Border Color="76, 255, 255, 255" />
</Appearance>
<TextBlock>
<Appearance Position-AlignedPosition="Top" TextProperties-Color="LightSkyBlue">
</Appearance>
</TextBlock>
</Legend>
<PlotArea>
<DataTable>
<Appearance Position-Auto="False" Position-X="0" Position-Y="0">
</Appearance>
</DataTable>
<EmptySeriesMessage Visible="True">
<Appearance Visible="True">
</Appearance>
</EmptySeriesMessage>
<XAxis AutoScale="False" DataLabelsColumn="Date" MaxValue="7" MinValue="1"
Step="1">
<Appearance Color="98, 183, 226" MajorTick-Color="98, 183, 226">
<MajorGridLines Color="98, 183, 226" Width="0" />
<TextAppearance TextProperties-Color="White">
</TextAppearance>
</Appearance>
<AxisLabel>
 <Appearance Dimensions-Paddings="1px, 1px, 10%, 1px">
 </Appearance>
 <TextBlock>
 <Appearance TextProperties-Color="LightSkyBlue">
 </Appearance>
 </TextBlock>
 </AxisLabel>
 </XAxis>
 <YAxis>
 <Appearance Color="98, 183, 226" MajorTick-Color="98, 183, 226"
MinorTick-Color="98, 183, 226">
 <MajorGridLines Color="120, 209, 248" />
 <MinorGridLines Color="120, 209, 248" Width="0" />
 <TextAppearance TextProperties-Color="White">
 </TextAppearance>
 </Appearance>
 <AxisLabel>
 <TextBlock>
 <Appearance TextProperties-Color="LightSkyBlue">
 </Appearance>
 </TextBlock>
 </AxisLabel>
 </YAxis>
 <Appearance Dimensions-Margins="19%, 90px, 12%, 9%">
 <FillStyle MainColor="50, 255, 255, 255" SecondColor="Transparent">
 </FillStyle>
 <Border Color="97, 180, 223" />
 </Appearance>
 </PlotArea>
 <ChartTitle>
 <Appearance Dimensions-Margins="4%, 10px, 14px, 6%">
 <FillStyle MainColor="">
 </FillStyle>
 </Appearance>
 <TextBlock>
 <Appearance TextProperties-Color="White" TextProperties-Font="Verdana, 14pt">
 </Appearance>
 </TextBlock>
 </ChartTitle>
 </telerik:RadChart>


I have sorted the chart by date. the problem is when there is no data for a specific date the bar chart is not left empty but it is filled with the next available data that belongs to the following dates.

Petar Marchev
Telerik team
 answered on 08 May 2012
0 answers
69 views
Hi Team,
I have been facing this problem for last 10 days i tried to find all the solution but failed.
My page is working fine in Internet explorer and Mozilla browsers but getting hanged in chrome and safari browsers when I deployed my application on azure 
even there is no  error in bug tracker .it is working fine in my  local PC with all browsers .

please tell me solution .

thanks.
Rohit
Top achievements
Rank 1
 asked on 08 May 2012
3 answers
118 views
Hi, when I edit my record I have the radupload component, however when it does the postback I want to get the current value of the selected grid row as this contains the id to be used for the file name. Could you assist on how I can get this information sent back as I found the the RadAsyncUpload1_FileUploaded gets called before the command method. thanks P
TonyG
Top achievements
Rank 1
 answered on 08 May 2012
1 answer
86 views
Hi,
I am using Visual Studio 2010 and i had installed  new "RadControls for ASP.NET AJAX Q1 2012 SP1"
and using "Telerik.Web.UI" version 2012.1.411.40
I created a .net application and added RadScriptManager , RadAjaxManager and RadScheduler
after i closed my .net project and reopens  
I saw designer errors  :
Error Creating Control - RadScriptManager1
Request is not availabe in this context

same thing for RadAjaxManager1 and RadScheduler1


here is my code
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="DepoView.WebForm1" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
      </telerik:RadScriptManager>
      <telerik:RadAjaxManager runat="Server" ID="RadAjaxManager1">
      </telerik:RadAjaxManager>
      <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
      <telerik:RadScheduler ID="RadScheduler1" runat="server">
      </telerik:RadScheduler>
    </div>
 </form>
</body>
</html>

Please find attached image
Venkata
Top achievements
Rank 1
 answered on 07 May 2012
1 answer
60 views
Hi,

I am currently working on a Media Library module for a CMS. Reading a folder in the file system I bind the results to a RadListView that has a PageSize of n (12 at the moment) in order to display its content: images.

DirectoryInfo di = new DirectoryInfo(MediaLibPath);
FileSystemInfo[] files = di.GetFiles();
var fileByUploadedDate = files.OrderByDescending(f => f.CreationTime);
ResourceLV.DataSource = files;
ResourceLV.DataBind();

In the RadDataPager I have a RadButton with the OnClick

ResourceLV.PageSize += 12;
ReloadResourceListView();

ReloadResourceListView() rebinds the ListView. Very similar to this sample:

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/customizingpager/defaultcs.aspx 


What I am trying to avoid is rebind every time as there could be hundreds of images in the folder being
read. Is it possible to have the PageSize increase sort of like google images search results.
What would your suggestion be? What about the PageSize from Grid, could that be emulated too?

Thanks






Tsvetina
Telerik team
 answered on 07 May 2012
1 answer
145 views
I have a Grid with AllowFilteringByColumn set to true. Each column in the grid has the filer textbox plus the drop down list of search options. The CurrentFilterFunction is set to 'Contains' and Autopostback is set to true. So users can enter a value and press enter which will do a 'contains' search on that column.
However there are two things that users keep trying to do that cause odd behaviour.
- They will enter a filter value in the FirstName column, then enter a value in the LastName column and press enter. Since enter is pressed while focus is on the LastName column, only that column is filtered and the FirstName filter disappears.
- The second scenario is that they will do a filter on FirstName and press enter, then after viewing the results will delete the filter on FirstName and then type a filter into LastName and press enter. When you do this the lastName filter is applied but the FirstName filter isn't checked so it reappears.
Is there a way to do multiple filters at once? I'm trying to handle the OnItemCommand event for the grid, then go through each column to see if there is a value in the textbox and then apply the filter manually there. However I'm stuck on how to generate the FilterExpression and how to check the which search option is selected (contains, startswith etc...)
Is this the correct direction or is there a better way to do this?
Tsvetina
Telerik team
 answered on 07 May 2012
6 answers
429 views

I'm using an older version of Telerik that doesn't have the ASP 4.0 fix and it's causing my grid control to throw an error when paging.  The error is:  Microsoft JScript runtime error: Object doesn't support property or method '_destroyTree'

I found a fix on these forums that works very well when used on a normal ASPX page... 

<script type="text/javascript">
$telerik.disposeElement = function (element) {
if (typeof (Sys.WebForms) == "undefined")
return;
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm && prm._destroyTree)
prm._destroyTree(element);
else if (Sys.Application.disposeElement)
Sys.Application.disposeElement(element, true);
};
Telerik.Web.UI.RadComboBox.prototype._removeDropDown = function () {
var slide = this.get_dropDownElement().parentNode;
slide.parentNode.removeChild(slide);
if (this._disposeChildElements)
$telerik.disposeElement(slide);
if (!$telerik.isSafari)
slide.outerHTML = null;
this._dropDownElement = null;
};
</script>


My problems is that I am using user controls on much of the site.  If I place this in the ASCX file, I get the same error as if I didn't have it there.  If I place it in the ASPX that the user control is added to, I get this error: Microsoft JScript runtime error: Unable to get value of the property 'prototype': object is null or undefined most likely because the user control with the grid isn't loaded yet.

I can place the script inside an IF statement... if (Telerik.Web.UI.RadComboBox != null) { } and that gets rid of the prototype error, but it acts like the script isn't there because I still get the original _destroyTree error.

Can someone tell me what I need to do in order to make this work inside a user control?  Here's the layout of my pages...

  • Master Page with update panel and placeholders.
    • Inside one placeholder, I have a sidebar where I have an accordion menu.
      • This placeholder is filled in with an ASPX page.
    • Inside the other placeholder, I have the main content area.
      • This placeholder is filled in with an ASCX user control based on what is clicked on the menu in the first placeholder.
      • Separate user controls are loaded dynamically based on the menu selection.
      • The user controls in this placeholder are where my grids are that need paging.

So what I need is to include the fix script in each user control that uses a grid so that I can page.  If it were possible to include it on the master page so I don't have to put it on every user control, or if I could put it on the ASPX page that is in the first placeholder and have it work even when a new user control is loaded, then that would be great.  But I don't mind including it in every user control if that is what's needed for this to work.  I can also include a .JS file if that is what's needed.  Keep in mind that these are inside an update panel, so the postback will be asynchronous in case that matters.

Any help would be greatly appreciated.  It was decided that we wouldn't be updating Telerik, so I'm stuck with trying to make this work with just the script fix.  This is really the only issue I'm having with Telerik and 4.0 with our site, so there isn't enough incentive to buy a newer version.

Just as a reminder, the script above works perfectly when used on a normal ASPX page that has the grid right on it rather than the grid being on a user control that is loaded later.

Jeremy
Top achievements
Rank 1
 answered on 07 May 2012
5 answers
239 views
Hi,

We are using latest version of Teleriks. I want to change the question icon to my own icon on RadConfirm window.

Please note: Telerik.Web.UI.dll is referenced and we are not using skin folder in the root directory of the application

Need a solution to change the icon with out changing in xml file.

Thanks
Sreenivas.
L
Top achievements
Rank 1
 answered on 07 May 2012
5 answers
163 views
Hi,
I am new to telerik grid.
This is what I am trying to do.   I want to place a combo box or drop down box in a cell of a grid.  however, the grid is only being populated in the codebehind.
>>

 

List<KI_Controls.KI_Multimedia> oPrimaryMM = oPrimaryContact.GetAllMultimedia();

BindingList<cKIWebMultiMediaContent> Populatelist = new BindingList<cKIWebMultiMediaContent>();

 

 

 

for (int i = 0; i < oPrimaryMM.Count; i++)

{

 

 

cKIWebMultiMediaContent otemp = new cKIWebMultiMediaContent();

otemp.MultiMediaType = oPrimaryMM[i].Multimedia_Type;

otemp.MultiMediaText = oPrimaryMM[i].Value;

Populatelist.Add(otemp);

}

gridMainMultimedia.DataSource = Populatelist;


So this automatically creates 2 columns. MultiMediaType and MultiMediaText.

I want to make the MultiMediaType a dropdown and load it manually.

I see you have a lot of samples using datasources and design time binding.  Do you have a simple dropdown grid example which all is unbound?
Richard
Top achievements
Rank 1
 answered on 07 May 2012
6 answers
259 views
Hi,

I am using the Telerik Scheduler on my site. At the moment, I am doing local testing. My

The server method getresources failed
The server method getappointments failed

Now I am using WCF. I have the service interface and implementation in the website project and my .svc file points to this service (path is fine).

My service implementation looks like this:

  [ServiceContract(Namespace = "")] 
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] 
    [ServiceBehavior(IncludeExceptionDetailInFaults = true)] 
    public class Scheduler 
    { 
        private WebServiceAppointmentController _controller; 
 
        private WebServiceAppointmentController Controller 
        { 
            get 
            { 
                if (_controller == null) 
                { 
                    _controller = 
                        new WebServiceAppointmentController( 
                            new XmlSchedulerProvider(HttpContext.Current.Server.MapPath("~/Content/Schedule.xml"), 
                                                     false)); 
                } 
                return _controller; 
            } 
        } 
 
        [OperationContract] 
        public IEnumerable<AppointmentData> GetAppointments(SchedulerInfo schedulerInfo) 
        { 
            return Controller.GetAppointments(schedulerInfo); 
        } 
 
        [OperationContract] 
        public IEnumerable<AppointmentData> InsertAppointment(SchedulerInfo schedulerInfo, AppointmentData appointmentData) 
        { 
            return Controller.InsertAppointment(schedulerInfo, appointmentData); 
        } 
 
        [OperationContract] 
        public IEnumerable<AppointmentData> UpdateAppointment(SchedulerInfo schedulerInfo, AppointmentData appointmentData) 
        { 
            return Controller.UpdateAppointment(schedulerInfo, appointmentData); 
        } 
 
        [OperationContract] 
        public IEnumerable<AppointmentData> CreateRecurrenceException(SchedulerInfo schedulerInfo, 
                                                                      AppointmentData recurrenceExceptionData) 
        { 
            return Controller.CreateRecurrenceException(schedulerInfo, recurrenceExceptionData); 
        } 
 
 
        [OperationContract] 
        public IEnumerable<ResourceData> GetResources(SchedulerInfo schedulerInfo) 
        { 
            return Controller.GetResources(schedulerInfo); 
        } 
 
    } 


And the aspx:

      <telerik:RadScheduler ID="RadScheduler1" runat="server" Skin="Black" Visible="true" SelectedDate="2009-02-02" 
                        Width="1043px"
                    <Localization AdvancedAllDayEvent="All day"></Localization> 
                    <AdvancedForm DateFormat="dd/MM/yyyy" TimeFormat="HH:mm"></AdvancedForm> 
                    <WebServiceSettings Path="Service.svc" /> 
                    </telerik:RadScheduler> 

These errors appear even if I press the buttons on the control.

What am I missing?


PPT
Top achievements
Rank 1
 answered on 07 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?