Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
291 views
I have followed your example on implementing the DBContentProvider for our editor and it works pretty good.  Uploading and deleting works great.  I am having a problem with renaming though.  I can right click on the file and select Rename, enter the new name and click OK, but the filename never changes in the database. 

Can you tell me where to look?

I attempted to do this in your demo and it also didn't work when renaming folders.

I am using the latest internal build and FF 3.0.8

Shawn
hacker
Top achievements
Rank 1
 answered on 03 Apr 2009
1 answer
109 views
Hi

   I am using a RadGrid. For this I am using simple paging.This simple PagerTemplate is displayed in 2 rows instead of in 1 row.
Can you please verify.For this the code I am using is:
<telerik:RadGrid ID="radGridBids" runat="server" GridLines="None" AllowPaging="true"
        AutoGenerateColumns="false" OnItemDataBound="radGridBids_ItemDataBound" PageSize="5"
        OnNeedDataSource="radGridBids_NeedDataSource" AllowSorting="true" ItemStyle-BorderStyle="None"
        Skin="" Width="100%">
        <PagerStyle NextPageText="Next" PrevPageText="Prev" Mode="NextPrevAndNumeric" HorizontalAlign="Right"
            AlwaysVisible="true"></PagerStyle>
        <HeaderStyle HorizontalAlign="Left" CssClass="grid_header" />
        <ItemStyle CssClass="grid_row_style" />
        <AlternatingItemStyle CssClass="grid_alternate_row_style" />
        <MasterTableView TableLayout="Fixed">
            <Columns>
                <telerik:GridTemplateColumn HeaderText="<%$Resources:TenderEngine_ProjectBids_Member.Text%>"
                    SortExpression="MemberName">
                    <ItemStyle CssClass="grid_width_20  bottom_border" />
                    <HeaderStyle HorizontalAlign="Left" CssClass="grid_header" />
                    <ItemTemplate>
                        <table>
                            <tr>
                                <td>
                                    <asp:HyperLink ID="hlkMemberId" runat="server" CssClass="grid_text_green" NavigateUrl='<%# GetNavigateUrl(Eval("BidderMemberId"), Eval("bidId"))%>'>
                                    </asp:HyperLink>
                                    <a id="ancrMemberId" runat="server" class="grid_text_green" />
                                </td>
                                <td>
                                    <asp:LinkButton ID="LnkWithDraw" runat="server" Visible='<%#IsBidOwner(Eval("BidderMemberId"), Eval("BidStatusId")) %>'
                                        meta:resourcekey="TenderEngine_Common_WithDraw" CommandArgument='<%# Eval("BidId") %>'
                                        OnClick="LnkWithDraw_Click" CssClass="grid_text_green" OnClientClick="return ConfirmWithDraw();" />
                                </td>
                                <td>
                                    <asp:Image ID="imgApprovedBid" runat="server" ImageUrl="~/Tender/Images/grid_lowestbid.gif"
                                        Visible="false" AlternateText="selected bid" />
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="<%$Resources:TenderEngine_Common_Price.Text%>"
                    SortExpression="MaxPrice">
                    <ItemStyle CssClass="grid_width_20  bottom_border" />
                    <HeaderStyle HorizontalAlign="Left" CssClass="grid_header" />
                    <ItemTemplate>
                        <asp:Label ID="lblMaxPrice" runat="server" Text='<%# Eval("MaxPrice") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="<%$Resources:TenderEngine_ProjectBids_BidDate.Text%>"
                    SortExpression="rowCreatedDate">
                    <ItemStyle CssClass="grid_width_20  bottom_border" />
                    <HeaderStyle HorizontalAlign="Left" CssClass="grid_header" />
                    <ItemTemplate>
                        <asp:Label ID="lblBidDateTime" runat="server" Text='<%#Eval("rowCreatedDate","{0:dd/MM/yyyy}") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
I

Instead of displaying like this.
   Change page: Prev Next   Displaying page 1 of 19, items 1 to 5 of 
Its displaying like :
                   Change page: Prev Next
 Displaying page 1 of 19, items 1 to 5 of 91.

  Please help me..  
Dimo
Telerik team
 answered on 03 Apr 2009
1 answer
190 views
In the course of my development I needed to have access to the Microsoft Ajax JavaScript.  To achieve this I set the ScriptPath property of the RadScriptManager to a folder on my site.  This requires having all of the JavaScript files available from Microsoft, Telerik, and the AjaxControl Toolkit for my website.  I have all of those scripts in the correct folder structure and they are all available and the browser loads them fine.

When running the app this way with EnableScriptCombine=false the RadAjaxManager is trying to load some of the scripts twice.  In the _onFormSubmitCompleted event of RadAjaxControl it builds an array of script files from the response stream.  It then checks to see that it wasn't from an axd (this is why EnableScriptCombine=false works when not setting ScriptPath), and if it is not it calls the IncludeClientScript method on it which tries to eval it which causes it to blow up because the script has already been loaded by the browser.  So it throws a Sys.Res.typeRegisteredTwice error on whatever objects are in the script.

