Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
201 views
Is there a way to force a file download instead of opening PDF/HTML in the browser with the built in MasterTableView.ExportToXXXX() function?
Marin Bratanov
Telerik team
 answered on 30 Jan 2019
4 answers
661 views

Hi, I am using RadUpload control of telerik. I have added Rad upload on page and one asp Text box. what I want to do is OnClientFileSelected event selected file path get added in asp Text box at client side. I did tried following ways but i got only file name i.e. test.text or test.doc. I do want to add entire path in asp text box like "C:\folder1\folder2\test1.txt". How should i do this.

function fileSelected(radUpload, eventArgs)
 
{
   
var input = eventArgs.get_fileInputField().value;
   document
.getElementById("<%= txtPath.ClientID %>").value=input;
 
}

Thanks In Advance

Rumen
Telerik team
 answered on 30 Jan 2019
1 answer
88 views
I'm using J Query to detect the if an <EM> tag is found in a specific field and only showing it if the EM tag is in the field. The problem is it I've applied the script on the keypress event, and the applying of the <Em> tags seems to happen after the keypress event. What client event happens after after the applying of av<Em> tags, that I can apply my script?
William
Top achievements
Rank 1
 answered on 29 Jan 2019
4 answers
582 views

I put an Ajax panel on my page but now downloads do not work, I know is cause of the response.write stream.  I s there a way to get around this in the code behind of the itemCommand.  The downloads are in a sub grid of my main grid so I cannot take it out of the ajax panel.

 

<DetailTables>
                               <telerik:GridTableView DataKeyNames="intUploadId" Name="SubGrid" Width="50%" TableLayout="Fixed" Font-Size="10" AutoGenerateColumns="False" SkinID="Web20">
                                       <ParentTableRelation>
                                           <telerik:GridRelationFields DetailKeyField="intWarrantyNumId" MasterKeyField="intWarrantyNumId" />
                                       </ParentTableRelation>
                                       <HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
                                       <ItemStyle HorizontalAlign="Center"  />
                                       <AlternatingItemStyle HorizontalAlign="Center" />
                                       <Columns>
                                            <telerik:GridTemplateColumn HeaderText="File">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="lnkDelete" runat="server" CommandArgument='<%# Bind("intUploadId")%>' CommandName="DeleteDoc" OnClientClick="return confirm('Are you sure you want to delete this attachment');">
                                                        <asp:Image ID="imgDelete" runat="server" ImageUrl="~/Images/Delete Circle Small.png" BorderStyle="None" />
                                                    </asp:LinkButton>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>  
                                            <telerik:GridTemplateColumn HeaderText="File">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="lnkFile" runat="server" Text='<%# Bind("strLocation")%>' CommandArgument='<%# Bind("strLocation")%>' CommandName="Download"></asp:LinkButton>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>  
                                       </Columns>
                               </telerik:GridTableView>
                           </DetailTables>
 
 If (e.CommandName = "Download") Then
           Dim filename As String = e.CommandArgument.ToString
           'Dim path As String = Server.MapPath("~/RMAUploads/" & filename)
           Dim targetfolder As String = "\\" & ServerName & "\iPBR\Warranty\" & filename
           Response.AddHeader("Content-disposition", "attachment; filename=" & filename)
           Response.ContentType = "application/octet-stream"
           Response.WriteFile(targetfolder)
           Response.End()
       End If

jajanes
Top achievements
Rank 1
 answered on 29 Jan 2019
1 answer
151 views

Hello,

I have found a weird problem with detail tables.  After assigning the correct datakeys to the tables I found that one of my detail tables was not working even though there was nothing wrong with the query nor the detail table structure.

After a bunch of trial and error I found that unless the datakey names are the same in the Master and Detail grids, detail grids will not query any data.

In my mind this is a bug as we can assign whatever datakey names we want in the DataKeys attribute.  The grid should not be enforcing a foreign key naming constraint, while a lot of the time these will be the same some times they will not and in those cases the master/detail relationship within the RadGrid breaks and does not work properly.

Full disclosure, our Telerik version is so old no one knows what version it is and we don't have access to the source files anymore to find out.  It is a good bet it is pre-2013.

Attila Antal
Telerik team
 answered on 29 Jan 2019
1 answer
185 views

Hi,

Dont you feel load on demand feature should also be there ? If it is already there I have not found any mention of it any where. Can I get some clue on it ?

 

Thanks

 

Milind Shevade

Peter Milchev
Telerik team
 answered on 29 Jan 2019
3 answers
295 views

Can a radiobuttonlist trigger a call to ItemCommand inside a RadGrid.  Below, the button works, but the radiobuttonlist does not hit the event in code behind.

<telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Approvals" UniqueName="Approvals">
    ItemStyle HorizontalAlign="Left" Width="140" />
    <HeaderStyle HorizontalAlign="Left" Width="140" />
    <HeaderTemplate>
    </HeaderTemplate>
    <ItemTemplate>
        <asp:RadioButtonList ID="rdoApprovals" runat="server" RepeatDirection="Horizontal"
                    CommandName="ApproveDeny">
                    <asp:ListItem Value="1">Approve</asp:ListItem>
                    <asp:ListItem Value="2">Deny</asp:ListItem>
            </asp:RadioButtonList>
        <asp:Button ID="btnTest" runat="server" Text="test" CommandName="test" />
    </ItemTemplate>
</telerik:GridTemplateColumn>
Eyup
Telerik team
 answered on 29 Jan 2019
6 answers
357 views
A root node is interpreted by RadTreeView as any node with a DataFieldParentID of null or empty default value.

I have a hierarchy which is cut from a larger hierarchy and as a result, the Parent value (a Guid in this case) of the nodes I want to root are set to specific values.  As I am binding to an ObjectDataSource I simply overwrite the Parent Guid for the root nodes in my BL with Guid.Empty.

However it would be nice if there were some way to specify the root value to hook on to so this fudge would not be necessary.

One alternative I tried was to create a static node with a value of the specific root Guid I want to hook on to.  However I found that even with AppendDataBoundItems enabled the bound data does not hook on to the single, static, root node.

Has anyone else shared my experience?

Thanks
Neal
Top achievements
Rank 1
 answered on 29 Jan 2019
1 answer
253 views

I was looking at the demos and playing around with the upload control.  It seems that its designed to either be File uploads or Directory uploads, not do both at the same time. It seems we would would have to have two buttons one to allow choosing files and one to allow choosing a directory. The same with drop locations we could have a custom zone that accepts files and we would have to have another custom zone that only accepts a directory.

Below are some scenarios to help explain. I would love to know if all of these scenarios are possible and if so how. If they all of them are not then I would like to know what the reasoning is behind this limitation.

Scenario One

The user click an "upload" button that they can choice either 1 or more files, or 1 or more directories and the control will handle uploading all of them

Scenario Two

The user drags some files to a drop location and it detects they are files and uploads

Scenario Three

The user drags one or more directories to the same drop location as above and it detects they are directories and uploads the files represented within

 

 

Marin Bratanov
Telerik team
 answered on 29 Jan 2019
5 answers
338 views

Rad Editor content is not coming in <p> tag for single line text.

In Current Version 2018.2.710.45

While I put single line text like "Test" in rad editor and getting value in debug mode as "Test" 

 

In Previous Version 2013.2.717.45
While I put single line text like "Test" in rad editor and getting value in debug mode as "<p>Test</p>" 

 

My expected result is "<p>Test</p>"  in this version 2018.2.710.45;

 

This is happening only for single line text .

 

Please give any solution.

 

Rumen
Telerik team
 answered on 29 Jan 2019
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?