Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
487 views
Hi .
I want to compress all my files uploaded via Radasyncupload and save them as a zip file in a specific folder .
how can I do this . 
tnx
Shinu
Top achievements
Rank 2
 answered on 03 Jul 2013
0 answers
92 views
I am adding my field editors in code behind in Page_Init on every post pack (per the documentation). Some of the field editors are custom types. When I select the field associated with a custom editor, I get the following error:

Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 

[NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.Web.UI.RadFilterDataFieldEditor.CreateEditorFrom(RadFilterDataFieldEditor baseEditor) +110
   Telerik.Web.UI.RadFilterDataFieldEditorCollection.RetrieveEditorForFieldName(String fieldName) +68
   Telerik.Web.UI.RadFilter.ChangeExpressionFieldName(RadFilterSingleExpressionItem item, String fieldName) +124
   Telerik.Web.UI.RadFilterCommandEventArgs.ExecuteCommand(Object source) +1277
   Telerik.Web.UI.RadFilter.OnBubbleEvent(Object source, EventArgs args) +219
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.Web.UI.RadFilterExpressionItem.OnBubbleEvent(Object source, EventArgs args) +120
   Telerik.Web.UI.RadFilterExpressionItem.FireCommandEvent(String commandName, Object commandArgument) +88
   Telerik.Web.UI.RadFilter.HandleClientCommand(String commandName, String commandArgs) +791
   Telerik.Web.UI.RadFilter.RaisePostBackEvent(String eventArgument) +127
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9642338
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18045



My custom rad filter field editor types are created like the example in the documentation. While debugging, none of the overridden methods in my custom editor are ever called.

I am using the latest 2013 Q2 release for .NET 4.5
Kyle Smith
Top achievements
Rank 1
 asked on 03 Jul 2013
2 answers
159 views
for editing appointments,
the function:
            function AppointmentEditing(sender, eventArgs) 
            { 
                
                var apt = eventArgs.get_appointment(); 
                alert(apt.ID); 
                window.radopen("AdvancedFormCS.aspx?Mode=Edit&AppointmentId=" + apt.ID, "AdvancedForm"); 
 
                eventArgs.set_cancel(true); 
                currentApt = null
            }
 
the apt.ID returns undefined.
I started debugging and tracing the javascript and it seems the value is instead,
apt._id
is this correct?

it gives me the right id, just don't see this documented anywhere and apt.ID is undefined.
my page is inside a master page.

want to make sure we are using the right values.
I'm using: Telerik.Web.UI Trial Version 2008.1.401.20


David
Top achievements
Rank 1
 answered on 02 Jul 2013
3 answers
117 views
Hello,

Have a treeview and multiple nodes selected.

On server side click of context menu can not get the treeview selected nodes as always returns a count of 0.
How can I get the selected nodes to apply the context menu command to each?

Example: 
select 3 nodes and context menu command "Copy"
on server side can only ever access the node via RadTreeViewContextMenuEventArgs node

Need to be able to loop and do the "Copy" command on the 3 selected nodes...

Thanks,

Marc Cramer
cramer
Top achievements
Rank 1
 answered on 02 Jul 2013
2 answers
99 views

 I have a requirement to put multiple series into a chart. Each series should have a label & the item in the series should also have a label on the x-axis.
 I cannot find any samples that would help me with this and have been banging my head at it for the day.

 I've attached a sample of what our graph should look like. Any help on this would be great!


Thanks
Jeff
Top achievements
Rank 1
 answered on 02 Jul 2013
2 answers
93 views
I'm trying to create a Gantt chart out of the HtmlChart controls.

Is there any way to rotate the Candlestick horizontally.
The Bar Chart only takes a CategorySeriesItem that extends SingleValueSeriesItem.
  - Is there a way to extend this and y2?



Thanks
Steve
Steve
Top achievements
Rank 1
 answered on 02 Jul 2013
2 answers
162 views
Dears,

I am using HtmlChart and encounter some problems.
(1).I try to create series from the data table by creating SeriesItem which needs X and Y values. I saw the item must be decimal but actually my data is X:datetime, and Y:Decimal type. How to create the X value by datetime or even the string value?

ScatterLineSeries series1 = new ScatterLineSeries();
                series1.Name = "date_time";
                series1.LabelsAppearance.Visible = false;

foreach (DataRow row in MyDataTable.Rows)
                {
                    string xx = "traffic_erlang";
                    SeriesItem item1 = new SeriesItem( 100,(decimal)row[xx]); //I put the static value 100 as I don't know how to put the datetime/string
                   
                    series1.Items.Add(item1);

              RadHtmlChart1.PlotArea.Series.Add(series1);
                    RadHtmlChart1.PlotArea.Series.Add(series2);
                    
                }

(2).Do we have any other ways to bind data from datatable by grouping the fields so the dynamic series will be created.
example:
--------------------------
ID | Name | Value
--------------------------
1 | ABC | 200
2 | GED | 340
...... which Name is the dynamic data
Tony
Top achievements
Rank 1
 answered on 02 Jul 2013
3 answers
797 views
I have a simple upload page that runs fine locally on my dev box but throws a nasty 500 error on the server, I have set the upload folder permissions to allow full control to everyone--any ideas?

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">

        <link href="Upload.css" rel="Stylesheet" type="text/css" />
        <script type="text/javascript">
            //<![CDATA[
            function validationFailed(sender, eventArgs) {
                $(".ErrorHolder").append("<p>Validation failed for '" + eventArgs.get_fileName() + "'.</p>").fadeIn("slow");
            }
            //]]>
        </script>

        <div class="MainWrap">
            <div class="TopWrap">
                <div class="Holder">
                    <telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" AllowedFileExtensions=".txt,.csv" TargetFolder="c:\Files\Import"
                        OnFileUploaded="RadAsyncUpload1_FileUploaded" OnClientValidationFailed="validationFailed">
                    </telerik:RadAsyncUpload>
                    <telerik:RadButton runat="server" ID="BtnSubmit" Text="Submit" Skin="Metro">
                        <Icon SecondaryIconLeft="5" SecondaryIconTop="3" SecondaryIconUrl="images/gear.png" />
                    </telerik:RadButton>
                    <p>
                        Select File To Upload (formats accepted .csv,.txt, only)
                    </p>

                    <div class="ErrorHolder">
                    </div>
                </div>
                <div class="Holder Right">
                    <asp:Panel runat="server" ID="ResultsPanel" Visible="false">
                        <asp:Panel ID="ValidFiles" Visible="false" runat="server">
                            <p>
                                <asp:Label runat="server" ID="lblFileUpload" Font-Bold="True" /><br/>
                                <asp:Label runat="server" ID="lblBatchId"/><br/>
                                 <asp:Label runat="server" ID="lblProcessTime"/>
                            </p>
                            <p>
                                <telerik:RadButton ID="BtnImport" runat="server" Text="Import" OnClick="BtnImport_Click" Skin="Metro" Visible="false">
                                    <Icon SecondaryIconLeft="5" SecondaryIconTop="3" SecondaryIconUrl="images/find.png" />
                                </telerik:RadButton>
                            </p>
                            <br />
                            <asp:Label ID="lblMessage" runat="server" Visible="false" />
                        </asp:Panel>
                        <asp:Panel ID="InvalidFiles" Visible="false" runat="server">
                            <p>
                                <strong>The following files were not saved due to exceeding the maximum total size:</strong>
                            </p>
                        </asp:Panel>
                    </asp:Panel>
                </div>
                <div class="BottomWrap">
                </div>
            </div>
        </div>
    </telerik:RadAjaxPanel>
 public void RadAsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e)
    {
        Label fileName = new Label();
        fileName.Text = e.File.FileName;
        Session["FileName"] = e.File.FileName;

        if (totalBytes < MaxTotalBytes)
        {
            // Total bytes limit has not been reached, accept the file
            e.IsValid = true;
            totalBytes += e.File.ContentLength;
        }
        else
        {
            // Limit reached, discard the file
            e.IsValid = false;
        }

        if (e.IsValid)
        {
            ValidFiles.Visible = true;
            ValidFiles.Controls.Add(fileName);
            BtnImport.Visible = true;
            lblMessage.Visible = true;
            lblFileUpload.Text = @"File Upload Was Successful";

        }
        else
        {
            InvalidFiles.Visible = true;
            InvalidFiles.Controls.Add(fileName);
        }
    }
