Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
66 views
Hey,

I am having a problem with the Progress Area.  How can I make it not recognize files that are not supposed to be uploaded.  I know that RadUpload has two different properties, UploadedFiles and InvaildFiles.  The problem is is that when I am uploading files the progress area incorporates the data from the InvaildFiles as well and I cant have that happen.  Is that a way to make the Progress Area only show the progress of files that are in the UploadedFiles section of RadUpload?

Kyle
Kyle Jones
Top achievements
Rank 1
 asked on 23 Jul 2009
3 answers
123 views

Hi!

This is what our customer services want.
When files uploaded from client to sever using 

<telerik:RadUpload


they want to change the name of the folder from which they picked up the files.
And it does not allow them to do this until application closed.
On the other hand the files can be deleted from this folder, they are OK.
But folder itself is not available for changing the name of folder.

We need to fix it. I am using Silverlight project in vs2008 and WPF RadUpload control.

Best Regards!

Anatoliy Abbott


 

Best Regards!Anatoliy Abbott 
Ivan
Telerik team
 answered on 23 Jul 2009
2 answers
240 views
Hi,

I use Telerik RadGrid. DataSource for the grid is a web-service. One of the columns in RadGrid is a string but it contains numeric values. Though it is GridNumericColumn when I apply sorting the column is sorted as string value like 1,11,..,2, 22.
I can't change anything in datasource, including this column type.

What should I do to make the column sorted as a numeric, like 1,2,..11, 22...?

My code looks like this:

 

grid =

new RadGrid

 

 

{

 

ID =

"grdChildren",

 

AutoGenerateColumns =

false,

 

DataSourceID = ds.ID,

AllowSorting =

true

 

};

grid.MasterTableView.Columns.Add(

new GridNumericColumn

 

{

   DataField =

"StringDataField", HeaderText = "ShouldBeNumericSorting"

 

});

 
Thank you very much in advanced.
cheburek
Top achievements
Rank 1
 answered on 23 Jul 2009
1 answer
142 views
Hi,

 I am trying generate a rad grid programmatically with Ajax enabled feature. Everything is fine except the Loading panel. when post back happens i am Unable to see the Loading panel image over the rad grid. Kindly help me to solve this solution ASAP.

Here is my code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head id="Head1" runat="server"> 
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <div> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> 
        </telerik:RadAjaxManager> 
        <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" Height="75px" Width="75px"> 
            <img src="images/Loading.gif" /> 
        </telerik:RadAjaxLoadingPanel> 
        <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder> 
        <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Nwind.mdb" 
            SelectCommand="SELECT ContactName, ContactTitle, Address FROM [Customers]"></asp:AccessDataSource> 
    </div> 
    </form> 
</body> 
</html> 
 


using System; 
using System.Data; 
using System.Configuration; 
using System.Collections; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using System.Web.UI.HtmlControls; 
using Telerik.Web.UI; 
using System.Data.OleDb; 
 
public partial class _Default : System.Web.UI.Page 
{ 
    RadGrid RadGrid2; 
 
 
    protected override void OnPreInit(EventArgs e) 
    { 
        base.OnPreInit(e); 
        if (ScriptManager.GetCurrent(this.Page) == null) 
        { 
            ScriptManager SManager = new ScriptManager(); 
            SManager.EnablePartialRendering = true; 
            foreach (Control c in this.Controls) 
            { 
                if (c is HtmlForm) 
                { 
                    c.Controls.AddAt(0, SManager); 
                } 
            } 
        } 
    } 
 
    protected override void OnInit(EventArgs e) 
    { 
        base.OnInit(e); 
 
        PopulateGrid(); 
    } 
 
    protected override void OnLoad(EventArgs e) 
    { 
        base.OnLoad(e); 
         
        RadAjaxManager1.AjaxSettings.AddAjaxSetting(PlaceHolder1, RadGrid2, LoadingPanel1); 
 
    } 
 
