Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
46 views
Please consider specific components to build for color themes for people with disabilities, namely:

black on yellow - black components with yellow lettering, background pages yellow

yellow on black - yellow components with black lettering, black page background

Such are the demands of EU state administrations of the Member States and therefore there is need to build such motives. It is not easy for a programmer who does not know the inside of your components.

At the same time ask for information, when available new Visual Style Builder.
Ivan Zhekov
Telerik team
 answered on 09 Jul 2015
1 answer
64 views

Hello everyone

Hopefully I am being stupid but I have the following problem with the rad file explorer. I've set it so a user can upload and delete files. If Istart with a blank cancas, i.e. nothing present in any existing folders and add/delete files, absolutely no problem at all (see Working.gif)

However, if I already have an existing file present in my file path, I experience a bit of nasty stuff (see NotWorking.gif) - as you can see, the file appears to be present, it isn't, it has been removed from the filepath as requested hence you see the 'resource not found' error when I attempt to open it.

Here is the code I have.

Markup

 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>
        <script type="text/javascript">
            (function (global, undefined) {
                function OnClientFileOpen(oExplorer, args) {
                    var item = args.get_item();
                    var fileExtension = item.get_extension();
 
                    var fileDownloadMode = true;
                    if ((fileDownloadMode == true) && (fileExtension == "txt" || fileExtension == "xls" || fileExtension == "xlsx")) {// Download the file
                        // File is a image document, do not open a new window
                        args.set_cancel(true);
 
                        // Tell browser to open file directly
                        var requestImage = "Handler.ashx?path=" + item.get_url();
                        document.location = requestImage;
                    }
                }
 
            global.OnClientFileOpen = OnClientFileOpen;
        })(window);
        </script>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="Configuratorpanel1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadFileExplorer1" LoadingPanelID="theLoadingPanel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <div>
 
 
            <telerik:RadFileExplorer runat="server" ID="RadFileExplorer1" Width="595px" Height="320px"
                OnClientFileOpen="OnClientFileOpen" EnableOpenFile="true">
                <Configuration MaxUploadFileSize="51200000"></Configuration>
            </telerik:RadFileExplorer>
 
 
        </div>
    </form>
</body>
</html>

C#

 

using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
 
public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //set properties according to configuration panel
        RadFileExplorer1.Configuration.SearchPatterns = new string[] { "*.jpg", "*.jpeg", "*.gif", "*.png", "*.txt", "*.xls", "*.xlsx" };
        RadFileExplorer1.VisibleControls = GetVisibleControls();
 
        //Set initial folder to open. Note that the path is case sensitive!
        //var filePath = "~/TestData";
        var filePath = "~/TestData/6645dc9a-5e8c-46e9-aad0-ba9b087aae4a";
        //var filePath = "~/TestData/a4089fd8-3170-4956-a8f5-1ea21a19d984";
 
        RadFileExplorer1.Configuration.UploadPaths = new string[] { filePath };
        RadFileExplorer1.Configuration.ViewPaths = new string[] { filePath };
        RadFileExplorer1.Configuration.DeletePaths = new string[] { filePath };
 
        if (!IsPostBack)
        {
            //Set initial folder to open. Note that the path is case sensitive!
            RadFileExplorer1.InitialPath = Page.ResolveUrl(filePath);
        }
 
    }
    protected Telerik.Web.UI.FileExplorer.FileExplorerControls GetVisibleControls()
    {
        Telerik.Web.UI.FileExplorer.FileExplorerControls explorerControls = 0;
        explorerControls |= Telerik.Web.UI.FileExplorer.FileExplorerControls.All;
        return explorerControls;
 
    }
}

If anyone can point out what I am doing wrong or what else I may need to implement, I'd be most grateful.

Rich

 

Vessy
Telerik team
 answered on 09 Jul 2015
1 answer
92 views
Is it possible to have the ConfigurationPanelSettings panel in the radpivot slide so the configuration panel can be hidden when not needed and provide more screen space for the pivot table?
Eyup
Telerik team
 answered on 09 Jul 2015