Hristo Valyavicharski
Telerik team
 answered on 02 Jul 2013
5 answers
526 views
Hi,

I do like this new RadSearchBox control, but I am having a few small problems.

First, I am having difficulty accessing the control client side.  I've used several variations of $find to no avail.  Would someone please suggest some alternative syntaxes.

Second, once I find this control, I would like to .clear() it of its previous search text/value.  I've tried to do this on the OnClientSearch event (using sender.clear()), but no luck with that either. 

Any suggestions?

Jim
Evgeniy Ovcharenko
Top achievements
Rank 1
 answered on 02 Jul 2013
2 answers
298 views
Howdy all.

I've got a 'fun' situation.  I have a vertical grown, image only menu on my left hand side, and a right side content area.  The idea is that on the right, you'll see pertinent employee data, and the menu will pull up extra info as you wish to see it, through RadWindows.  I'm using an OffsetElementID of my header on the right hand side, which (as I understand it) should mean that if I have set Top and Left at 0, my window should have a matching upper left hand corner as the header.

That's not what it's doing right now.  I can't get it to respect Top at all.  It'll go Left any way I tell it, but it won't go up further than it's initially appearing on the page.  Here's my code, and a picture to hopefully illustrate what I mean.

I've also included my Javascript, which I got off these forums for how I'm opening and closing the windows.  I tried programmatically setting them in there with oWindow.set_top(0); and oWindow.set_left(0);, but that didn't work.