    protected void PopulateGrid() 
    { 
        RadGrid2 = new RadGrid(); 
        RadGrid2.ID = "RadGrid1"; 
        RadGrid2.MasterTableView.AutoGenerateColumns = false; 
        RadGrid2.DataSourceID = "AccessDataSource1"; 
        RadGrid2.MasterTableView.AllowPaging = true; 
        RadGrid2.PagerStyle.Mode = GridPagerMode.NumericPages; 
        RadGrid2.AllowSorting = true; 
        RadGrid2.AllowFilteringByColumn = true; 
 
        GridBoundColumn boundColumn = new GridBoundColumn(); 
        RadGrid2.MasterTableView.Columns.Add(boundColumn); 
        boundColumn.HeaderText = "ContactName"; 
        boundColumn.DataField = "ContactName"; 
        boundColumn.UniqueName = "ContactName"; 
 
        boundColumn = new GridBoundColumn(); 
        RadGrid2.MasterTableView.Columns.Add(boundColumn); 
        boundColumn.HeaderText = "ContactTitle"; 
        boundColumn.DataField = "ContactTitle"; 
        boundColumn.UniqueName = "ContactTitle"; 
 
 
        boundColumn = new GridBoundColumn(); 
        RadGrid2.MasterTableView.Columns.Add(boundColumn); 
        boundColumn.HeaderText = "Address"; 
        boundColumn.DataField = "Address"; 
        boundColumn.UniqueName = "Address"; 
 
 
        GridEditCommandColumn editColumn = new GridEditCommandColumn(); 
        RadGrid2.MasterTableView.Columns.Add(editColumn); 
        editColumn.HeaderText = "Edit column"; 
        editColumn.UniqueName = "EditCommandColumn"; 
 
        GridButtonColumn buttonColumn = new GridButtonColumn(); 
        RadGrid2.MasterTableView.Columns.Add(buttonColumn); 
        buttonColumn.CommandName = "Delete"; 
        buttonColumn.ButtonType = GridButtonColumnType.PushButton; 
        buttonColumn.Text = "delete row"; 
        buttonColumn.ConfirmText = "Are you sure you would like to remove this user from the role?"; 
        buttonColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center; 
 
 
        PlaceHolder1.Controls.Add(RadGrid2); 
 
 
    } 
 
 
} 
 


Thanks & Regards

Venkatraman Gururaj.



Pavlina
Telerik team
 answered on 23 Jul 2009
1 answer
132 views
Hi,

I used successfully Telerik in a project.

And i created another one, very simple web application project with just one page : Default.aspx

And even if telerik was in the visual studio toolbox,  that i copied the Telerik.Web.ui.dll and Telerik.Web.design.dll and the telerik xml file also, in the bin folder,  i have an error in the designer mode, on my telerik Component.

For example, for the radscriptmanager, i have

(i try to traduce it in english)

Error creating control RadScriptManager1
an unhandled exception occured,
Impossible to load the file or assembly : "Telerik.web.UI, version=2009.2.701.35, culture=neutral, publickeytoken="121fae78165ba3d4" or one of his dependances. the specified file  is not found.

I have the reference to my Telerik.web.ui in the bin folder, and also a reference to the telerik.web.design.

I told myself maybe it's something missing in the webconfig, so i copied the webconfig from my first web application , wich work perfectly, but the problem is the same.

Note :
The Telerik intellisense work in "source" mode
i have the <%@ Register Tagprefix=telerik ...... namespace... etc... Assembly... %>   Tag in my page.
I have also an error for Telerik.Radgrid

But everything is working fine for RadTextbox (exept i dont have the user menu on design mode)
but there isnt any error, and it appears ok when i launch the web site. (even the skin).
Pavlina
Telerik team
 answered on 23 Jul 2009
6 answers
414 views
I am trying to setup a RadComboBox where the first item has a different background color than the rest of the items in the list.  For some reason the BackColor property on the item is not being passed to the generated HTML page when I do a "view source" in the browser.  Here is the control markup:

<telerik:RadComboBox ID="selShipTo" runat="server" AppendDataBoundItems="true"   
    DataTextField="OneLineDisplay" DataValueField="AddressID" style="width: 75%;">  
    <Items> 
        <telerik:RadComboBoxItem runat="server" BackColor="Blue" Text="<<< Use Billing Address >>>" Value="0" /> 
    </Items> 
</telerik:RadComboBox> 
 

I must be missing something here?

Thanks,
Kevin
Jonathan
Top achievements
Rank 1
 answered on 23 Jul 2009
4 answers
240 views
Hello,

We have an application which was already developed by previous developer.We implemented Telerik controls alot.
There is radcalendar which is taking the min value as 1980/01/01. But we need to change it some where around 1950.
I tried to set the value using RangeMinDate property like below.
 
<radCln:RadCalendar ID="sharedCalendar" EnableMultiSelect="false" RangeMinDate="1960/01/01"
            runat="server">
        </radCln:RadCalendar>


But it is not working.It is taking only as 1980/01/01. Please help me out.
Pavlina
Telerik team
 answered on 23 Jul 2009
1 answer
216 views
Hi,

i get an empty excel file on ExcelExport.
I already searched forum and found this thread:

radgrid-export-to-excel-empty-spreadsheet.aspx

I tried setting the MasterPage propertie UseAllDataFields="true", but i get an error at filling the radGrid with data. Like "The column name cant be set with <newnew>, because it wants a Int32 type.".

I also got AutoGenerateColumns="false", i guess its pretty much working like the propertie UseAllDataFields and so it dont fit my custom columns.

