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

Dear Sir/Madam,

I am adding series programmatically. I want to give "Red" color to first series & "Green" to second. and Series should display on top of chart.like

1. Series_1      2. series_2  3. Series_3

code to add series is as follows:

// dtSource.Rows.Clear();

chart.ChartTitle.TextBlock.Text =

"Report Summary";

 

crtSeries =

new ChartSeries("Total");

 

chart.AddChartSeries(crtSeries);

crtSeries.Type =

ChartSeriesType.Bar;

 

 

//crtSeries.Appearance.FillStyle.MainColor = System.Drawing.Color.Red;

 

 

//crtSeries.Appearance.FillStyle.SecondColor = System.Drawing.Color.Red;

 

crtSeries.Appearance.LabelAppearance.LabelLocation = Telerik.Charting.Styles.

StyleSeriesItemLabel.ItemLabelLocation.Auto;

 

crtSeries =

new ChartSeries("Pending");

 

chart.AddChartSeries(crtSeries);

crtSeries.Type =

ChartSeriesType.Bar;

 

 

//crtSeries.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid;

 

 

//crtSeries.Appearance.FillStyle.SecondColor = System.Drawing.Color.Green;

 

crtSeries.Appearance.LabelAppearance.LabelLocation = Telerik.Charting.Styles.

StyleSeriesItemLabel.ItemLabelLocation.Auto;


please resolve ASAP..

 

Schlurk
Top achievements
Rank 2
 answered on 13 Oct 2009
1 answer
75 views
Hi

I have a problem with the setting ShowNavigationPane = false (I set this in Page_Init ,If i set it to true it all works fine)
In doing so, i get a problem with the viewstate when clicking the 'month' view tab, I think its because i am not setting a date at some point but i am unsure of what date i need to set it to ? Can you help ?

 protected void RadScheduler1_NavigationCommand(object sender, SchedulerNavigationCommandEventArgs e)  
    {  
 
        if (e.Command == SchedulerNavigationCommand.SwitchToDayView)  
        {  
            RadScheduler1.SelectedView = SchedulerViewType.DayView;  
            RadCalendar1.SelectedDate = e.SelectedDate.Date;  
        }  
        else  
        {  
 
            if (e.Command == SchedulerNavigationCommand.SwitchToWeekView)  
            {  
                RadScheduler1.SelectedView = SchedulerViewType.WeekView;  
                RadCalendar1.SelectedDate = e.SelectedDate.Date;  
            }  
            else  
            {  
 
                if (e.Command == SchedulerNavigationCommand.SwitchToMonthView)  
                {  
                    RadScheduler1.SelectedView = SchedulerViewType.MonthView; 
                        // I THINK THE PROBLEM IS THAT I NEED TO SET THE MONTHS DATE HERE, BUT AM NOT SURE IN WHAT FORMAT?                   
 
                }  
                else  
                {  
                    RadScheduler1.SelectedView = SchedulerViewType.DayView;  
                    RadCalendar1.SelectedDate = e.SelectedDate.Date;  
                }  
 
            }  
        }  
 
 
        datetimeFilter = e.SelectedDate.Date.ToShortDateString(); // this is used elsewhere in the page          
        BindData(); // binds data elsewhere  
 
          
    } 



The viewstate error i get is
Execution
Error

Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

Thanks for your help in this matter
Andrew
Top achievements
Rank 1
 answered on 13 Oct 2009
2 answers
218 views
Hi

We're using a Popup User control to edit items on a rad grid.  Everything is working fine.  However, we would like to a pass a parameter from the main page to the user control when the user clicks the select button which is not contained in the underlined dataset.

Is there an easy way to do this?

Thanks in advance.
Paul Mc
Top achievements
Rank 1
 answered on 13 Oct 2009
9 answers
451 views
Hi,

I have to parse FilterExpression string (grd.MasterTableView.FilterExpression), and I look for some pattern for this string.
I get Filter Expressions  like:
(iif(firstname == null, "", firstname).ToString().Contains("a"))



