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

Hello, I would like to add a node to the TreeView of the FileExplorer, and I was trying to do this in the Page_Load handler: 

RadFileExplorer1.TreeView.Nodes.Add(new RadTreeNode("Recycle bin"));

But this causes my "Recycle Bin" node to be the only one in the TreeView.  Is there a better way to do this?  I would prefer that this node would be at or above the root node, so that it could be used as a recycle bin where users could drag files to.
Aaron C
Top achievements
Rank 1
 answered on 18 Aug 2010
1 answer
335 views
Hello,

I noticed that the RadGrid CardView demo (http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/cardview/defaultcs.aspx) the <Columns> and <telerik:GridBoundColumn> tags are no longer present once the <ItemTemplate> tag is used.

However, in the documentation for the RadGrid CardView (http://www.telerik.com/help/aspnet-ajax/grdcardview.html) <Columns> tag is used.  What is the reason for this?

In my own CardView project, when I remove the <Columns> tag (and child <telerik:GridBoundColumn> tags), my data within the <ItemTemplate> tag no longer appears.  What could be causing this?

Thanks,
David
Schlurk
Top achievements
Rank 2
 answered on 18 Aug 2010
2 answers
190 views
ho to find the Appointment in radSheuler Using  Appointment id

am trying following Code but it showing Null

ex : i have 4 appointments ids are{2,4,5,6}. in rad scheduler  Appointments Count showing 4.
 but  RadScheduler1.Appointments.FindByID(2) tin this time Showing null;

am using Following Code
protected void RadToolTipManager1_AjaxUpdate(object sender, ToolTipUpdateEventArgs e)
    {

       // Appointment info = (Appointment)RadScheduler1.Appointments.ToArray()[e.Value;
        int aptId;
        Appointment apt;
        if (!int.TryParse(e.Value, out aptId))//The appoitnment is occurrence and FindByID expects a string
            apt = RadScheduler1.Appointments.FindByID(e.Value);
        else //The appointment is not occurrence and FindByID expects an int
            apt = RadScheduler1.Appointments.FindByID(aptId);
     
       // Session["Apt"] = apt;
   
    }

could u plz help me any susses ion for this problem
Chris
Top achievements
Rank 1
 answered on 18 Aug 2010
1 answer
132 views
Hi,

I'm using RadAjaxManager_AjaxRequest to populate a combobox with data selected in another RadWindow. After the AjaxRequest the Combobox ist disabled and populated as it should, but the redering does work anymore (see attached screenshot).
Is there a solution for this problem? I'm working with RadControls 2009.2.826.20, the problem occurs in IE8, Firefox 3.6 and IE7 are rendering the control as expected but the font looks scary too.
Jasper
Top achievements
Rank 1
 answered on 18 Aug 2010
1 answer
110 views
Hi,
I think I found a problem in the Asp Ajax Controls suite, but to reproduce it, is rather difficult. Here it is:

Add a RadTabStrip to a aspx page. Add two tabs. Bellow the tabs, add a RadMultiPage control, and inside add, for each tab, a RadPageView, so that when a tab changes the corresponded pageview will be selected.

Set first tab on radTabStrip as Selected = true.
Set 0 as a default selected tab index on the RadMultiPage (first tab is selected).

Now, on the second tab strip, add a radgrid. Set AutoGenerateColumns to false, and dinamically add some rad columns on Page_Init (so that they are persisted in viewstate, as was nicely described in the online help). In my example, I've added 41 columns, I need to show some data in a pivoted manner. On this pivoted view, i need to set the first column frozen, (so that the other 40 can slide), and so I did, at design time.

If you're still following :), here is the problem:
The page loads fine, with the first tab selected. When I select the second tab, the first column that should be frozen is not frozen but is sliding along with the others. 
I've noticed that if I set that the second tab that contains the grid as selected by default when the page loads, the frozen column remains frozen and is acting as it should. Then if I select the first tab, and than reverse back to the second, the issue reapears.

I'm using the ASP.NET Ajax Controls, version Q2 2010.
Update: Forgot to mention: the bug appears only in IE7 and IE8 :).

Thanks for your help.
Lucian
Pavlina
Telerik team
 answered on 18 Aug 2010
2 answers
149 views
Hi,

Can anyone help.  I have a grid with a GridDropDownColumn as such:

<telerik:GridDropDownColumn UniqueName="CategoryName" HeaderText="Category" DataSourceID="DDL_DS" SortExpression="DC_Name" ListTextField="DC_Name" ListValueField="DC_Id" DataField="DC_Id" />

Grouping is enabled, and when a user drags the Category Header to the grouping pane, my grid groups fine.  However, the group header displays the Id, not the Name.  I've tried using ItemDataBound as below, but I just can't seem to grab that ListTextField.

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)

