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

Hello,
i'm trying to programmatically create a chart in VB. (this is my first time working with RadCharts)
My issue is:
When i assign a data source to the chart, it seems that its assumed that all data columns need to be made into their own Series.
I'm using a SQL stored procedure that produces 16 different columns & I only need to use 5 of them...the other 11 can be left alone.
How do I best go about doing that?
When i tried defining just the Series's that i needed, it just added them to the other 16 Series that were created automaticly.

I've included the relevant code below. Thanks.

 

 

 

 

Protected Sub Loader(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
 
        Dim sqlDataSource As New SqlDataSource()  
        sqlDataSource.ID = "myDataSource" 
        sqlDataSource.ConnectionString = "xxxxxxxxxxxxxxxxxxxxxxx" 
 
        sqlDataSource.SelectCommandType = SqlDataSourceCommandType.StoredProcedure  
        sqlDataSource.SelectCommand = "Analyze_SLA" 
        Me.Page.Controls.Add(sqlDataSource)  
        RadChart1.DataSourceID = "myDataSource" 
 
        RadChart1.Skin = "Colorful" 
        RadChart1.ChartTitle.TextBlock.Text = "Test Chart" 
        RadChart1.DefaultType = Telerik.Charting.ChartSeriesType.Area  
        RadChart1.AutoLayout = True 
 
        Dim chartSeries1 As New ChartSeries()  
        chartSeries1.Name = "Total Count" 
        chartSeries1.Type = ChartSeriesType.Area  
        chartSeries1.DataYColumn = "The_Count" 
        RadChart1.Series.Add(chartSeries1)  
 
        Dim chartSeries2 As New ChartSeries()  
        chartSeries2.Name = "Two" 
        chartSeries2.Type = ChartSeriesType.Area  
        chartSeries1.DataYColumn = "Issue2" 
        RadChart1.Series.Add(chartSeries2)  
 
 
        Dim chartSeries3 As New ChartSeries()  
        chartSeries3.Name = "Three" 
        chartSeries3.Type = ChartSeriesType.Area  
        RadChart1.Series.Add(chartSeries3)  
 
 
        RadChart1.DataBind()  
        Me.Page.Controls.Add(RadChart1)  
    End Sub 

 

 

Schlurk
Top achievements
Rank 2
 answered on 02 Dec 2009
0 answers
136 views

Requirements

RadControls version

2009_2_1028

.NET version

3.5

Visual Studio version

2008

programming language

VB

browser support

all browsers supported by RadControls


PROJECT DESCRIPTION
Several persons, including me, were asking in the forum how to export multiple grids displayed in the view to a single Excel worksheet.  Daniel presented a trivial example that was not practical, but it did serve as the foundation of the code I developed the following day.  My requirement was to aggregate all the data displayed in a webform and export it to Excel.  The data consists of 4 HTML tables dynamically populated by ASP labels in the code-behind, and 4 different RadGrids, each one displaying a dataset from a different database table having different schemas.  To accomplish this, I stuck a skeleton radGrid tag on the webform and wrote 2 essential methods in the code-behind (2 others are just the Excel formatting methods).  I have attached list_LIN_detail.aspx (see the radgrid tag at the bottom under the export button) and list_LIN_detail.aspx.vb (see the methods towards the end of the code obviously commented for this subject).  The Excel column headers are the radGrid's unique names.

One caveat: there is a bug that throws an IllegalOperationException when ASP label text is nothing and it needs to be cast to an integer.  No big deal.
Mark Galbreath
Top achievements
Rank 2
 asked on 02 Dec 2009
6 answers
578 views
Hello,

I am browsing the documentation and I am unable to find the complete list of tools.
Is it somewhere ?

May be a table associated with version ?

Thanks
CS
CSurieux
Top achievements
Rank 2
 answered on 02 Dec 2009
1 answer
316 views
Hi,

I'd like to know if it's possible to change the background colour of the "Resource Header Template" in Timeline view if grouped by Resource. I'd like to be able to set the colour on a per resource basis (e.g. making use of the ResourceHeaderCreated).

I've used the following to change the contents of the text within column headers, but haven't had much luck setting background colour yet...

Example:

Two resources - Tim and Bob. Tim's resource background is Blue, Bob's is green.

Code so far (see 'green' div background that needs to be settable)

<telerik:RadScheduler ID="RadScheduler1" runat="server"
       
GroupBy="Room"        
       
onresourceheadercreated="RadScheduler1_ResourceHeaderCreated">
       
<ResourceHeaderTemplate>
         
<div style="background:green">
           
<asp:Label ID="ResourceLabel" runat="server" Text="Label"></asp:Label>
         
</div>
       
</ResourceHeaderTemplate>
</
telerik:RadScheduler>

protected void RadScheduler1_ResourceHeaderCreated(object sender, Telerik.Web.UI.ResourceHeaderCreatedEventArgs e)
   {
       ((Label)e.Container.FindControl(
"ResourceLabel")).Text = e.Container.Resource.Text;
   }

Cheers,

Paul




Paul Aikman
Top achievements
Rank 1
 answered on 02 Dec 2009
4 answers
349 views

I have a RadGrid on a website where selecting a row triggers a database look-up and a post-back.  When the page refreshes, the row does not appear selected, although the data is retrieved.  We can see the row being selected before the post-back completes.  I've looked at the Grid "Accessing Cells and Rows" demo and I think this may work for my situation, but I have not been able to set the row background from this example.  Anyone have ideas on this?  Any help would be appreciated. More details appear below:

(ASPX)

<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True"   
    AllowPaging="True" DataSourceID="LoggerDS" GridLines="None" > 
    <HeaderContextMenu> 
        <CollapseAnimation Type="OutQuint" Duration="200">  
        </CollapseAnimation> 
    </HeaderContextMenu> 
    <PagerStyle Mode="NextPrevAndNumeric" /> 
    <MasterTableView autogeneratecolumns="False" datasourceid="LoggerDS" CommandItemDisplay="Top" HorizontalAlign="Center">  
        <RowIndicatorColumn> 
            <HeaderStyle Width="20px"></HeaderStyle> 
        </RowIndicatorColumn> 
        <ExpandCollapseColumn> 
            <HeaderStyle Width="20px"></HeaderStyle> 
        </ExpandCollapseColumn> 
        <Columns> 
            <telerik:GridBoundColumn DataField="MDate" DataType="System.DateTime" ItemStyle-HorizontalAlign="Center" 
                HeaderText="Date" SortExpression="MDate" UniqueName="MDate">  
                <ItemStyle HorizontalAlign="Center"></ItemStyle> 
            </telerik:GridBoundColumn>        
            <telerik:GridBoundColumn DataField="CallID" DataType="System.Int32" ItemStyle-HorizontalAlign="Center" 
                HeaderText="Call ID" SortExpression="CallID" UniqueName="CallID" Display="False">  
                <ItemStyle HorizontalAlign="Center"></ItemStyle> 
            </telerik:GridBoundColumn> 
...  
        </Columns> 
        <PagerStyle Mode="NextPrevAndNumeric" /> 
        <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"   
            Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center"   
            Wrap="True" /> 
       
            <CommandItemTemplate> 
                <asp:Button ID="SelectButton" runat="server" Text="Review Selected Call" OnClientClick="return LoadReviewForm();" /> 
            </CommandItemTemplate> 
    </MasterTableView> 
    <FilterMenu> 
        <CollapseAnimation Type="OutQuint" Duration="200">  
        </CollapseAnimation> 
    </FilterMenu> 
    <ClientSettings EnablePostBackOnRowClick="true">  
        <Selecting AllowRowSelect="True"></Selecting> 
    </ClientSettings> 
</telerik:RadGrid> 
 

(ASPX.VB)
    Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As GridCommandEventArgs) Handles RadGrid1.ItemCommand  
 
        If (e.CommandName = "RowClick" AndAlso TypeOf e.Item Is GridDataItem) Then 
            e.Item.Selected = True 
            e.Item.BackColor = Drawing.Color.DarkGray  