Now I use this pattern (Regex):
 .*\\(.*,.*,(.*)\\)\\..*\\.(.*)\\(\"(.*)\"\\)\\)

so I get column name, current filter function and input text.
But I'm not sure it'll be correct in all cases.

Please, help me to find valid pattern for FilterExpression.
Thanx

Katya
Top achievements
Rank 1
 answered on 13 Oct 2009
2 answers
1.0K+ views
I need to to a Rebind() when the Page is refreshed, but not when a new record is first inserted (I lose all of the "new" values if I do). What can I check on in order to perform the Rebind?

Particularly when the user clicks the "Refesh" button on the Grid.


Thanks
Greg
Greg Smith
Top achievements
Rank 1
 answered on 13 Oct 2009
1 answer
116 views
I have a page that is admittedly quite large. It has from 7-9 tabs depending on the settings and the data. I can't use the multipage load on demand because I need the user to be able to switch between tabs quickly because when they are on this screen they are on the phone with a customer and need to fill in data and/or answer questions quickly.

I use telerik controls for pretty much everything. There are many grids and even a editor control. Note that I've disabled the editor control to see if that is the issue and it isn't.

My issue is that once the page is downloaded it takes 10 seconds or so for all the javascript to finish their initialization. I do have some of my own javascript that leverages ASP.NET ajax to load components but my stuff is pretty small so I don't think it is my stuff. I think the issue is that I have so many controls on the page that all need to initialize themselves that it takes a long time.

I figured I'd post my issue here to see if there may be tips and tricks that I can leverage or, if not. to see if we can start a thread to see what can be done to make large pages load the javascript faster.

One thing that I've noticed is that it is orders of magnitude faster in Firefox. In fact, in Firefox it is really a non issue.
Sebastian
Telerik team
 answered on 13 Oct 2009
1 answer
196 views

Hi Support Team,

I am using RadControls for ASP.Net AJAX (v. 2009.2.826.35).  I have a RadSplitter control that is nested inside of a RadMultiPage control used by a RadTabStrip.  The splitter controls has two panes - a left pane, that has a fixed width in pixels, and a right pane that I want to fill all of the remaining area.  I have tried to set the height and width of the right pane in two ways: 1) by setting both the height and width to 100%, and 2) using the "Free Size" method, where the height and width are not specified in the RadPane and the splitter calculates the pane size based on what space is remaining after allocating space to absolutely-sized or percent-sized panes.

Either method works fine in Firefox (v3.0.14) and Chrome (v3.0.195.25).  However, in both IE6 and IE8, I get a javascript error, and the content in the right pane only occupies a small fraction of the total available space.  If I specify the height and width in pixels in IE, it works fine.

The markup for the first method (specifying by percent) is listed below. (The right panehas an ID="RightPane")

<body style="height:100%;margin:0px;width:100%;" > 
    <form id="Form1" runat="server" style="height:100%;margin:0px" > 
        <asp:ScriptManager ID="ScriptManager1" runat="server"/>  
          
        <div style="height:100%;margin:0px;width:100%;" > 
          
            <telerik:RadTabStrip ID="radTapStripMain" MultiPageID="radMultiPageMain" AutoPostBack="false" Width="100%" runat="server">  
                <Tabs> 
                    <telerik:RadTab Value="tabAdmin" Text="Admin" PageViewID="pvAdmin" Visible="true" runat="server" /> 
                </Tabs> 
            </telerik:RadTabStrip> 
 
            <telerik:RadMultiPage id="radMultiPageMain" runat="server" Height="100%" Width="100%">  
               <telerik:RadPageView  id="pvAdmin" runat="server" Visible="true" Height="100%" Width="100%">  
                    <telerik:radsplitter id="splitterLinksIndex" orientation="Vertical" Width="100%" Height="100%" HeightOffset="30" runat="server" > 
                      <telerik:radpane id="LeftPane" Width="200" MinWidth="100" MaxWidth="500" runat="server">  
                           <a href="http://www.telerik.com" target="<%= RightPane.ClientID %>">link</a> 
                      </telerik:radpane> 
                      <telerik:radsplitbar id="RadSplitBar1" collapsemode="Forward" runat="server"/>  
                      <telerik:radpane Scrolling="Y" id="RightPane" Width="100%" Height="100%" ContentUrl="http://www.microsoft.com" runat="server"></telerik:radpane> 
                    </telerik:radsplitter>       
                 </telerik:RadPageView >    
            </telerik:RadMultiPage> 
              
        </div> 
    </form> 
