Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
108 views
Hi guys,

I have a tree view and I use a call to Expand only the first level so the user can see the first node expended.

IE, Safari and Chrome do not see RadTreeView only FF and Opera

What am I doing wrong here?

code:

The RadTreeView

<telerik:RadTreeView ID="RadTreeView" runat="server" OnNodeDataBound="RadTreeView_NodeDataBound"
    OnClientNodeClicked="onClientNodeClickedHandler" OnClientMouseOver="onClientMouseOverHandler"
    CheckBoxes="false" CheckChildNodes="false" MultipleSelect="true" TriStateCheckBoxes="false"
    SingleExpandPath="true" BorderColor="LightGray" BorderWidth="0">
</telerik:RadTreeView>

The call

$(document).ready(function() {
   // expand until level
   treeExpandNodes(0);
});

   function treeExpandNodes(level) {
      var treeView = $find('<%= RadTreeView.ClientID %>');
      if (treeView != null) {
         var nodes = treeView.get_allNodes();

         for (var i = 0; i < nodes.length; i++) {
            if (nodes[i].get_nodes() != null) {
               if (nodes[i].get_level() <= level)
                  nodes[i].expand();
               else
                  nodes[i].collapse();
            }
         }
      }
      else
         alert('Why is it null?'); // only in FF and Opera this alert is not called!
   }

image of the output in the 4 browsers

Veselin Vasilev
Telerik team
 answered on 17 Sep 2009
1 answer
210 views
Hi,

 i am displaying graphs using radcharts.I want to export these graphs into excel/word/pdf.

Please tell me how to do it?

Thanks for your replies.




Schlurk
Top achievements
Rank 2
 answered on 17 Sep 2009
6 answers
190 views
Hi,

I have a situation where i have 2 listboxes with transfer enabled.  In one of the listboxes i have an ItemDatabound handler where in a certain condition the item is in the listbox but disabled.  When i use the transfer all button it will transfer everything including the disabled items.  I tried code in handling the Transferring that would remove the items from the args.Items but it tells me it cant because its a fixed size collection.

Is there anyway at the transferring handler i can remove the specific items i dont want transferrable while still transferring the rest?
Genady Sergeev
Telerik team
 answered on 17 Sep 2009
4 answers
185 views
Hi,

Using the standard RadTreeView examples (.NET35, Ajax RadView Q2 2009).
I can set event handlers fine in the markup, but as soon as I try to set an event handler in a callback, it doesn't work.

For example, the following does not work:
.aspx:
    <telerik:RadTreeView ID="RadTreeView2" Skin="Black"
        OnNodeExpand="RadTreeView2_NodeExpand"
        runat="server">... </telerik:RadTreeView>

.cs:


    protected void RadTreeView2_NodeExpand(object sender, RadTreeNodeEventArgs e)
    {
            RadTreeView2.EnableDragAndDrop = true;
            RadTreeView2.NodeDrop += new RadTreeViewDragDropEventHandler(this.RadTreeView2_NodeDrop);
    }
   private void RadTreeView2_NodeDrop(object sender, RadTreeNodeDragDropEventArgs e) {}



any idea why? I thought it was perhaps a view state problem, but enabling it explicitly didn't change anything.

If I put the handler assignment in the Page_Load or Page_Init, it works.

In short: what do I need to do to dynamically enable/disable drag-drop features on nodes?

Thanks!
R





Vesko
Top achievements
Rank 2
 answered on 17 Sep 2009
2 answers
169 views
Greetings

i have a RadPaneBar with a RadComboBox inside
and want to fill the combobox at runtime
for example:
     dim cmb as RadComboBox = ctype(RadPanelBar.parent.findcontrol("Comboname"),RadComboBox)
     dim a as integer
     for a = 1 to 30
        cmb.items.add(new RadComboBoxItem(a,a))
    next

and gave me this error

"Object reference not set to an instance of an object"


please help
thanks
Luis
Luis
Top achievements
Rank 1
 answered on 17 Sep 2009
3 answers
198 views
When using a skin like WebBlue, setting the GridLines property does nothing to display the column dividers in the header. How do I make it some there is a visible divider for a user to grab, rather than just relying on them waiting for the cursor to change shape?

--
Stuart
Stuart Hemming
Top achievements
Rank 2
 answered on 17 Sep 2009
1 answer
131 views

In this thread I asked about displaying gridlines when using skins.

Dimo posted an answer that also included information about the almost obsolete GridLines attribute of the RadGrid.