Thanks for your help!

<telerik:RadMenu id="menuMain" ClientIDMode="Static" runat="server" flow="Vertical" OnClientItemClicked="MenuOpenWindow" Width="100%"
    BackColor="#37495D">
    <Items>
      <telerik:RadMenuItem ImageUrl="../Images/button1.png" Value="EmpProj" />
    </Items>
</telerik:RadMenu>
 
 
 
<telerik:RadWindow id="winProjList" runat="server" Top="0" Left="0" Style="z-index: 8000" EnableEmbeddedSkins="false" OffsetElementID="divEmpHeader"
    ShowContentDuringLoad="false" VisibleStatusbar="false" VisibleTitlebar="false" AutoSize="true">
    <ContentTemplate>
        <div id="divProjListList" runat="server" style="width: 400px;">
            <div>Projects</div>
            <div style="width: 400px">
                <telerik:RadGrid ID="grdCheckAcctList" runat="server" AutoGenerateColumns="False"
                    Skin="" EnableLinqExpressions="False" CellSpacing="0" EnableViewState="False">
                    <ClientSettings Selecting-AllowRowSelect="true" EnablePostBackOnRowClick="true" />
                    <MasterTableView DataKeyNames="KeyColumn" ShowHeader="true" HeaderStyle-HorizontalAlign="Center" EnableViewState="false">
                        <Columns>
                            <telerik:GridBoundColumn DataField="Department" />
                            <telerik:GridBoundColumn DataField="Project" />
                            <telerik:GridBoundColumn DataField="Supervisor" />
                            </telerik:GridBoundColumn>
                        </Columns>
                        <HeaderStyle HorizontalAlign="Center" />
                    </MasterTableView>
                    <FilterMenu EnableImageSprites="False">
                    </FilterMenu>
                </telerik:RadGrid>
            </div>
        </div>
    </ContentTemplate>
</telerik:RadWindow>

<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script type="text/javascript">
        //Global Variables
        var lastOpenedWindow;
         
        function pageLoad() {
            $addHandler(document, "click", onClickHandler);
        }
 
        function MasterMenuOpenWindow(sender, eventArgs) {
            var oWindow;
 
            //Closes the last window opened
            if (lastOpenedWindow) {
                lastOpenedWindow.close();
                lastOpenedWindow = null;
            }
 
            if (eventArgs.get_item().get_value() == "EmpProj") {
                oWindow = $find("<%=winEmpProj.ClientID%>");
                      oWindow.set_top(0);
                      oWindow.set_left(0);
                      oWindow.show();
                lastOpenedWindow = oWindow;
                return false;
            }
        }
 
        function onClickHandler(e) {
            var targedNodeName = e.target;
 
            if (lastOpenedWindow) {
                // If the RadWindow is clicked then do nothing ;
                if ($telerik.isMouseOverElementEx(lastOpenedWindow.get_popupElement(), e)) return;
 
                lastOpenedWindow.close();
                lastOpenedWindow = null;
            }
        }
    </script>
</telerik:RadScriptBlock>
Amanda
Top achievements
Rank 1
Iron
 answered on 02 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?