Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
80 views
hi i am using edit template to edit the grid. In the edit template i used timepicker to select the time with interval of 15 minutes. But i need to restrict the start and end time of that timeview. When i set in design source it will work but when i tried in databound event not working
Tsvetina
Telerik team
 answered on 28 Jun 2010
1 answer
118 views
Will the server event fire if a file is dragged and dropped whithin the same folder ?

Thanks.
Fiko
Telerik team
 answered on 28 Jun 2010
1 answer
96 views
When I add a GridButtonColumn, GridHyperLinkColumn, or template column, the column is not binding.  Using the exact same field in a gridboundcolumn works fine - but the afore mentioned columns do not bind.

I am doing client-side binding to a web service.  The web service and binding in general are working correctly, as all other gridboundcolumns work correctly.

Shawn
Pavlina
Telerik team
 answered on 28 Jun 2010
2 answers
166 views
I would like to hide the dropdown when it is empty - how could that be achieved?

Ideally, I would like to reduce it's size to match the contents if there is empty space at the bottom - but that may be too difficult.

Thanks
John
John Hadjioannou
Top achievements
Rank 1
 answered on 28 Jun 2010
3 answers
66 views
I have a RadTree which is bound to a data source. I want to display the data associated with the first leaf node whenever a root node is selected. I am doing this using the following code:
var node = tree.get_selectedNodes()[0]; 
 
node.expand() 
 
//alert("node text = " + node.get_text() + "\nChild count: " + node.get_nodes().get_count()); 
 
             
 
            while (node.get_nodes().get_count() != 0)  
 
            { 
 
                node = node.get_nodes().getNode(0); 
 
                node.expand(); 
 
                //alert("node  = " + node.get_text() + "\nchild count = " + node.get_nodes().get_count()); 
 
            } 

I have debugged the code using Firebug and know that its working exactly as its supposed to. The problem I am facing is that whenever I am not in debug mode, if I expand the root node it just shows me the content associated with the root node. I even tried putting alert() statements after the node.expand() call and it shows no. of child nodes as 0, even though there are child nodes present. Also, the code works perfectly well if the root node is already expanded. Funny thing is, if I enable the first alert() call, the whole thing works perfectly!! Makes me believe there are timing issues with the expand() call. Any ideas? Thanks in advance!

Nikolay Tsenkov
Telerik team
 answered on 28 Jun 2010
1 answer
299 views
Hi There,

We are using RadTreeView as a replacement for the menu in SharePoint. It is connecting to a datasource we have generated from the SPSites, basically creating a new SiteMapProvider. This is all in code behind. We have set the ExpandMode to "ServerSideCallBack" for efficiency reasons. But when I navigate to child sites, it doesn't show the currently selected node when the page is loaded......how can we achieve this???

please help

Snippets:

SharePoint MasterPage:

<%@ Master language="C#" Inherits="Chisholm.SharePoint.MasterPages.StudentPortal, Chisholm.SharePoint.MasterPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=36b5e3431f62f80f" %>

...........................................

<telerik:RadTreeView ID="myLearningTreeView" runat="server" Skin="Office2007"
            DataSourceID="MyLearningDS"
            OnNodeExpand="NodeExpandHandler"
            MaxDataBindDepth="1"
            DataNavigateUrlField="Url"
            DataTextField="Title" DataValueField="Key" DataFieldID="Key"  EnableEmbeddedSkins="False" SingleExpandPath="True">
            <DataBindings>
    <telerik:RadTreeNodeBinding ExpandMode="ServerSideCallBack" Depth="0" />
   </DataBindings>
        </telerik:RadTreeView>
        <asp:SiteMapDataSource ID="MyLearningDS" runat="server"
                ShowStartingNode="false"
                StartFromCurrentNode="false"
                StartingNodeOffset="0"
                SiteMapProvider="MyPortalSiteMapProvider"
                StartingNodeUrl="/myLearning"/> 

............................


code behind: StudentPortal.cs

namespace

 

Chisholm.SharePoint.MasterPages

 

