Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
260 views
Hi,
I have a RadTreeView in a RadSlidingPane. The tree has a context menu and one of the options is Select Date. When clicking this option, I would like to pop up a modal window or pane with a RadCalendar inside. I tried to add a radcalendar to a radwindow, but it would not work . What's the best way to achieve this? 

Thanks,
awni
Shinu
Top achievements
Rank 2
 answered on 08 Nov 2011
1 answer
134 views
Hi,
I'm using this code:
function nodeClicking(sender, eventArgs) {
   var comboBox = $find("<%= radComboBoxUnits.ClientID %>");
   var node = eventArgs.get_node()
   node.set_selected(true);
   comboBox.set_text(node.get_text());
   comboBox.hideDropDown();
}

But sometimes I need to click twice on a node for the text to show up in the combobox.
I click once, and the combobox collapses but the combobox text is still the old one.
I open the combobox again and clicks on a node, this time the text is showing up.
Why is that? Can I change this code for any other "working" code?

Most of the times it works as it should, but sometimes, randomized, it's not working.

Regards,
Mattias
Princy
Top achievements
Rank 2
 answered on 08 Nov 2011
3 answers
211 views
HI,
Telerik Team

I have been using Telerik grid with Scrolling enabled, like

<Scrolling AllowScroll="true" ScrollHeight="400" SaveScrollPosition="true" UseStaticHeaders="true"

FrozenColumnsCount="2" />


but my table columns are exceding the actual size of the table, then i have included the
bellow propery (style="table-layout: fixed;")

<table border="0" align="center" cellpadding="0" cellspacing="0" style="table-layout: fixed;">

so, now my telerik grid is getting flickering when scrolling and loading.
Plese provide me the solution for this.

Hanso
Top achievements
Rank 1
 answered on 08 Nov 2011
1 answer
117 views
is that possible to export treelist?
Shinu
Top achievements
Rank 2
 answered on 08 Nov 2011
0 answers
141 views
Hi

I am trying to work on telerik Treeview Control in the follwoing scenario.

Client
...........Sites
................site1
................site2

If i have sites more than 100 then i am adding the serach control (textbox and a button) just above the site1 node, to give the user to enter the site name and click enter,it automatically shows the entered site.Everything is working fine.

Problem: As i am adding the search control dynamically , On page refresh(when i click on any node item) the search control disappears.

Below is my code:(below method will be called on OnNodeExpand="tree_NodeExpand" internally)

 

<telerik:RadPanelItem Text="ClientDetails" Expanded="True" CssClass="radPanelItem"
              DisabledCssClass="radPanelItemDisabled">

      <ContentTemplate>

             <telerik:RadTreeView ID="clienttree" runat="server" OnNodeExpand="tree_NodeExpand"
                       
EnableDragAndDrop="true"

                       OnClientNodeExpanded="cleinttree_OnClientNodeExpanded" CssClass="radTreeView">

              </telerik:RadTreeView>

        </ContentTemplate>

 </telerik:RadPanelItem>

 


 

 

Protected Sub tree_NodeExpand(ByVal sender As Object, ByVal e As RadTreeNodeEventArgs)

 

       If showSearchBox Then addSearchNode(e.Node, searchText)
End Sub

 

 

Private

Sub addSearchNode(ByVal root As RadTreeNode, ByVal defaultText As String)

Dim node As New RadTreeNode()

 node.AllowDrag = False

 node.Expanded = True

 node.ExpandMode = TreeNodeExpandMode.ClientSide

 

node.Attributes.Add(

"IsSearch", True.ToString())

 root.Nodes.Add(node)

 Dim nodeSearchBox As NodeSearchBox = LoadControl("~/Controls/TreeviewControls/NodeSearchBox.ascx")

 nodeSearchBox.ParentTreeID = root.TreeView.ClientID

nodeSearchBox.NodeID = root.ClientID

 If Not String.IsNullOrEmpty(defaultText) Then nodeSearchBox.Text = defaultText

 node.Controls.Add(nodeSearchBox)

 End Sub


Kindly Help ,

Thank you in advance
Ramesh.T.
mrramu@yahoo.com

 

Ramesh
Top achievements
Rank 1
 asked on 08 Nov 2011
2 answers
551 views
HI there,

I'm attempting to scan uploaded files for malicious content. 
I'm using the itemcommand 'UploadFile' to get a stream from the UploadedFiles property.

My problem is that regardless of content all files are uploaded with 0 bytes.
The file is created with the correct name but the file is empty.