Q: What can i change when i not autogenerating?

aspx:

<telerik:RadGrid ID="radGrid" runat="server"  
                                            AllowPaging="True"  
                                            PageSize="30" 
                                            AllowSorting="True"  
                                            AutoGenerateColumns="False" 
                                            GridLines="Both" 
                                            OnExcelMLExportStylesCreated="RadGrid_ExcelMLExportStylesCreated" 
                                            OnExcelMLExportRowCreated="RadGrid_ExcelMLExportRowCreated" 
                                            OnItemCommand="Radgrid_GridCommand" 
                                            OnNeedDataSource="Radgrid_NeedDatasource"> 
                                             
                                <MasterTableView DataKeyNames="id"  
                                    CommandItemDisplay="Bottom"> 
                                 
                                    <CommandItemTemplate> 
                                     
                                        <div style="padding: 5px 5px; align: right;"> 
                                            <asp:ImageButton ID="btnExportToExcel" runat="server"  
                                                        ImageUrl="~/App_Themes/Default/Images/excelfile_icon.gif"  
                                                        OnClick="btnExportToExcel_Click" /> 
                                            <asp:Label ID="lblRelationAdd" runat="server"  
                                                        Text="exportToExcel"  
                                                        OnLoad="OnLabelLoad"></asp:Label> 
                                        </div> 
                                    </CommandItemTemplate> 
                                                                                     
                                    <Columns> 
 
                                        <telerik:GridBoundColumn DataField="id" Visible="false"></telerik:GridBoundColumn> 
                                        <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="../App_Themes/Default/Images/file_icon.gif" CommandArgument="id"  CommandName="OpenFile"></telerik:GridButtonColumn> 
                                        <telerik:GridTemplateColumn> 
                                            <ItemTemplate> 
                                                <asp:Image runat="server" ID="imgNew" 
                                                    OnLoad="OnImageLoad" /> 
                                                <asp:TextBox ID="txbNewCreatedDate" runat="server" 
                                                    Visible ="false" 
                                                    Text='<%# DataBinder.Eval(Container.DataItem,"created_date").ToString() %>' /> 
                                            </ItemTemplate> 
                                        </telerik:GridTemplateColumn> 
                                        <telerik:GridHyperLinkColumn DataTextField="Metainformation.name" HeaderText="Profile" DataNavigateUrlFormatString="DocumentProfile.aspx?id={0}" DataNavigateUrlFields="id" ></telerik:GridHyperLinkColumn> 
                                        <telerik:GridBoundColumn DataField="Category.name" HeaderText="Kategorie"></telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="User.lastname" HeaderText="Ersteller"></telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="created_date" HeaderText="Erstellungsdatum"></telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="User1.lastname" HeaderText="letzter Bearbeiter"></telerik:GridBoundColumn> 
                                        <telerik:GridTemplateColumn HeaderText="inuse"> 
                                            <ItemTemplate> 
                                                <asp:Image runat="server" ID="imgInUse" 
                                                    OnLoad="OnImageLoad"/> 
                                                <asp:TextBox ID="txbInEditMode" runat="server" 
                                                    Visible ="false" 
                                                    Text='<%# DataBinder.Eval(Container.DataItem,"is_ineditmode").ToString() %>' /> 
                                                <asp:TextBox ID="txbIsCheckedout" runat="server" 
                                                    Visible ="false" 
                                                    Text='<%# DataBinder.Eval(Container.DataItem,"is_checkedout").ToString() %>' /> 
                                            </ItemTemplate> 
                                        </telerik:GridTemplateColumn> 
                                        <telerik:GridBoundColumn DataField="checkout_date" DataType="System.DateTime" HeaderText="in Verwendung seit"></telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="Folder.name" HeaderText="Ordner"></telerik:GridBoundColumn> 
                                        <telerik:GridTemplateColumn HeaderText="inuse"> 
                                            <ItemTemplate> 
                                                <asp:ImageButton runat="server" ID="btnDelete" 
                                                    OnLoad="OnImageButtonLoad" OnClick="btnDelete_OnClick"/> 
                                                <asp:TextBox ID="txbDeleteInEditMode" runat="server" 
                                                    Visible ="false" 
                                                    Text='<%# DataBinder.Eval(Container.DataItem,"is_ineditmode").ToString() %>' /> 
                                                <asp:TextBox ID="txbDeleteIsCheckedout" runat="server" 
                                                    Visible ="false" 
                                                    Text='<%# DataBinder.Eval(Container.DataItem,"is_checkedout").ToString() %>' /> 
                                                <asp:TextBox ID="txbDeleteId" runat="server" 
                                                    Visible ="false" 
                                                    Text='<%# DataBinder.Eval(Container.DataItem,"id").ToString() %>' /> 
                                            </ItemTemplate> 
                                        </telerik:GridTemplateColumn> 
                                         
                                    </Columns> 
                                       
                                    <RowIndicatorColumn> 
                                        <HeaderStyle Width="20px"></HeaderStyle> 
                                    </RowIndicatorColumn> 
 
                                    <ExpandCollapseColumn> 
                                        <HeaderStyle Width="20px"></HeaderStyle> 
                                    </ExpandCollapseColumn> 
                                </MasterTableView> 
                                <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True"> 
                                    <ClientEvents OnRowContextMenu="RowContextMenu"></ClientEvents> 
                                    <Selecting AllowRowSelect="true" /> 
                                </ClientSettings> 
                            </telerik:RadGrid> 