{

 

 

public class StudentPortal : MasterPage

 

{

 

 

protected global::Telerik.Web.UI.RadTreeView myLearningTreeView;

 

 

 

public RadTreeNode LastSelectedNode

 

{

 

 

get { return (RadTreeNode)ViewState["LastSelectedNode"]; }

 

 

 

set { ViewState["LastSelectedNode"] = value; }

 

}

 

 

 

public RadTreeView SiteMenu

 

{

 

 

get { return (RadTreeView)ViewState["SiteMenu"]; }

 

 

 

set { ViewState["SiteMenu"] = value; }

 

}

 

 

 

protected void Page_Load(object sender, EventArgs e)

 

{

 

 

//if (!Page.IsPostBack)

 

 

 

//{

 

 

 

if ((SiteMenu!=null)&&(LastSelectedNode!=null))

 

{

 

 

// get the custom sql site map provider

 

 

SqlSiteMapProvider provider = ((SqlSiteMapProvider)SiteMap.Providers[

"MyPortalSiteMapProvider"]);

 

 

 

if (provider == null)

 

 

 

return;

 

 

 

// add a method to get chid nodes by Key

 

 

SiteMapNode siteNode = provider.FindSiteMapNodeFromKey(LastSelectedNode.Value);

 

if (siteNode == null)

 

 

 

return;

 

SiteMapNodeCollection childNodes = provider.GetChildNodes(siteNode);

 

 

if (childNodes.Count < 1)

 

 

 

return;

 

 

 

// NW: call FindSiteMapNodeFromKey() of the SiteMapProvider using

 

 

 

// the key obtained from the node that was clicked.

 

 

 

// The node that was clicked becomes the new parent of the children

 

 

 

// to be added to it from the database.

 

 

 

//

 

 

 

foreach (SiteMapNode child in childNodes)

 

{

 

 

// NW: The children are created based on the information obtained from

 

 

 

// the database.

 

 

 

//

 

 

 

// create a new node

 

 

RadTreeNode rtn =

new RadTreeNode()

 

{

Value = child.Key,

Text = child.Title,

ExpandMode = TreeNodeExpandMode.ServerSide,

 

//NW: This is overiden below.

 

 

NavigateUrl = child.Url,

LongDesc = child.Description

};

 

// with the same expand mode as the node currently expanding

 

 

rtn.ExpandMode = LastSelectedNode.ExpandMode;

 

// add the new node to the node that is expanding

 

 

LastSelectedNode.Nodes.Add(rtn);

}

 

// now that the nodes are added, change the current node's expand mode to client-side

 

 

LastSelectedNode.ExpandMode = TreeNodeExpandMode.ClientSide;

 

// signal that the node is now expanded

 

 

LastSelectedNode.Expanded =

true;

 

}

 

 

//}

 

 

}

 

protected void NodeExpandHandler(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e)

 

{

SiteMenu = (RadTreeView)sender;

LastSelectedNode = e.Node;

 

 

// get the custom sql site map provider

 

 

SqlSiteMapProvider provider = ((SqlSiteMapProvider)SiteMap.Providers[

"MyPortalSiteMapProvider"]);

 

 

 

if (provider == null)

 

 

 

return;

 

 

 

// add a method to get chid nodes by Key

 

 

SiteMapNode siteNode = provider.FindSiteMapNodeFromKey(e.Node.Value);

 

if (siteNode == null)

 

 

 

return;

 

SiteMapNodeCollection childNodes = provider.GetChildNodes(siteNode);

 

 

if (childNodes.Count < 1)

 

 

 

return;

 

 

 

// NW: call FindSiteMapNodeFromKey() of the SiteMapProvider using

 

 

 

// the key obtained from the node that was clicked.

 

 

 

// The node that was clicked becomes the new parent of the children

 

 

 

// to be added to it from the database.

 

 

 

//

 

 

 

foreach (SiteMapNode child in childNodes)

 

{

 

 

// NW: The children are created based on the information obtained from

 

 

 

// the database.

 

 

 

//

 

 

 

// create a new node

 

 

RadTreeNode rtn =

new RadTreeNode()

 

{

Value = child.Key, Text = child.Title,

ExpandMode = TreeNodeExpandMode.ServerSide,

 

//NW: This is overiden below.

 

 

NavigateUrl = child.Url, LongDesc = child.Description

};

 

// with the same expand mode as the node currently expanding

 

 

rtn.ExpandMode = e.Node.ExpandMode;

 

// add the new node to the node that is expanding

 

 

e.Node.Nodes.Add(rtn);

}

 

// now that the nodes are added, change the current node's expand mode to client-side

 

 

e.Node.ExpandMode = TreeNodeExpandMode.ClientSide;

 

// signal that the node is now expanded

 

 

e.Node.Expanded =

true;

 

}

NOTE:

 

 // we are not using the following code

 

 

protected void NodeClickHandler(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e)

 

{

SiteMenu = (RadTreeView)sender;

LastSelectedNode = e.Node;

}

}

}

once again please help......we have a critical situation here that we are so close to fixing, and this is holding us back.

ps...tried attaching a zip!

regards
Shaun Pitt
Chisholm Institute - Australia

 

Nikolay Tsenkov
Telerik team
 answered on 28 Jun 2010
1 answer
111 views
Hi, i'm usign a RadComboBox (RadControls_for_ASP.NET_AJAX_2010_1_519_dev) with EnableVitualScrolling and ShowMoreResultsBox as in your example

http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx

The loading on demand works, but the ShowMoreResultsBox is graphically different from your example (I have only the down arrow without the items numbers) and using the keyboard it don't loads the next page when the cursors reach the end of the current page, as in your example.
I must use the mouse clicking on the ShowMoreResultsBox arrow.
Attached as it appears to me.
Why this difference? I can't find any missing settings.