4 answers
167 views
I have a rad pivot grid and I am trying to export the grid to pdf and csv.  I am able to export it to excel.   Is there a work around to get it exported to other formats.  Would appreciate any suggestions you might have.

I tried this for .csv  but I am unable to get any data.  

protected void btnExportCSV_Click(object sender, EventArgs e)
 {
  Response.Clear();
  Response.Buffer = true;
  Response.AddHeader("content-disposition",
   "attachment;filename=GridViewExport.csv");
  Response.Charset = "";
  Response.ContentType = "application/text";

  RadPivotGrid1.AllowPaging = false;
  RadPivotGrid1.DataBind();

  StringBuilder sb = new StringBuilder();
  for (int i = 0; i < RadPivotGrid1.Fields.Count; i++)
  {   
    //add separator
   sb.Append(RadPivotGrid1.Fields[i].ToString() + ',');
   }
   //append new line
   sb.Append("\r\n");
   lblTest.Text = sb.ToString();
  Response.Output.Write(sb.ToString());
  Response.Flush();
  Response.End();
 }

I think I am not doing this right?  What is the best way to loop through the cells in a pivot grid and get data.  
  for (int i = 0; i < RadPivotGrid1.Fields.Count; i++)
  {   
    //add separator
   sb.Append(RadPivotGrid1.Fields[i].ToString() + ',');
   }

Thanks
nagaraju
Top achievements
Rank 1
 answered on 09 Jul 2015
1 answer
500 views

Hi there,

I do need to create 3 new columns dynamically according to the data existence in the database. This approach has been done successfully and it works very well.

 The issue occurs once the user clicks on the export button and the header does disappear and the data appears as "System.Data.DataRowView" in the excel sheet.

The following event is to load the grid. I do need to create programmatically, because I have to rename the column header according to the data that I receive. 

//Add in name column
                GridBoundColumn col = new GridBoundColumn();
                col.HeaderText = addition1;
                col.DataField = "Additional1";
                col.UniqueName = "Additional1";
                // col.Display = false;
                RadGrid1.MasterTableView.Columns.Add(col);
                col = new GridBoundColumn();
                col.HeaderText = addition2;
                col.DataField = "Additional2";
                col.UniqueName = "Additional2";
                // col.Display = false;
                RadGrid1.MasterTableView.Columns.Add(col);
                col = new GridBoundColumn();
                col.HeaderText = addition3;
                col.DataField = "Additional3";
                col.UniqueName = "Additional3";
                //col.Display = false;
                RadGrid1.MasterTableView.Columns.Add(col);
 

So, after the above code, I do create a Data Table and bind the data in it and bind the Data Table in RadGrid.DataSource.

The look of the grid is okay. That means the column and the data are appearing perfectly. 

However, once it comes on the excel file, the column text disappears and the content for these columns are appearing as "System.Data.DataRowView"

What could be the reason? - Thank you

Mehmet
Top achievements
Rank 1
 answered on 09 Jul 2015
1 answer
100 views

Good morning

I'd like to know if there is a full functionality for QR Code in UI for Asp.net AJAX 2012.2.815. I have a purchased license and I need to know if I can embed the whole QR Code functionality without purchasing a new product (for example the latest version of 2015). If there is that possibility what is the estimated cost for this?

Thnx

Billy P.

Athens

Pavlina
Telerik team
 answered on 08 Jul 2015
2 answers
158 views