...  
 
Ed Navickas
Top achievements
Rank 1
 answered on 02 Dec 2009
1 answer
60 views

Requirements

RadControls version

2008 +
.NET version

Visual Studio version
programming language

c#
browser support

all browsers supported by RadControls


PROJECT DESCRIPTION
I want to share some tips on implementing RadGrid with LinqToSQL technology and work with entities having references to other entities.

Here is the link to blog post: http://dmitrygusev.blogspot.com/2009/11/best-practice-implementing-telerik.html
Sebastian
Telerik team
 answered on 02 Dec 2009
3 answers
140 views
Im using this code below and it works untill I do the "cell.innerHTML".  Then it tells me Im passing it a dangerous querystring.  IE it trying to pass it like the div tag and everything.  How do I just pass the value in the cell?

    <script type="text/javascript">  
        function RowSelected(sender, eventArgs) {  
            var grid = sender;  
            var MasterTable = grid.get_masterTableView();  
            var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];  
            var cell = MasterTable.getCellByColumnUniqueName(row, "procreq_id");  
 
            //var oWnd = radopen("pws_files.aspx?pws_id=" + cell.innerHTML, "Window1");  
            var oWnd = radopen("../proc_chg_files.aspx?proc_chg_id=" + "2", "Window1");  
        }  
             
</script>   
bradley baker
Top achievements
Rank 1
 answered on 02 Dec 2009
6 answers
147 views
We are using Telerik 2009_2_826  and we found that there is some UI problems with RadSpell on IE 7 (See attached JPG), the text of "Add Custom" is not aligned properly.

Is it possible to change the wording dynamically from the code?  

I read this article, I think it is possible to hide the "Add Custom" button by using spell.AllowAddCustom = false;
http://www.telerik.com/help/aspnet/editor/customizingradspell.html

But is there a way to change the wording say, a shorter word from "Add Custom" to  "Custom", or even change the style sheet of these buttons?

Thanks for help,
Rini Boo
Top achievements
Rank 1
 answered on 02 Dec 2009
2 answers
177 views
Good Morning,
I've created a RadTreeView with Data from a SQL Table. I load the Data on demand like in this example (Client Side):

http://demos.telerik.com/aspnet-ajax/treeview/examples/programming/loadondemandmodes/defaultcs.aspx

How can I expand a path to a spacial Childnode programaticly?

I tried it with:
RadTreeView.FindNodeByValue("NODEVALUE").ExpandParentNodes(); 




But that doesn't work. I think beacause the data is not loaded at this time.

Any ideas how to do that?

Thanks in advance

Regards
Dirk
Dirk Eberhardt
Top achievements
Rank 1
 answered on 02 Dec 2009
7 answers
321 views
I recently installed the latest Q3 release of the ASP.NET control suite. On a newly created test project, I tried to run the Upgrade Wizard.

I get the following error, repeatedly::

"Error retrieving latest version information. Please, try again or contact the Telerik team."

So, I am contacting you as requested <g>

FYI, running VS2008 under Vista, as Administrator.

Also running Microsoft Security Essentials, and I temporarily turned off the firewall, but this had no effect.
Erjan Gavalji
Telerik team
 answered on 02 Dec 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?