Thanks
  Alessandro Strazzari
Kalina
Telerik team
 answered on 28 Jun 2010
2 answers
169 views
I am creating several buttons in the the commandItemTemplate, I am using these to export tp csv plus many other things (I could use the commandItemSettings but dont want to). The problem I am having is that I cannot find the buttons in the code behind.  My code is as follows.

 
 
<telerik:RadAjaxLoadingPanel runat="server" ID="progressLoader" MinDisplayTime="1500" InitialDelayTime="1000" Skin="Default"></telerik:RadAjaxLoadingPanel> 
<telerik:RadAjaxPanel runat="server" ID="rap_panel1" LoadingPanelID="progressLoader">  
        <telerik:RadGrid ID="RadGrid1"    
                         runat="server"   
                         GridLines="Vertical" 
                         ShowGroupPanel="True"   
                         PageSize="18"   
                         AllowSorting="true"   
                         AllowPaging="true"   
                         AutoGenerateColumns="false"   
                         EnableHeaderContextMenu="true" 
                         Skin="Default">              
            <ExportSettings> 
                <Pdf FontType="Subset" PaperSize="A4" /> 
                <Excel Format="Html" /> 
                <Csv ColumnDelimiter="Comma" RowDelimiter="NewLine" /> 
            </ExportSettings> 
            <MasterTableView DataKeyNames="ROWCLICK" GroupLoadMode="Client" CommandItemDisplay="Top">  
                <PagerStyle  Mode="NextPrevNumericAndAdvanced" /> 
 
               <CommandItemTemplate> 
 
                      <asp:LinkButton ID="btn_save" runat="server" CommandName="saveGrid" ><asp:Image runat="server" ID="img_save" ImageUrl="~/_resources/images/icons/tick.png"/></asp:LinkButton> 
                        <asp:LinkButton ID="btn_excel" runat="server" CommandName="excel" ><asp:Image runat="server" ID="Image1" ImageUrl="~/_resources/images/icons/xls_grey.gif"/></asp:LinkButton> 
                        <asp:LinkButton ID="btn_pdf" runat="server" CommandName="pdf" ><asp:Image runat="server" ID="Image2" ImageUrl="~/_resources/images/icons/pdf.gif"/></asp:LinkButton> 
                          
                      
                </CommandItemTemplate> 
            </MasterTableView> 
            <ClientSettings ReorderColumnsOnClient="True"   
                            AllowDragToGroup="True"   
                            AllowColumnsReorder="True"   
                            EnablePostBackOnRowClick="true"   
                            AllowGroupExpandCollapse="true">  
                <Resizing AllowRowResize="True"   
                          AllowColumnResize="True"   
                          EnableRealTimeResize="True" 
                          ResizeGridOnColumnResize="False">  
                </Resizing> 
            </ClientSettings> 
        </telerik:RadGrid> 
</telerik:RadAjaxPanel> 


    Protected Sub RadGrid1_ItemCreated(ByVal sender As ObjectByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated  
 
        Dim item As GridCommandItem = TryCast(e.Item, GridCommandItem)  
        If item IsNot Nothing Then 
            Dim btn As Button = TryCast(item.FindControl("btn_excel"), Button)  
 
        End If 
 
    End Sub 

Any help would be much appreciated.
mabs
Top achievements
Rank 1
 answered on 28 Jun 2010
1 answer
196 views
I'm trying to programatically allow a user to select a row in a RadGrid, then disable the grid completely and edit information (outside of the Grid), then rebind it and allow the user to be able to select, sort and filter data.  However, when I set the radgrid.Enabled to false, it still allows me to select rows and interact with the grid.  It doesn't matter if I am doing it through code, or directly in the properties for the grid.  I've even tried to put the grid in a panel, and disable the panel, but the grid still functions. 

The only way that I've found that I can disable the ability to select a row (the only thing that I really need to do), is to set the RadGrid.ClientSettings.Selecting.AllowRowSelect to false while I'm doing the editing, then set it back to true.  However, I can still sort on the table.

Also, the version that I'm using is 2009.2.701.35 if that makes a difference.  I looked through the forums and did not see any mention of this.

Thanks.
Shinu
Top achievements
Rank 2
 answered on 28 Jun 2010
3 answers
420 views
I have the following setting

.RadForm_CustomVista table.rfdRoundedWrapper:hover .rfdRoundedOuter 
    background-color: #c5daed !important; 
 
This colors the side of rounded input controls. My problem is that I'd like to have it not apply to disabled textboxes, but I can't seem to figure out how to do that.

Another problem is that if I disable the textboxes in the codebehind, the side borders will disappear entirely.

Thanks

EDIT: On further examination, I've discovered that the missing side borders happens with a RadMultipage with RenderSelectedPageOnly="false" for disabled textboxes if they are on a tab that is not currently selected when a postback occurs.
Bozhidar
Telerik team
 answered on 28 Jun 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?