{

 

 

if (e.Item is GridGroupHeaderItem)

{

 

GridGroupHeaderItem item = (GridGroupHeaderItem)e.Item;  

DataRowView groupDataRow = (DataRowView)e.Item.DataItem;

item.DataCell.Text =

 

"( " + groupDataRow["DC_Id"].ToString() + " ) " ;

 

 

}

}

Thanks in advance,
J

 

 

 

Jason
Top achievements
Rank 1
 answered on 18 Aug 2010
1 answer
190 views
Hi,

I would like to place a Grid inside a treeview ,treeview nodes are dynamic..

Click on a particular node , I have to show a grid/list to display values (like a matrix)..

Code that I am trying is below:-

Somehow the datatable is not binding to the grid & generating the script error

 

 

//creates a Node "Interventions"

 

 

 

 

RadTreeNode nodeInterventions = new RadTreeNode();

 

nodeInterventions.Text =

 

 

NodeConstants.InterventionNode;

 

 

 

 

//nodeInterventions.ContextMenuID = "MainContextMenu";

 

 

e.Node.Nodes.Add(nodeInterventions);

 

 

 

DataTable dtintervention=new DataTable();

 

dtintervention.Columns.Add(

 

 

"INTERVENTION");

 

dtintervention.Columns.Add(

 

 

"DISCIPLINE");

 

dtintervention.Columns.Add(

 

 

"FREQUENCY");

 

dtintervention.Columns.Add(

 

 

"DURATION_IN_WEEK");

 

 

 

 

 

foreach (DataRow row in data.Rows)

 

{

dtintervention.Rows.Add(row[

 

 

"INTERVENTION"].ToString(), row["DISCIPLINE"].ToString(), row["FREQUENCY"].ToString(), row["DURATION_IN_WEEK"].ToString());

 

 

}

//adding a dynamic grid to treeview

 

 

RadGrid rgrv_Interventions = new RadGrid();

 

rgrv_Interventions.DataSource = dtintervention;

rgrv_Interventions.DataBind();

//addign the control to the treenode

 

 

 

RadTreeNode nodeint = new RadTreeNode();

 

nodeint.Controls.Add(rgrv_Interventions);

nodeInterventions.Nodes.Add(nodeint);

}

Hi...
I am able to place a normal grid view..but why not a radgrid..

regards
Delia Joe

 

Pavlina
Telerik team
 answered on 18 Aug 2010
1 answer
205 views
When I collapse/expand my RadDock in code-behind using RadDock1.Collapsed = True, even if I have EnableAnimation="True" set in my RadDock1, it does not show the animation.  Is there a way to do this?
Pero
Telerik team
 answered on 18 Aug 2010
2 answers
92 views
Hi telerik team

I am very pleased with your constant support over my problems but i m stuck with new problem.

I need to add "Export to iCal" link in Appointment context menu.
like:
<appointmentcontextmenus>
      <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerAppointmentContextMenu">
           <Items>
                <telerik:RadMenuItem Text="Edit" Value="CommandEdit" />
                <telerik:RadMenuItem IsSeparator="True" />
                <telerik:RadMenuItem Text="Export" Value="Export" />
           </Items>
       </telerik:RadSchedulerContextMenu>
</appointmentcontextmenus>

but on "AppointmentContextMenuItemClicking" event is not working as required. In debugging mode it never comes to this event. incase of "CommandEdit" it automatically opens the Edit form (i.e. Advanced Edit template).

protected void RadScheduler1_AppointmentContextMenuItemClicking(object sender, AppointmentContextMenuItemClickingEventArgs e)
        {
            if (e.MenuItem.Text.Contains("Export"))
            {
                WriteCalendar(RadScheduler.ExportToICalendar(e.Appointment));
                e.Cancel = true;
            }
        }

Is there any way to call "WriteCalendar(String data)" method through appointment context menu?
please help me to solve this problem.

Regards
Manmeet Singh
Peter
Telerik team
 answered on 18 Aug 2010
1 answer
231 views
Hi There,

Im trying to implement a custom datasource / provider for the filebrowser control.
I've looked at the related samples but am unsure which route to follow;

  1. Subclassing the existing Telerik.Web.UI.Widgets.FileSystemContentProvider and only overriding methods that need changed.
  2. Implementing a new Telerik.Web.UI.Widgets.FileBrowserContentProvider

Any help / pointers / sample code on how to achieve this would be much appreciated!
Below is sample code that is used to retrieve files from a remote machine (Linux) and bind it to a treeview. Also include is the accosiated XML RPC wrapper class.