code behind:

protected void btnExportToExcel_Click(object sender, EventArgs e) 
        { 
            // configure 
            radGrid.ExportSettings.IgnorePaging = true; 
            radGrid.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML; 
            radGrid.ExportSettings.ExportOnlyData = true; 
 
            // export 
            radGrid.MasterTableView.ExportToExcel(); 
        } 
 
        protected void RadGrid_ExcelMLExportRowCreated(object source, Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLRowCreatedArgs e) 
        { 
  
        } 
 
        protected void RadGrid_ExcelMLExportStylesCreated(object source, Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLStyleCreatedArgs e) 
        { 
            foreach (Telerik.Web.UI.GridExcelBuilder.StyleElement style in e.Styles) 
            { 
                if (style.Id == "headerStyle") 
                { 
                    style.FontStyle.Bold = true; 
                    style.FontStyle.Color = System.Drawing.Color.Gainsboro; 
                    style.InteriorStyle.Color = System.Drawing.Color.Wheat; 
                    style.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.InteriorPatternType.Solid; 
                } 
                else if (style.Id == "itemStyle") 
                { 
                    style.InteriorStyle.Color = System.Drawing.Color.WhiteSmoke; 
                    style.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.InteriorPatternType.Solid; 
                } 
                else if (style.Id == "alternatingItemStyle") 
                { 
                    style.InteriorStyle.Color = System.Drawing.Color.LightGray; 
                    style.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.InteriorPatternType.Solid; 
                } 
            } 
 
            Telerik.Web.UI.GridExcelBuilder.StyleElement myStyle = new Telerik.Web.UI.GridExcelBuilder.StyleElement("MyCustomStyle"); 
            myStyle.FontStyle.Bold = true; 
            myStyle.FontStyle.Italic = true; 
            myStyle.InteriorStyle.Color = System.Drawing.Color.Gray; 
            myStyle.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.InteriorPatternType.Solid; 
            e.Styles.Add(myStyle); 
        } 


Or shall i fill another invisible radGrid with AutoGenerateColumns="true" and call thats ExportToExcel()

cheers mario

Daniel
Telerik team
 answered on 23 Jul 2009
2 answers
150 views
Hi,

I have a RadGrid with Hierarchy. I would like to access the DataKeyValues (parent/master table Key Values) in the DetailTables' <CommandItemTemplate>.

Here is the code snippet,

<DetailTables>
                           <telerik:GridTableView DataKeyNames="DV_Correlation_Detail_ID" DataSourceID="dsrcCorrDetail" HierarchyDefaultExpanded="true" ShowHeader="true" ShowFooter="false"
                                    Width="100%" runat="server" AllowFilteringByColumn="False" CommandItemDisplay="Top" Name="Correlation_Detail" EditMode="InPlace">
                                <ParentTableRelation>
                                    <telerik:GridRelationFields DetailKeyField="DV_Correlation_ID" MasterKeyField="DV_Correlation_ID" />
                                </ParentTableRelation>
                                <CommandItemTemplate>
                                    <a href="Javascript:showDialog(1,'derived_variable_selection.aspx?CorrID=<%# Eval("DV_Correlation_ID") %>');"><img style="border:0px" alt="Add Independent Variable" src="images/AddRecord.gif" /> Add Independent Variable </a>
                                </CommandItemTemplate>
                               
When I do "Eval()", it did not complain, and it did not return any value, either. How can I get the key value for each hierarchy detail table within CommandItemTemplate?

Any assistance will be very much appreciated.

Thanks,

Arthur W.

art
Top achievements
Rank 1
 answered on 23 Jul 2009
2 answers
118 views
Since 1 image is 1000 words, I can skip the description by providing an image:


Can anyone speculate as to why this happens on mouseover? (The yellowish border is broken between the image and the text)

Thanks!
Kostas Throumoulopoulos
Top achievements
Rank 1
 answered on 23 Jul 2009
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?