I have been following this thread (http://www.telerik.com/forums/radasyncupload-clear-items-using-serverside-code) for a similar issue.

Issue: "I am using RadAsyncUpload to upload files. I have a 'Cancel' button which the user can click anytime after selecting the files. I want to clear the selected files - or in other words reset the RadAsyncUpload Control when 'Cancel' button is clicked." (by Liby George)

Solution: Please include the following line of code in your click handler for the "Cancel" button.
//JavaScript
$telerik.$(".ruInputs li .ruRemove").click()
This will go through the files <li> elements and click on the "Remove" link.  (by Boyan Dimitrov)

My problem: Since there are severals RadAsyncUpload along with coresponding buttons in one page, this will clear all selected files of all upload controls for a single click . How can I clear the items of one RadAsyncUpload without affecting the others?

Hristo Valyavicharski
Telerik team
 answered on 08 Jul 2015
5 answers
87 views

Hi,

 I have a Rad Grid used in my application. When i click "Add New" button, the edit column is displayed in the top and i can add new record. Is there a way i can hide the "Add New" button and display the Edit Column by default in the top always so that user can enter the value and click Insert. My Grid code as below,

 

<telerik:RadGrid ID="rgTest" runat="server" AllowPaging="True" AllowSorting="True"
                                AutoGenerateColumns="False" Width="97%" OnNeedDataSource="rgTest_NeedDataSource"
                                OnUpdateCommand="rgTest_UpdateCommand" OnDeleteCommand="rgTest_DeleteCommand"
                                OnInsertCommand="rgTest_InsertCommand" AllowAutomaticDeletes="true" Visible="true">
                                <PagerStyle Mode="NextPrevAndNumeric" />
                                <MasterTableView Width="100%" CommandItemDisplay="Top" EditMode="InPlace" DataKeyNames="ID"
                                    AllowAutomaticDeletes="true">
                                    <CommandItemSettings AddNewRecordText="Add New" ShowRefreshButton="false" />
                                    <Columns>
                                        <telerik:GridEditCommandColumn UniqueName="TestEdit">
                                        </telerik:GridEditCommandColumn>
                                        <telerik:GridTemplateColumn HeaderText="ID" Display="false" UniqueName="TestID">
                                            <ItemTemplate>
                                                <asp:Label runat="server" ID="lblID" Text='<%# Eval("ID") %>' />
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Names" UniqueName="TestName">
                                            <ItemTemplate>
                                                <%#DataBinder.Eval(Container.DataItem,"Name")%>
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <telerik:RadComboBox runat="server" ID="rcbTestName" DataTextField="Name" DataValueField="ID">
                                                </telerik:RadComboBox>
                                            </EditItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridButtonColumn CommandName="Delete" ButtonType="ImageButton" ImageUrl="~/Images/delete16x16.png"
                                            Text="Delete" ConfirmText="Are you sure you want to delete the selected row?">
                                        </telerik:GridButtonColumn>
                                    </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>

Viktor Tachev
Telerik team
 answered on 08 Jul 2015
3 answers
70 views

Hello,

 On my RadGrid, I have an column.

On this column i have an image, but this image is hidden if i haven't a specific value in an other  column.

How can i hide this ?

 

Exemple :

| ---------- | --------------------------|

| Image   | Specific Value        |

| -----------| --------------------------|

| Nothing | Not specific Value  |   

| -----------|---------------------------|

 

 

Thanks for your support,

Alexandre

 

Viktor Tachev
Telerik team
 answered on 08 Jul 2015
3 answers
515 views

Hi! I'm trying to make a radgrid with explicit defined columns. I've tried setting the AutoGenerateColumns property of the radgrid to false, but it won't show anything. This is my code

<telerik:RadGrid ID="rdContainers"  runat="server" AutoGenerateColumns="false" OnNeedDataSource="fnGetScanContainers" AllowFilteringByColumn="True" Width="91%">
                    <telerik:MasterTableView  TableLayout="Fixed">
                        <HeaderStyle Width="102px" />
                        <Columns>
                            <telerik:GridBoundColumn DataField="ContainerID" HeaderText="Container ID" SortExpression="ContainerID" UniqueName="gcContainerID" FilterControlWidth="60px">
                                <HeaderStyle Width="170px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Location" HeaderText="Location" UniqueName="gcLocation" FilterControlWidth="60px">
                                 <HeaderStyle Width="115px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="PartNumber" HeaderText="Part Number" UniqueName="gcPartNumber" FilterControlWidth="60px">
                                 <HeaderStyle Width="115px" />
                            </telerik:GridBoundColumn>
                    </telerik:MasterTableView>
                    <ClientSettings EnableRowHoverStyle="true">
                                <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
                                <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="" />
                    </ClientSettings>
</telerik:RadGrid>

 

Viktor Tachev
Telerik team
 answered on 08 Jul 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?