Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
243 views
Hi,

I have one problem with Line Chart.
i want to display a status of some network connections with Line Chart. meanse connected a between a stations.
now, i want to display like that

station1 ---------------station2--------------------------station3

with a diffrent color of line. like station1 to station2 is in red color because connection is lost .while station2 to station3 is green line beacuse connection is exits.

so, what should i do for that. and please suggest me which chart i need to use other than Line Chart.

please see attached image.


ciskomisko
Top achievements
Rank 1
 answered on 20 Mar 2010
6 answers
239 views
So, here is the code to use needdatasource event, but it seems nothing happen after I expand the sub-category
P.S.: I have changed the sql object to oledb

Code-Behind
Protected Sub RadGrid1_NeedDataSource(ByVal source As ObjectByVal e As GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource 
        Dim cmd As New SqlCommand 
        cmd.CommandText = "SELECT * FROM Products where CategoryID = @CategoryID" 
        RadGrid1.DataSource = GetDataTable(cmd) 
    End Sub 
 
    Public Function GetDataTable(ByVal query As SqlCommand) As DataTable 
        Dim ConnString As String = ConfigurationManager.ConnectionStrings("DBMXCatePro").ConnectionString 
        Dim conn As SqlConnection = New SqlConnection(ConnString) 
        Dim adapter As SqlDataAdapter = New SqlDataAdapter 
        query.Connection = conn 
        adapter.SelectCommand = query 
        Dim table1 As New DataTable 
        conn.Open() 
        Try 
            adapter.Fill(table1) 
        Finally 
            conn.Close() 
        End Try 
        Return table1 
    End Function 


ASP Mark Up:
<asp:AccessDataSource ID="AccessDataSource1" runat="server"  
            DataFile="~/App_Data/dbmx_with_category.mdb"  
            SelectCommand="SELECT * FROM [Categories] where isDelete = false"></asp:AccessDataSource> 
        <asp:AccessDataSource ID="AccessDataSource2" DataFile="~/App_Data/dbmx_with_category.mdb"  
        SelectCommand="SELECT * FROM [Products] where CategoryID= ? and IsDelete=false" runat="server">  
                   <SelectParameters>  
                       <asp:Parameter Name="CategoryID" Type="Int32" />  
                   </SelectParameters>  
        </asp:AccessDataSource>  
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateDeleteColumn="True"  
            AutoGenerateEditColumn="True" DataSourceID="AccessDataSource1" GridLines="None"
<MasterTableView AutoGenerateColumns="False" DataKeyNames="categoryID"  
                DataSourceID="AccessDataSource1" HierarchyLoadMode="ServerBind"
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
    <SelfHierarchySettings KeyName="categoryID" ParentKeyName="categoryParentID" /> 
    <Columns> 
        <telerik:GridBoundColumn DataField="categoryID" DataType="System.Int32"  
            HeaderText="categoryID" ReadOnly="True" SortExpression="categoryID"  
            UniqueName="categoryID"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="categoryTitle" HeaderText="categoryTitle"  
            SortExpression="categoryTitle" UniqueName="categoryTitle"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="categoryIcon" HeaderText="categoryIcon"  
            SortExpression="categoryIcon" UniqueName="categoryIcon"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="categorySequence" DataType="System.Int32"  
            HeaderText="categorySequence" SortExpression="categorySequence"  
            UniqueName="categorySequence"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="categoryParentID" DataType="System.Int32"  
            HeaderText="categoryParentID" SortExpression="categoryParentID"  
            UniqueName="categoryParentID"
        </telerik:GridBoundColumn> 
        <telerik:GridCheckBoxColumn DataField="isDelete" DataType="System.Boolean"  
            HeaderText="isDelete" SortExpression="isDelete" UniqueName="isDelete"
        </telerik:GridCheckBoxColumn> 
    </Columns> 
</MasterTableView> 
        </telerik:RadGrid> 

louis chan
Top achievements
Rank 1
Iron
 answered on 20 Mar 2010
1 answer
148 views
Hi,
I am facing a small problem. I have multiple tabs created dynamically and i want to scroll over the tabs created.
I am using this code as below. When i keep the mouse near the arrow (to scroll over tabs) ,the arrow and the Tab Text overlaps. Its kind of i cant read the tab text.  
 <telerik:RadTabStrip ID="PSPPreviewRadTabStrip" runat="server" EnableAjaxSkinRendering="true"
                    EnableViewState="true" EnableEmbeddedScripts="true" ScrollChildren="True" PerTabScrolling="true"
                    ScrollButtonsPosition="Middle" DataTextField="SectionName" DataValueField="SectionID"
                    ClickSelectedTab="true" OnTabClick="PSPPreviewRadTabStrip_TabClick" OnClientTabSelecting="OnSelecting">
</telerik:RadTabStrip>     

Please let me know solution if there is any way to avoid this?
Can anyone pls reply to this problem ? Thanks in advance
chiranth
Top achievements
Rank 1
 answered on 19 Mar 2010
4 answers
126 views
Hello,

I installed the Q1 2010 controls and I'm having a strange issue.  Every time I add a Telerik control on a web form, it creates the necessary assembly code at the top of the form.  Like so:

<%@ Register assembly="Telerik.Web.UI, Version=2010.1.216.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" namespace="Telerik.Web.UI" tagprefix="telerik" %> 

The only problem is this is the wrong version of the controls I'm using.  I'm using the .NET 4.0 controls and the code should actually be this:

<%@ Register assembly="Telerik.Web.UI, Version=2010.1.309.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" namespace="Telerik.Web.UI" tagprefix="telerik" %> 

The difference being the version information.  Why would it act like I'm using .NET 3.5 when I am clearly using 4.0 and when the project was created it was created as a 4.0 project?  The toolbox even displays the correct controls as being 4.0.  For now, I'm going into the code and changing the assembly to correct the version, but ANY time I make a change to a control on the design surface it adds the 3.5 assembly code in addition to my 4.0 assembly code already there.  It is slowing me down quite a bit.  Can someone help me fix this?

Thanks for any help,
Heath Brown
Heath Brown
Top achievements
Rank 1
 answered on 19 Mar 2010
11 answers
118 views
Perhaps someone could explain something very basic to me.

Last week I had a lot of trouble getting an application running after trying an update.  After about three days and reading untold postings I managed to get it back to where it was working.

This morning i created a new RadControls VB.NET Webapplication.  I opened the default.aspx and am getting the "could not load file or assembly....".  So a brand new Radcontrols Web Application does not even work.  And on top of that the application that I spent three days getting work again is now not working again.

What the heck is going on!
Erjan Gavalji
Telerik team
 answered on 19 Mar 2010
19 answers
421 views
First thing that jumped out at me... a Vista Skin... and the old-style menubars.

A RibbonBar might be something to consider in the next upgrade ??
Rumen
Telerik team
 answered on 19 Mar 2010
0 answers
141 views
I've been wrestling for a while trying to databind to 2 tables essentially. Custom collections that inherit from IBindingLists, but the core type of collection is not really the problem. I can succesfully bind as long as i only bind one table or collection. Things get tricky when I try to programmatically bind to the next table.

To help understand my problem I am attaching a database diagram of the tables in question.

How can I use databindings to populate data coming from that type of relations, a self-referencing table and a link-table.

I read almost everything available in the forums and online, and found nice text, but no concrete example close to this scenario.

My treeView is not using declarative datasources, I am using the OnDatabinding event to populate the grid:

<telerik:RadTreeView runat="server" ID="RadTreeView1" EnableDragAndDrop="True" OnClientMouseOver="onTreeViewMouseOver" 
        OnClientMouseOut="onTreeViewMouseOut" OnClientContextMenuItemClicking="onClientContextMenuItemClicking" 
        OnClientNodeDragStart="onTreeViewDragStart" OnDataBinding="RadTreeView1_DataBinding" 
        OnClientNodeDropping="onTreeViewDropping" OnClientContextMenuShowing="onClientContextMenuShowing" 
        OnNodeDrop="RadTreeView1_NodeDrop" OnNodeDataBound="RadTreeView1_NodeDataBound"   
        OnClientNodeDragging="onTreeViewDragging" OnNodeEdit="RadTreeView1_NodeEdit"   
        oncontextmenuitemclick="RadTreeView1_ContextClick"   
        AppendDataBoundItems="True">  
 
        <ContextMenus> 
            <telerik:RadTreeViewContextMenu ID="MainContextMenu" OnDataBinding="MainContextMenu_DataBinding" runat="server">  
                <Items> 
                    <telerik:RadMenuItem Value="Rename" Text="Rename ..." Enabled="false" ImageUrl="~/Images/rename.gif" PostBack="false"></telerik:RadMenuItem> 
                    <telerik:RadMenuItem Value="NewRootUnit" Text="New ..." ImageUrl="~/Images/newfolder.gif"></telerik:RadMenuItem> 
                    <telerik:RadMenuItem Value="Delete" Text="Delete ..." ImageUrl="~/Images/deletefolder.gif"></telerik:RadMenuItem> 
                    <telerik:RadMenuItem IsSeparator="true"></telerik:RadMenuItem> 
                    <telerik:RadMenuItem Value="SetAsDefault" Text="Set as default ..." ImageUrl="~/Images/default.png"></telerik:RadMenuItem> 
                </Items> 
                <CollapseAnimation Type="InCubic" /> 
            </telerik:RadTreeViewContextMenu> 
        </ContextMenus> 
    </telerik:RadTreeView> 

And in the NodeDataBound event I actually use custome attributes to hold all the data I need.

My problem comes when i want to hook up the UserInRegion collection of record to the Region Collection.

Thank you in advance,

Jean
Jean Cuteaux
Top achievements
Rank 1
 asked on 19 Mar 2010
1 answer
128 views
Hello!

I'm populate my RadTreeView via WCF service on demand. In service I'm set custom attribute to RadTreeNode:
Attributes = new Dictionary<string, object> { { "TypeAttribute", "Type1" } } 
Next time I'm recieve node with this attribute in WCF service (when I'm expand it), Attributes property contains this keypair: "0, {object}" instead {"TypeAttribute", "Type1"}.
When I'm debug my page in fireBug, I noticed then attributes of node in post json (from page to service) contains value of keypair as string, but response from service contains it as object. Maybe this is a source of problem?

My question is - how I must set custom attributes in WCF service code to correctly get it from "node" parameter of LoadData method of service?
Thank you.

P.S. Sorry for my bad English.
Dimitar Milushev
Telerik team
 answered on 19 Mar 2010
1 answer
199 views
I know for previous version of RadChart, we can set heightRatio=0
For recent version, there is no heightRatio property for RadChart. I checked the change and compatibility for new versions, Legend.heightRatio is changed to PlotArea].Appearance.Dimensions.Paddings (Left, Right). However, no matter what value I set to PlotArea].Appearance.Dimensions.Paddings, I still got vertical legend.

Any one knows how to do it? Thanks
Heng Du
Top achievements
Rank 1
 answered on 19 Mar 2010
2 answers
68 views
Hi ,

I have one requirement like  prevent Adding New Row while any row of the grid in Edit mode and vice verse .

1. User Can not add the new row if any row of the grid in Edit mode
2. User can not Edit any row while any blank row exist [after click on "Add New Row" ] that means without completion of Add New Row

Please help on the same ASAP .

Nitish
nitish kumar
Top achievements
Rank 1
 answered on 19 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?