Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
222 views

aspx:

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
   
                <telerik:RadGrid ID="grdDashb2" runat="server" AllowFilteringByColumn="True"

                    AllowPaging="True" AllowSorting="True" GridLines="None" 
                    ShowGroupPanel="True" AutoGenerateColumns="False" 
                    OnNeedDataSource="grdDashb2_NeedDataSource"

                    OnItemCreated="grdDashb2_ItemCreated"

                    OnDataBound="grdDashb2_OnDataBound" 
                    OnItemCreated="grdDashb2_ItemCreated"

                    OnColumnCreated="grdDashb2_ColumnCreated"
                    OnPreRender="grdDashb2_PreRender">

<

MasterTableView HierarchyDefaultExpanded="false" HierarchyLoadMode="Client" AllowSorting="true" 

                        AllowPaging="true" DataKeyNames="TopicId,TopicParentId,TopicName,Tm" Width="100%" 
                        EditMode="EditForms" ClientDataKeyNames="TopicId">  
 
                        <SelfHierarchySettings ParentKeyName="TopicParentId" KeyName="TopicId" /> 
 
                        <Columns> 
                            <telerik:GridTemplateColumn UniqueName="TemplateEditColumn" AllowFiltering="false">  
                                <ItemTemplate> 
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                              
                            <telerik:GridNumericColumn DataType="System.Decimal" DataField="Kmo" 
                                HeaderText="AFR" SortExpression="Kmo" /> 
                                  
                            <telerik:GridTemplateColumn DataField="Tm" UniqueName="Tm" HeaderText="Light">   
                                <FilterTemplate> 
                                    <telerik:RadComboBox ID="ARF_RadComboBox"  
                                        SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Tm").CurrentFilterValue %>'
                                        runat="server" 
                                        OnClientSelectedIndexChanged="TrafficlightColorIndexChanged">  
                                        <Items> 
                                            <telerik:RadComboBoxItem Text="All" /> 
                                            <telerik:RadComboBoxItem Text="item1" Value="item1"/>  
                                            <telerik:RadComboBoxItem Text="item2" Value="item2"/>  
                                            <telerik:RadComboBoxItem Text="item3" Value="item3"/>  
                                        </Items> 
                                    </telerik:RadComboBox> 
 
                                    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">  
                                    <script type="text/javascript">  
                                    function TrafficlightColorIndexChanged(sender,args) {  
                                        var tableView=$find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");  
                                        tableView.filter("Tm",args.get_item().get_value(),"EqualTo");  
                                    }  
                                    </script> 
                                    </telerik:RadScriptBlock> 
                                </FilterTemplate> 
                                  
                                <ItemTemplate> 
                                     
                                    <asp:Image ID="imgAFR" runat="server" ImageUrl='<%# ReturnUrl(Eval("Tm").ToString) %>'/> 
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                        </Columns> 
 </MasterTableView> 

cs:

        protected
 void grdDashb2_PreRender(object sender, System.EventArgs e)  
        {  
            if (grdDashb2.MasterTableView.FilterExpression != string.Empty)  
            {  
                RefreshCombos();  
            }  
        }  
 
        protected void RefreshCombos()  
        {  
            grdDashb2.MasterTableView.FilterExpression = grdDashb2.MasterTableView.FilterExpression.ToString();  
            grdDashb2.MasterTableView.Rebind();  
        }  
 
        public string ReturnUrl(string Tm)  
        {  
            if (Tm != "" || Tm != string.Empty)  
            {  
                return "../Images/" + Tm;  
            }  
            else 
            {  
                return "../Images/blankgif.gif";  
            }  
        } 

Hi!

Me again!

I want to filter in a Hierarchy grid by "Tm"  column
<telerik:GridTemplateColumn DataField="Tm" UniqueName="Tm" HeaderText="Light">   

I follow this demo: http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx.

No Hierarchy, so good. 
But when I filter with Hierarchy , server error: Object reference not set to an instance of an object .

I don't konw whether there is some different when filter in Hierarchy or not?

Later I will post a screenshot to describe the situation more clearly.

Thank you!

Best wishes
Airad
Airad
Top achievements
Rank 1
 answered on 24 Jul 2009
23 answers
320 views
http://demos.telerik.com/aspnet/prometheus/Editor/Examples/SaveInExternalFile/DefaultCS.aspx

this example allows you to hard code 

protected

 

string path = "test.html";

but what if users are selecting their files via the template manager dialog - how do i pass that file name to the string path?

 

John
Top achievements
Rank 1
 answered on 23 Jul 2009
2 answers
182 views
Hi,

Is there a way to get the RadPane to automatically stretch to fill the screen?  I have a simplified example below where "paneBody" doesn't stretch to fit the screen even though I have RadSplitter height set to 100%. 


<

 

body>

 

 

 

<form id="form1" runat="server">

 

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">

 

 

 

</telerik:RadScriptManager>

 

 

 

<telerik:RadSplitter ID="Main" runat="server" Width="100%" Height="100%" Orientation="Horizontal"  LiveResize="true" >

 

     

<telerik:RadPane ID="paneHeader" runat="server" Height="45px" MaxHeight="45" Index="0">

 

         Header

     <

/telerik:RadPane>

 

     

<telerik:RadPane ID="paneBody" runat="server" >

 

         

line 1 of 5<br /><br /><br /><br /><br /><br /><br />

 

         

line 2 of 5<br /><br /><br /><br /><br /><br /><br />

 

         

line 3 of 5<br /><br /><br /><br /><br /><br /><br />

 

         

line 4 of 5<br /><br /><br /><br /><br /><br /><br />

 

         

line 5 of 5<br /><br /><br /><br /><br /><br /><br />

 

     

</telerik:RadPane>

 

     

<telerik:RadPane ID="footer" runat="server" Height="40px"> 
        
footer

 

     

</telerik:RadPane>

 

 

 

</telerik:RadSplitter>

 

 

 

</form>

 

 

 

</body>

Thanks,
Kasia

 

 

 

 

 

Kasia
Top achievements
Rank 1
 answered on 23 Jul 2009
1 answer
70 views
Greetings:

We've developed a custom image chooser using the DialogOpener. Which we take the resulting args object and retrieve the src path and URL encode it and pass the ImageUrl to our thumbnail generator.

We build the script server side and register it to the page.

We had no issues in IE6, IE7 until the most recent updates.

function callBackFunction(sender, args){
var selectedItem = args.value.attributes[0].value;
..... custom code ....
}

the problem is, with the most recent updates, in IE7 or IE8 compatibility mode it returns null. this works great in IE 8, and FF 3.x
Would there be any chance there is another property that could be available that I am not aware of?

Thanks 
Russell
RWA
Top achievements
Rank 1
 answered on 23 Jul 2009
2 answers
116 views
Hi,
I've got a few questions related to the expand/collaps column:
1. Is there a way to hide the expand/collaps columns when there are no sub-items for a row
2. is there a way to hide the expand/collaps column itself if none of the rows has sub-items
3. I would like to add a collaps All rows/Expand All rows button

Thanks in advance, Eyal.
egoren
Top achievements
Rank 1
 answered on 23 Jul 2009
0 answers
58 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
116 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
227 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
140 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
121 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?