Can I suggest that Dimo's suggestion, or a variant of it, is included in the docs for other users as it is both generic and generally relevant, especially given the rather obscure and outdated css mechnism that the GridLines attribute relies on?

--
Stuart

Iana Tsolova
Telerik team
 answered on 17 Sep 2009
7 answers
167 views
Hi,

I have a treeview loading dynamically from a web service which is all working fine. I have enabled server side drag n drop with a AjaxManager linked to the treeview.

It all works fine, but if you drag a node to a currently collapsed node, it will show the new node just dragged to it (as if it is expanded) but wont show the existing nodes until you manually click on it (where it loads from the webservice) Once it has done the load from the webservice it will then have a duplicate node of the one you have just added.

This issue sort of makes sences as in the drag n drop function it is adding the node from the serverside and then when the node is clicked it loads all the nodes from the database which will included the node that has just been moved - so will result in a duplicate.
private void PerformDragAndDrop(RadTreeViewDropPosition dropPosition, RadTreeNode sourceNode, 
         RadTreeNode destNode) 
        { 
            if (sourceNode.Equals(destNode) || sourceNode.IsAncestorOf(destNode))             
                return; 
             
            sourceNode.Owner.Nodes.Remove(sourceNode); 
             
            int iSourceNodeParentId = -1; 
            int iSourceNodeId = Convert.ToInt32(sourceNode.Value); 
            int iDestinationNodeId = Convert.ToInt32(destNode.Value); 
            if (sourceNode.ParentNode != null) 
                iSourceNodeParentId = Convert.ToInt32(sourceNode.ParentNode.Value); 
            else 
                iSourceNodeParentId = -1; 
 
            int iGroupViewId = Convert.ToInt32(sourceNode.Attributes["GROUPVIEWID"]); 
             
            WebSession webSess = (WebSession)Session["WebSession"]; 
 
            switch (dropPosition) 
            { 
                case RadTreeViewDropPosition.Over: 
                    // child 
                    if (!sourceNode.IsAncestorOf(destNode)) 
                    { 
                        destNode.Nodes.Add(sourceNode); 
                        // update db                         
                        webSess.MasterSystem.GroupsSystem.MoveNode(sourceNode.Value, destNode.Value); 
                    } 
                    break; 
 
                case RadTreeViewDropPosition.Above: 
                    // sibling - above                     
                    destNode.InsertBefore(sourceNode); 
                    // update db                         
                    webSess.MasterSystem.GroupsSystem.MoveNodeOrder(iSourceNodeId, iSourceNodeParentId, iGroupViewId, ConfigurationConsts.NodeOrderDirection.nodUp); 
                    break; 
 
                case RadTreeViewDropPosition.Below: 
                    // sibling - below 
                    destNode.InsertAfter(sourceNode); 
                    // update db                         
                    webSess.MasterSystem.GroupsSystem.MoveNodeOrder(iSourceNodeId, iSourceNodeParentId, iGroupViewId, ConfigurationConsts.NodeOrderDirection.nodDown); 
                    break; 
            }             
        } 

is there anyway rather than adding the node in this function - to just cause a reload from the webservice of the parent node where the node has just been dragged to - so instead of adding the node in manually - it can just load the information from the webservice.

Unless theres something else i should be doing?

thanks
Toby

Toby
Top achievements
Rank 1
 answered on 17 Sep 2009
3 answers
130 views
hi,
im creating my raddocks and everything else server side, which is working fine apart from one thing...

i'd like to be able to cancel a dock move in it's 'DockPositionChanged' event...
any way to do this?

i look at the dock control and it is in the original spot in this event and all page lifecycle (including PreRender)....

cheers,
dan

Pero
Telerik team
 answered on 17 Sep 2009
2 answers
73 views
Hi,

    I have a issue when MultiRowEdit is made true. Actually I have to show all the rows in my grid in edit mode and when i press Add New record i should get the new row , but the insert/Cancel buttons will be invisible. I am facing problem in capturing the controls and their values of adding row . I have to capture those controls on a single Save button click in my page. So that i can add as well as modify edited rows and finally Save alltogether on a single save click. So in my Save button click i should capture the controls of adding row which i am unable to do. I can access the controls in edit mode as 

 

for (int pageitem = 0; pageitem < RgdDomainValues.Items.Count; pageitem++)

 

{


'RgdDomainValues.Items[myitemIndex].Controls[colindex].Controls[UIConstants.ZERO]' .......

}

 Can u please suggest me how can i get the controls of inserting row .

Thanks,
Satya.
satya
Top achievements
Rank 1
 answered on 17 Sep 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?