Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
273 views
Hi

I have developed an external .js file for an ASP.NET system which executes the following...
function ProcessUpdate(arg) {
    var ram = $telerik.$("[id$='RadAjaxManager1']").attr("id");
    var ajaxManager = $find(ram);
    if (!arg) { ram.ajaxRequest("Rebind"); } else if (arg == 'navigateToInserted') ram.ajaxRequest("RebindAndNavigate"); else if (arg.match(/navigateToDeleted.*/)) ram.ajaxRequest(arg);
}


  I am trying to execute the RadAjaxManager ajaxRequest along with the proper argument, but so far all I am getting is an error 'Cannot call method 'ajaxRequest' of null'.  I am able to get reference to the RadAjaxManager object on the page, but the method is not available for referencing at this point.

Any help or comments would be appreciated!

Regards
Maria Ilieva
Telerik team
 answered on 07 May 2014
1 answer
112 views
Hi,  
I have used following ajax manager in my page and i have used user control Schedule_Review_Narrative1 on this page to which i have tool into ajax manager 
and i have my grid in Schedule_Review_Narrative1 and in that grid i have applied code to download image but not able to download image.

Problem : i want to use ajax in grid as well as i need to run code to download document. 

<telerik:RadAjaxManager ID="RAMMileston" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Schedule_Review_Left_Navigation1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Schedule_Review_Narrative1" />
                    <telerik:AjaxUpdatedControl ControlID="Schedule_Review_Left_Navigation1" />
                      </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

in link button i have gave command name  to link button and in rggrid_ItemCommand () i have gave following code but not able to download so please help me in this 

    else if (e.CommandName == "DownloadFile")
                    {
                       
                            SqlConnection objSqlCon = new SqlConnection(db.ConnectionString);
                            objSqlCon.Open();
                            SqlTransaction objSqlTran = objSqlCon.BeginTransaction();

                            SqlCommand objSqlCmd = new SqlCommand("Procedure_Name", objSqlCon, objSqlTran);
                            objSqlCmd.CommandType = CommandType.StoredProcedure;

                            SqlParameter objSqlParam1 = new SqlParameter("@FileGUID", SqlDbType.VarChar);
                            objSqlParam1.Value = e.CommandArgument;

                            objSqlCmd.Parameters.Add(objSqlParam1);
                            string path = string.Empty;
                            string FileType = string.Empty;
                            string FormName = string.Empty;

                            using (SqlDataReader sdr = objSqlCmd.ExecuteReader())
                            {
                                while (sdr.Read())
                                {
                                    path = sdr[0].ToString();
                                    FileType = sdr[1].ToString();
                                    FormName = sdr[2].ToString();
                                }

                            }

                            objSqlCmd = new SqlCommand("SELECT GET_FILESTREAM_TRANSACTION_CONTEXT()", objSqlCon, objSqlTran);
                            byte[] objContext = (byte[])objSqlCmd.ExecuteScalar();
                            SqlFileStream objSqlFileStream = new SqlFileStream(path, objContext, FileAccess.Read);
                            byte[] buffer = new byte[(int)objSqlFileStream.Length];
                            objSqlFileStream.Read(buffer, 0, buffer.Length);
                            objSqlFileStream.Close();

                            objSqlTran.Commit();
                            FormName = FormName.Replace(";", "").Replace(",", " ");
                            Response.AddHeader("Content-disposition", "attachment; filename=" + Path.GetFileName(FormName) + FileType);
                            // Here you need to manage the download file stuff according to your need
                            Response.ContentType = "application/octet-stream";
                            Response.BinaryWrite(buffer);
                            Response.End();
                        
                    }

Please help me in this.
Thanks
Manish
Maria Ilieva
Telerik team
 answered on 07 May 2014
1 answer
161 views
Hi Telerik,

Are any events fired at the beginning/end of the drawing actions, ideally that can report back to the server in some way? I would like to be able to capture the starting and ending coordinates when a user draws a circle or rectangle using the image editor controls so that I can flag the image as altered when the Apply button is clicked, as well as write it to the database along with an explanation/annotation for explain why it was done (using this for redaction) when the image is saved.
Vessy
Telerik team
 answered on 07 May 2014
1 answer
111 views
When editing a grid, the pagelayout seems not to work well in edit form templates. I believe it does not account for the space consumed outside of the template, the grid itself and any other space between grid and edge boundary of screen. I have add the pagelayout with in the edit form and also wrap the grid with the pagelayout control. No effect.
Venelin
Telerik team
 answered on 07 May 2014
3 answers
186 views
Hi,

When using bootstrap, the RadMenu with RepeatColumns = 2 setting renders as single column because bootstrap forces the box-sizing: border-box rule. If we include this CSS rule, the multi-column render correctly:

ul.rmMultiColumn
{
   box-sizing: content-box;
}

Please include the box-sizing rule into the RadMenu out of the box. Thanks,
Magdalena
Telerik team
 answered on 07 May 2014
7 answers
264 views
I have been experimenting with the advanced binding features of the RadTreeView and have hit a wall in my knowledge level. Perhaps one of you can answer it.

I have a simple database schema, as shown in the attached picture.
Manufacturers can have Products which in turn have multiple Parts.

The project contains the Linq to Sql model (also shown)