Usage:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
       'set root path to browse on remote system
       Dim RootPath As String = "/dcinvol2/jobs"
       'create root node for treeview
       Dim RootNode As New TreeNode(RootPath)
       'instantiate new XML RPC class
       Dim XmlRpc As New Magic.XML_RPC
       If XmlRpc.IsRunning Then
           'return all files and folders
           Dim FilesAndFolders As New ArrayList()
           FilesAndFolders.AddRange(XmlRpc.GetFolders(RootPath, False, True, 1))
           If FilesAndFolders.Count > 0 Then
               'add each file or folder to rootnode
               For Each FileOrFolder As String In FilesAndFolders
                   Dim ChildNode As New TreeNode(FileOrFolder)
                   RootNode.ChildNodes.Add(ChildNode)
               Next
               'add rootnode to treeview
               TreeView1.Nodes.Add(RootNode)
           End If
       End If
   End Sub

Class:
Imports CookComputing.XmlRpc
Namespace Magic
    Public Class XML_RPC
        Private _iproxy As XmlRpcInt
        Public Sub New()
            _iproxy = CType(XmlRpcProxyGen.Create(GetType(XmlRpcInt)), XmlRpcInt)
        End Sub
        ''' <summary>
        ''' Check if service is running.
        ''' </summary>
        ''' <returns>True if service is running, otherwise False.</returns>
        Public Function IsRunning() As Boolean
            Dim strRet As String
            Try
                strRet = _iproxy.IsServerRunning()
            Catch ex As Exception
                Return False
            End Try
            If strRet.Length > 0 And strRet <> Nothing Then Return True
            Return False
        End Function
        ''' <summary>
        ''' Gets all sub folders under the path specified.
        ''' <param name="path">Path to query.</param>
        ''' <param name="fullPath">Optional - return the full path</param>
        ''' <param name="returnFiles">Optional - return the files in a dir</param>
        ''' <param name="drill_to_level_x">Optional - return a depth of dirs</param>
        ''' </summary>
        ''' <returns>Array of paths.</returns>
        Function GetFolders(ByVal path As String, Optional ByVal fullPath As Boolean = True, Optional ByVal returnFiles As Boolean = False, Optional ByVal drill_to_level_x As Integer = 0) As Array
            Dim al As New ArrayList
            Try
                Dim a As Array = Nothing
                a = _iproxy.GetFolders(path, fullPath, returnFiles, drill_to_level_x)
                For Each s As String In a
                    'Perform clean up
                    If s = "." Then Continue For
                    If s.StartsWith(".") Then s = s.TrimStart(".")
                    If s.StartsWith("/") Then s = s.TrimStart("/")
                    al.Add(s)
                Next
            Catch ex As Exception
                Return al.ToArray
            End Try
            Return al.ToArray
        End Function
        ''' <summary>
        ''' Looks for file specified and returns file in binary format.
        ''' </summary>
        ''' <param name="filename">The full path to file, including filename.</param>
        ''' <returns>Array in bytecode format.</returns>
        Function GetBinaryFile(ByVal filename As String) As Array
            Dim a As Array = Nothing
            Try
                a = _iproxy.GetBinaryFile(filename)
            Catch ex As Exception
                Return a
            End Try
            Return a
        End Function
        ''' <summary>
        ''' Checks if given path exists.
        ''' </summary>
        ''' <param name="path">The full path to folder/file.</param>
        ''' <param name="folder">Check folder or file exists.</param>
        ''' <returns>True if path exists, False otherwise.</returns>
        Function PathExists(ByVal path As String, Optional ByVal folder As Boolean = True) As Boolean
            Try
                Return _iproxy.PathExists(path, folder)
            Catch ex As Exception
                Return False
            End Try
        End Function
        ''' <summary>
        ''' Returns number of files in given path, currently this descends into sub folders.
        ''' </summary>
        ''' <param name="path">The full path to folder.</param>
        ''' <returns>Number of files in the path.</returns>
        Function GetNumberOfFiles(ByVal path As String) As Integer
            Dim i As Integer = 0
            Try
                i = CInt(_iproxy.GetNumberOfFiles(path))
            Catch ex As Exception
                Return i
            End Try
            Return i
        End Function
        ''' <summary>
        ''' Returns number of kilobytes in given path. 
        ''' </summary>
        ''' <param name="path">The full path to folder.</param>
        ''' <returns>Number of kilobytes in the path.</returns>
        Function GetByteSize(ByVal path As String) As Integer
            Dim i As String = 0
            Try
                i = CInt(_iproxy.GetByteSize(path))
            Catch ex As Exception
                Return i
            End Try
            Return i
        End Function
    End Class
End Namespace

Thanks,
Gordon
Fiko
Telerik team
 answered on 18 Aug 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?