Do I need to do something to reset the stream after reading it?
Also if I wanted to just remove the offending elements how would i do that?

     
protected void rfeFiles_ItemCommand(object sender, RadFileExplorerEventArgs e)
{
    if (e.Command == "UploadFile")
    {
        ArrayList illegalStrings = new ArrayList { "<script", "< script" };
        UploadedFileCollection _uploadedFiles = (sender as RadFileExplorer).Upload.UploadedFiles;
 
        foreach (UploadedFile file in _uploadedFiles)
        {
            StreamReader sr = new StreamReader(file.InputStream);
            string contents = sr.ReadToEnd();
 
            foreach (string badString in illegalStrings)
            {
                if (contents.ToLower().Contains(badString))
                {
                    //popup Javascript alert
                    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "KEY", "alert('Cannot upload files with <script> elements..');", true);
                    e.Cancel = true;//cancel the event
                    sr.Close();
                    break;
                }
            }
 
            // do I need to do something here? Tried file.InputStream.Position = 0;
 
            sr.Close();
        }
    }
}

Thanks for any help

Paul Carroll

Paul
Top achievements
Rank 1
 answered on 08 Nov 2011
1 answer
117 views
I have a grid with a popup edit form and a dropdown in that form. What I would like to do is if the selected value of the drop down = 'closed', Set the SQL UpdateCommand [DateClosed] = @DateClosed

So @DateClosed = Getdate()  if drop down = 'closed'
Else  @DateClosed = NULL

Thanks


Najid Hanif
Top achievements
Rank 2
 answered on 07 Nov 2011
3 answers
124 views
Dear Telerik!

Please, advice me on the following issue:

I create an appointment which has a very small duration (e.g. 1 minute). But when it renders it seems to get 0 px height.

Here below is the stack trace.

Can I adjust the appointment height somewhere in the code behind of the page so as to avoid this trouble?

Many thanks!

Stepan.
------------------------
[ArgumentOutOfRangeException: Value of Height must be non-negative. Parameter value: value] System.Web.UI.WebControls.Style.set_Height(Unit value) +8815076 System.Web.UI.WebControls.WebControl.set_Height(Unit value) +30 Telerik.Web.UI.AppointmentControl.CalculateSize() +234 Telerik.Web.UI.DayViewAppointmentControl.CalculateSize() +45 Telerik.Web.UI.Scheduler.Views.RowBuilder..ctor(IList`1 slotList, Int32 maxColumnWidth) +709 Telerik.Web.UI.Scheduler.Views.Week.RendererBase.CreateViewRows(IList`1 slotLists) +161 Telerik.Web.UI.Scheduler.Views.Week.RendererBase.CreateInnerContentTable(Control container, IList`1 slotLists) +101 Telerik.Web.UI.Scheduler.Views.Week.GroupedByResource.Renderer.CreateContentTable(SchedulerTopTable topTable) +37 Telerik.Web.UI.Scheduler.Views.Week.GroupedByResource.Renderer.GetInnerContent() +234 Telerik.Web.UI.Scheduler.Views.Week.GroupedByResource.Renderer.GetContent() +93 Telerik.Web.UI.RadScheduler.CreateContent() +122 Telerik.Web.UI.RadScheduler.CreateChildControls(Boolean bindFromDataSource) +106 Telerik.Web.UI.RadScheduler.CreateChildControls() +9 System.Web.UI.Control.EnsureChildControls() +102 System.Web.UI.Control.PreRenderRecursiveInternal() +42 System.Web.UI.Control.PreRenderRecursiveInternal() +175 System.Web.UI.Control.PreRenderRecursiveInternal() +175 System.Web.UI.Control.PreRenderRecursiveInternal() +175 System.Web.UI.Control.PreRenderRecursiveInternal() +175 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
-----------------------------

Ivana
Telerik team
 answered on 07 Nov 2011
3 answers
77 views
Dear Telerik,

Could you please advice me on the following issue:

Imagine a user selecting several time-slots of the scheduler moving a mouse with the left button clicked (the slots get painted).

I need to catch on the client the beginning of this process and its end. But the only relevant clien-side event which I've found is the "OnTimeSlotClick" which does not even fire in this case.

Is there any other relevant client side events?

Many thanks!

- Stepan.
Plamen
Telerik team
 answered on 07 Nov 2011
2 answers
60 views
I try to use multiple selection under Load on Demand modes and I set AutoCompleteSeparator and MarkFirstMatch. 
But it does't work. I just want to know it is possible to get multiple selection under loadonDemand.
Yi
Top achievements
Rank 1
 answered on 07 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?