I am try to have the tree bind the various levels using the RadTreeNodeBinding technique.

<telerik:RadTreeView ID="RadTreeView1" runat="server">
    <DataBindings>
        <telerik:RadTreeNodeBinding Depth="0" TextField="ManufacturerName" ValueField="ManufacturerID" />
        <telerik:RadTreeNodeBinding Depth="1" DataMember="Products" TextField="ProductName" ValueField="ProductID" />
        <telerik:RadTreeNodeBinding Depth="2" DataMember="Parts" TextField="PartName" ValueField="PartName" />
    </DataBindings>
</telerik:RadTreeView>

with code behind

protected void Page_Load(object sender, EventArgs e)
{
    if (!this.IsPostBack)
    {
        DataClasses1DataContext db = new DataClasses1DataContext();
        RadTreeView1.DataSource = db.Manufacturers;
        RadTreeView1.DataBind();
    }
}

Only the root nodes of Manufacturer show up, shouldnt it traverse automatically by setting the "DataMember" property to the Property of the LinqToSql Entity that has children entities?
Dimitar Terziev
Telerik team
 answered on 07 May 2014
1 answer
224 views
Hi,
After reading posts in different sited for hours, i couldn't find the problem in my code.
I'm using telerik rad chart and need to create a stacked bar chart, according to this data table structure:

Work Week         Product         Quantity
-------------------------------------------------------
201401               a                      10
201401               a                      20
201402               a                       5
201402               b                      10
201402               c                       6
201418               a                      10
201418               b                       25

I know there is a similar question to this, and you referred them to:
 http://www.telerik.com/help/aspnet-ajax/chart-grouping-databound-items.html


but its not helping. 
My code is:

        RadChart1.DataSource = dataForGraph; //dataForGraph is a data table
        RadChart1.DataGroupColumn = "product";
        RadChart1.PlotArea.XAxis.DataLabelsColumn = "WW";
        RadChart1.Legend.Appearance.GroupNameFormat = "#NAME:#VALUE";
        
        RadChart1.DataBind();
        foreach (ChartSeries s in RadChart1.Series)
        {
            s.Type = ChartSeriesType.StackedBar;
        }
And the result is that the quantity is stacked in wrong places (for example quantity 25 is in 201401 instead of 201418)
What am i doing wrong?

Thx,




Danail Vasilev
Telerik team
 answered on 07 May 2014
9 answers
308 views
Hi,

I am working on an ASP.Net Application which uses Telerik Rad Ajax tools in it. We have recently upgraded the Telerik version to the latest Q3 2012 version (2012.3.1308.35) from the Q3 2011 version. After the upgrade, the Image manager tool of the Rad Editor is behaving absurd. Firstly, the Upload and Delete button are not visible at all on the Image Manager window even though no change was made in the code. When I add the UploadPath parameter in the Image Manager declaration code, the button appears but the upload event is not fired on clicking the button. When I right- click on the folder named XYZHandler (where all images are kept) in the window, it gives me options to UPLOAD or RENAME. On selecting Upload, I get the window with Browse and Insert buttons but on selecting a file and uploading, it gives an error stating : File cannot be written to the given target.

Has the way of handling images in the Image manager changed in the latest version ? If so, could you please explain how. If not, what could be causing this issue ?

Please provide me a solution to this.

Thanks & Regards,

Manisha
Vessy
Telerik team
 answered on 07 May 2014
3 answers
323 views
I would like the Text to contain the combination of the data source's id and name fields.  For example the control:

<telerik:RadListBox runat="server" ID="lstAvailableRemarkCode" Width="500px"<br>                                       Height="300px" SelectionMode="Multiple" AutoPostBackOnReorder="true" EnableDragAndDrop="true"<br>                 OnDropped="RadListBox_Dropped" AllowTransfer="true" TransferToID="lstAssignedRemarkCode"<br>                     ButtonSettings-RenderButtonText="true" Localization-ToRight="Add" Localization-ToLeft="Remove"<br>               ButtonSettings-ShowTransferAll="False" ButtonSettings-ShowReorder="False" ButtonSettings-ShowDelete="False"
    ButtonSettings-HorizontalAlign="Center" ButtonSettings-VerticalAlign="Middle"
    ButtonSettings-AreaWidth="30px"
    DataTextField="RemarkCodeID,Name" DataTextFormatString="{0} - {1}" DataValueField="RemarkCodeID"    
    OnItemDataBound="lstAvailableRemarkCode_ItemDataBound">
    <ButtonSettings AreaWidth="100" />
</telerik:RadListBox>

But in code behind I get an error that source does not have a field 'RemarkCodeID,Name' at the DataBind:

Is there a way I can Implement this?
Nencho
Telerik team
 answered on 07 May 2014
2 answers
254 views
Hello all,

This is my first post on here so please feel free to point me elsewhere if the information is already on here and I couldn't find it!

Can anybody show me any examples of the RadMediaPlayer out there with the Playlist, the Title bar and the Toolbar showing but without the video content window please?

We're implementing an mp4/WAV audio player in a web app, and it's in quite a narrow portrait format showing the title of the track that's playing, the transport controls and the playlist. However all the demos on the Telerik site are of the video player so we can't see how it might look.

Many thanks!

Donal
Donal
Top achievements
Rank 1
 answered on 07 May 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?