</body> 

If I look at the IFRAME that is generated by the page, it has a specified height and width in Firefox but not in IE:


Firefox:  
<iframe id="RAD_SPLITTER_PANE_EXT_CONTENT_RightPane" frameborder="0" scrolling="auto" name="RightPane" src="http://www.microsoft.com" style="border: 0px none ; height: 825px; width: 1055px;">  
 
IE6:  
<IFRAME id=RAD_SPLITTER_PANE_EXT_CONTENT_RightPane style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" name=RightPane src="http://www.microsoft.com" frameBorder=0></IFRAME> 
 

The javascript error that gets thrown in IE occurs in the line marked with asteriks in the following Telerik javascript function:

 function(g,f)  
 {  
    if(f<=0||f==""){  
        g.style.width="" 
    }     
    else 
    {  
***     g.style.width=f+"px";  
        var h=g.offsetWidth-f;  
        var e=f-h;  
        if(e>0)  
        {  
            g.style.width=e+"px" 
        }  
        else 
        {  
            g.style.width="" 
        }  
    }  
  } 

The error states the the variable "f" is NaN.  I get the same error if I specify the height and width by percent or by the "free size" method.

As an aside, if I remove the splitter from the RadMultiPage and RadTabStrip and put it by itself on the page, the IE javascript error disappears and I can set the width and height by percent with no problems.

Thank you for your assistance.  Please let me know if you need any further information.

Svetlina Anati
Telerik team
 answered on 13 Oct 2009
1 answer
112 views
In your load on demand example, imagine the following: You add a RadComboBox thats dynamically filled with say, flavors of one of the food items. When you choose one of the flavors, you want the control in the tooltip to reload so the picture and data correspond to that particular product flavor.

How do you set the new product # and then refresh the usercontrol inside the tooltip?
Svetlina Anati
Telerik team
 answered on 13 Oct 2009
2 answers
436 views
Hello,
I have a grid with Grouping enabled that is populated programatically, and during the ItemDataBound event, items that do not meet a certain criteria are set to Visible = False.
When the grid is rendered, there may be group headers that do not contain any items, if none of the items satisfied my criteria, so in those cases I need those groups to be hidden or removed. I only want the user to see and expand/collapse group headers that actually contain items within.

How can I do this?
Should I remove the items during ItemDataBound instead of setting them to Visible = False, so that no Group Header is generated? If so, what is the best way to do this?

Thanks in advance.
Jorge
Top achievements
Rank 1
 answered on 13 Oct 2009
1 answer
176 views
Hello,

i have a XMLDocument from Webservice and i will show this in a RadListBox Control. The XML Document:
<?xml version="1.0" encoding="utf-8" ?> 
<controls> 
  <control id="123" name="stream" text="stream1.wma" time="300" /> 
  <control id="9023" name="picture" text="bild1.jpg" time="800" /> 
  <control id="9023" name="picture" text="bild2.jpg" time="800" />     
...  
</controls> 

Can i load this in the RadListBox? Can i show this in two columns? I need the "name"-Tag for an icon (I have different icons for the different "name"-Tags) , the "text"-Tag and the "time"-Tag. Is that possible?

br
Reiner
Paul
Telerik team
 answered on 13 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?