I am assuming that the RadAjaxControl does this because javascript could be dynamically included during postback by one of the Telerik controls.  It needs to distinguish between this javascript and the javascript that has been included by setting the ScriptPath property and exclude those scripts that come from the ScriptPath from this processing.

Anyone else run into this, and is this your take?

Thanks,
Stoney
Rosen
Telerik team
 answered on 03 Apr 2009
1 answer
108 views
Hi,

We have a grid that has the following settings
       <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True"  AllowSorting="True" GridLines="None" Skin="Web20" AutoGenerateColumns="False" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" AllowFilteringByColumn="True" >
           <MasterTableView CommandItemDisplay="Top" DataKeyNames="ItemID" PageSize="25">

There is a variety of data and some columns are null. When filtering on a non-null column (the first column which contains a numeric integer which is the ID column from the query, we get the following error -

System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index

This only happens for a few of our screens. For most the filter works fine. So I am asking for any clues on what to look for that would lead to a result shown above. Thanks.
Pavlina
Telerik team
 answered on 03 Apr 2009
1 answer
181 views
I have a radgrid where there is a column that needs to be filtered with drop down list.

I am setting up a dummy grid with data to explain my requirement.

ColumnA    ColumnB    ColumnC
------------  -------------  -------------
     a                b                c
     a                e                f
     g                h                i

Suppose, column A and B are filtered with default text box and funnel. Column C has drop down list for filtering. Filtering column C gives the proper filtered row, but on selecting no filter in dropr down list, the previous filters are not remembered and entire data is displayed.

Suppose I filter Column A with value 'a' and filter criteria 'Equal To'. It will give 2 rows:

ColumnA    ColumnB    ColumnC
------------  -------------  -------------
     a                b                c
     a                e                f

Now if I filter Column C with drop down list by selecting 'c' it will give 1 row:

ColumnA    ColumnB    ColumnC
------------  -------------  -------------
     a                b                c

Now if I select 'No Filter' in the Column C drop down , it gives all 3 rows as the initial grid, but I want the grid with last filter applied i.e:

ColumnA    ColumnB    ColumnC
------------  -------------  -------------
     a                b                c
     a                e                f

My code in the customdropdown list class that extends the GridTemplateColumn class where actual filtering is fired:

protected

void list_SelectedIndexChanged(object sender, EventArgs e)

 

{

 

DropDownList ddlFilter = sender as DropDownList;

 

 

 

if (ddlFilter.SelectedIndex == 0)  //My 'No Filter' option is at the top of the list

 

{

 

//First index is no filter. we need to clear all filters here.

 

 

RadGrid ragpeopleManagement = (RadGrid)((DropDownList)sender).Parent.Parent.Parent.Parent.Parent.Parent;

 

 

foreach (GridColumn column in ragpeopleManagement.MasterTableView.Columns)

 

{

column.CurrentFilterFunction =

GridKnownFunction.NoFilter;

 

column.CurrentFilterValue =

String.Empty;

 

}

ragpeopleManagement.MasterTableView.FilterExpression =

String.Empty;

 

ragpeopleManagement.MasterTableView.Rebind();

}

 

else

 

{

 

//GridFilteringItem filterItem = ((DropDownList)(sender)).NamingContainer as GridFilteringItem;

 

 

GridFilteringItem filterItem = (GridFilteringItem)((DropDownList)(sender)).NamingContainer;

 

filterItem.FireCommandEvent(

"Filter", new Pair("EqualTo", this.UniqueName));

 

}

}


Pls advice how to retain the previous filters in the grid even  after selecting 'No Filter' in the drop down list filter column.


    
Georgi Krustev
Telerik team
 answered on 03 Apr 2009
2 answers
190 views
Hello

How do I access a Dropdown List in "Edit" ItemCommand mode?  I need to do something with the control but I am having problems finding it.

                            <telerik:GridTemplateColumn HeaderText="Group" UniqueName="tcGroup" Visible="False">  
                                <EditItemTemplate> 
                                    <asp:DropDownList ID="ddlGroupID" runat="server" DataSourceID="sdsVL_Groups" DataTextField="Name" 
                                        DataValueField="GroupID" SelectedValue='<%# Bind("GroupID_FK") %>' AppendDataBoundItems="True">  
                                        <asp:ListItem></asp:ListItem> 
                                    </asp:DropDownList> 
                                </EditItemTemplate> 
                            </telerik:GridTemplateColumn> 

Private Sub rgResource_ItemCommand(ByVal source As ObjectByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rgResource.ItemCommand  
 
Select Case e.CommandName  
  Case "Edit" 
     ' REMOVE THE BLANK LISTITEM FROM THE DROPDOWLIST  
End Select 

I am trying to remove the blank listitem from dropdown once it goes into Edit mode.  The blank element is there for the "Add New Record" "bug when bound to a datasource".

Thanks
Princy
Top achievements
Rank 2
 answered on 03 Apr 2009
1 answer
79 views
I'm having a problem.
When I have all the item values in the series are the same number, for some reason, they all default to 0.
If I turn IsZeroBased to true, it becomes correct, however the line is all the way at the top of the chart because the values are in the thousands. Is there a way I can have it not all default to 0? Why does it do that?

If I have different values in the series like [1,2,3,4,5,6], the chart will display correctly...

But when I have values in the series that are all the same like [5,5,5,5,5,5], the chart will have all values set to 0.
Furthermore, none of the values show on the chart. Like...I would not see 5, 5, 5, 5, 5...I wouldn't see anything,...just a straight line...

Please help.

Thanks.

Sincerely,

Jeff
Dessy
Telerik team
 answered on 03 Apr 2009
1 answer
68 views
em units don't work unless you use static headers and allow for scrolling.

aspx source (default.aspx):
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %> 
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
 
<!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 runat="server">  
    <title></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <asp:ScriptManager ID="ScriptManager1" runat="server">  
        </asp:ScriptManager> 
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" GridLines="Both"   
            Width="40em" Skin="Black">  
            <MasterTableView Width="40em" GridLines="Both">  
                <Columns> 
                    <telerik:GridBoundColumn HeaderText="Column 1" UniqueName="col1" DataField="col1">  
                        <HeaderStyle Width="10em" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn HeaderText="Column 2" UniqueName="col2" DataField="col2">  
                        <HeaderStyle Width="30em" /> 
                    </telerik:GridBoundColumn> 
                </Columns> 
            </MasterTableView> 
        </telerik:RadGrid> 
      
        <telerik:RadGrid ID="RadGrid2" runat="server" AutoGenerateColumns="False" GridLines="Both"   
            Width="40em" Skin="Black">  
            <MasterTableView Width="40em" GridLines="Both">  
                <Columns> 
                    <telerik:GridBoundColumn HeaderText="Column 1" UniqueName="col1" DataField="col1">  
                        <HeaderStyle Width="10em" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn HeaderText="Column 2" UniqueName="col2" DataField="col2">  
                        <HeaderStyle Width="30em" /> 
                    </telerik:GridBoundColumn> 
                </Columns> 
            </MasterTableView> 
 
            <ClientSettings> 
                <Scrolling AllowScroll="True" SaveScrollPosition="False" ScrollHeight="10em"   
                    UseStaticHeaders="True" /> 
            </ClientSettings> 
        </telerik:RadGrid> 
      
    </div> 
    </form> 
</body> 
</html> 
 


c# source (default.aspx.cs):
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
 
public partial class Default : System.Web.UI.Page  
{  
    protected class test  
    {  
        public int pk { get; set; }  
        public string col1 { get; set; }  
        public string col2 { get; set; }  
    }  
    protected void Page_Load(object sender, EventArgs e)  
    {  
        List<test> data = new List<test>();  
        data.Add(new test { col1 = "11"col2 = "12" });  
        RadGrid1.DataSource = data;  
        RadGrid1.DataBind();  
        RadGrid2.DataSource = data;  
        RadGrid2.DataBind();  
    }  
}  
 

Pavel
Telerik team
 answered on 03 Apr 2009
1 answer
102 views
Hi guys,
is the first time I used Telerik products,
but the code does not work with radeditor, but with a textbox, I am trying to update records in my database

Dim

 

oConn As SqlConnection

 

 

Dim oCmd As SqlCommand

 

oConn =

New SqlConnection(ConfigurationManager.ConnectionStrings("pamm").ConnectionString)

 

oCmd =

New SqlCommand("UpdateEmpresa", oConn)

 

oCmd.CommandType = CommandType.StoredProcedure

oCmd.Parameters.AddWithValue(

"@ID", SqlDbType.Int).Value = id.Text

 

oCmd.Parameters.AddWithValue(

"@Empresa", RadNews.Content)

 

 

Try

 

oCmd.Connection.Open()

oCmd.ExecuteNonQuery()

 

Catch ex As Exception

 

ex.Message.ToString()

 

Finally

 

oCmd.Connection.Close()

Response.Redirect(

"empresa.aspx")

 

 

End Try

 

Svetlina Anati
Telerik team
 answered on 03 Apr 2009
1 answer
132 views
Hello,

I would like to change the labels above my bars to reflect money.

I tried to change the defaultlabelvalue like this: RadChart.Series[0].DefaultLabelValue = something

I get a index out of range error.

When i lookup the amount of series i have in my graph, it shows 0 series, but i still have data.

How do i format the labels now?



Dessy
Telerik team
 answered on 03 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?