Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
78 views
Do you have a current best practice so that when using the DataSource property, it only needs to get a portion of the data that is going to be displayed?  All of the examples that I see seem to only do a "Get all" type of method, even though some of that data won't be displayed.  Right now, I have it setup to pull all data in the page_init but was thinking I could limit to only pull data for the current month selected and when they change to a new month, it will pull a new set of data.  Is there an event I can use to detect when they choose a new month, or other type of navigation events?

Thanks!
Stephen Griffin
Top achievements
Rank 1
 answered on 06 Apr 2010
2 answers
110 views
Using RadGrid in version 2010.1.309 or 2010.1.329 and .NET 4.0:

Receive a JS Error when attempting to submit a column filter when using a MasterPage and AjaxManager with the RadGrid. Removing AjaxManager or MasterPage features fixes problem.


JS Error:
Message: 'get_postBackElement().id' is null or not an object
Line: 9239
Char: 1
Code: 0
URI: http://localhost:35519/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ContentPlaceHolder1_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a00000000-0000-0000-0000-000000000000%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%3aen-US%3ab5c33bd3-ea2e-4bfa-bdd0-3d7cef59d2be%3a16e4e7cd%3af7645509%3a22a6274a%3a58366029%3a24ee1bba%3ae330518b%3a1e771326%3ac8618e41%3ae4f8f289%3aed16cbdc

To Recreate...

Site1.Master
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="RadGridAjaxFilterError.Site1" %> 
<%@ 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"></head> 
<body> 
    <form id="form1" runat="server"
    <div> 
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"
         
        </asp:ContentPlaceHolder> 
    </div> 
    </form> 
</body> 
</html> 
 

WebForm2.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="RadGridAjaxFilterError.WebForm2" MasterPageFile="~/Site1.Master" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        <Scripts> 
            <%--Needed for JavaScript IntelliSense in VS2010--%> 
            <%--For VS2008 replace RadScriptManager with ScriptManager--%> 
            <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> 
 
    With Master Page, No RadAjaxManager, Filter works: 
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" OnNeedDataSource="RadGrid1_NeedDataSource" AutoGenerateColumns="false" Width="200"
        <MasterTableView> 
            <Columns> 
                <telerik:GridBoundColumn DataField="Field1" AutoPostBackOnFilter="True"
                </telerik:GridBoundColumn> 
            </Columns> 
        </MasterTableView> 
    </telerik:RadGrid> 
 
    <br /> 
 
    <span style="color:#A00">With Master Page, With RadAjaxManager, Filter does NOT work (JS error):</span> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadGrid2"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"
    </telerik:RadAjaxLoadingPanel> 
 
    <telerik:RadGrid ID="RadGrid2" runat="server" AllowFilteringByColumn="True" OnNeedDataSource="RadGrid1_NeedDataSource" AutoGenerateColumns="false" Width="200"
        <MasterTableView> 
            <Columns> 
                <telerik:GridBoundColumn DataField="Field1" AutoPostBackOnFilter="True"
                </telerik:GridBoundColumn> 
            </Columns> 
        </MasterTableView> 
    </telerik:RadGrid> 
</asp:Content> 
 

WebForm2.aspx.cs
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Data; 
 
using Telerik.Web.UI; 
 
namespace RadGridAjaxFilterError 
    public partial class WebForm2 : System.Web.UI.Page 
    { 
        protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) 
        { 
            RadGrid grid = (RadGrid)source; 
 
            DataTable t = new DataTable(); 
 
            t.Columns.Add("Field1"); 
 
            t.Rows.Add("111"); 
            t.Rows.Add("222"); 
            t.Rows.Add("333"); 
            t.Rows.Add("444"); 
 
            grid.DataSource = t; 
        } 
    } 














theksmith
Top achievements
Rank 1
 answered on 06 Apr 2010
0 answers
107 views
I want to create this type on PanelBar see the image and the arrow sign move any type
in the child arrow i want to put a tree view can any one give me the demo of this control.
I just visit the site and see the demo it works but i want to change like that is seen in my image

Anil Kumar
Top achievements
Rank 2
 asked on 06 Apr 2010
3 answers
950 views

Hello All,

I have a web application that uses several of the Telerik controls. The default page of the web application contains a tabstrip control and a radgrid control. The user can search for persons or employers which will cause a new tab to be instantiated for each new entity.
The radgrid is rendered with the correct data based on the tab that is selected.

The issue that I am experiencing occurs if I try to update pagesize and currentpageindex. The pagesize and currentpageindex are being saved in the session for each tab instance. I am attempting to update the radgrid during the prerender event with the correct pagesize and currentpageindex. Attempting to udpate in the prerender event does not change the pagesize or currentpageindex. What am I missing here?

Thanks for any help that you might be able to offer.

Regards,
Cliff

Cliff Akers
Top achievements
Rank 1
 answered on 06 Apr 2010
2 answers
173 views
I'm attaching a picture of my page.  It renders two columns with similar functionality.  When there is an error saving a list gets generated for each column.  Each column represents data that is to be saved separately.

I want my columns to grow together, so that if there is an error on one side the other side grows with empty space.  In my picture you can see that the column with no error is shorter than the column with error.

Is there a way for me to dummy up the list created by the rad list view so that is is the same height for both list views regardless of content?

Current rendering for column  with error:
 <ul class="errorList"
                 
            <li> 
                According to business rules, Assignment date must be between 9/1/2010 and 9/20/2010 
            </li> 
         
 </ul> 
 

Current rendering for column without error:
<ul class="errorList"
                 
            </ul> 
 

specification for RadListView after the gridview pretty much the same for both:
 
<br /> 
    <telerik:RadListView ID="RadListViewErrorNY" runat="server" ItemPlaceholderID="ErrorHolder"
        <LayoutTemplate> 
            <ul class="errorList"
                <asp:Panel Width="150px" ID="ErrorHolder" runat="server" /> 
            </ul> 
        </LayoutTemplate> 
        <ItemTemplate> 
            <li> 
                <%#Eval("Description") %> 
            </li> 
        </ItemTemplate> 
    </telerik:RadListView 

If an error is found on post back a list is bound to the control:
 if (assignmentEdit != null) 
            { 
                radListView.DataSource = assignmentEdit.BrokenRulesCollection; 
                 
            } 

I really don't want to dummy up a brokenrules collection.  I'd like to be able to grab hold of the RadListview and set it's size.  Is this possible?

Thanks for any help with this!
Rebecca Peltz
Top achievements
Rank 1
 answered on 06 Apr 2010
10 answers
178 views
I'm trying to place a background image just under the last item of my sub-menu and its not really happening for me.  I've been trying for two days to get this working and have been pulling my hair out and can't quite work out where I'm going wrong.

I used the CssBlue skin as a template to create my own skin.

The code for the menu item is:
<rad:RadMenu ID="RadMenu1" runat="server" Skin="Dest">  
            <Items> 
                <rad:RadMenuItem runat="server" NavigateUrl="/link/menu.aspx" Text="this is menu 1">  
                    <Items> 
                        <rad:RadMenuItem runat="server" Text="sub menu 1" NavigateUrl="/link/menu.aspx">  
                        </rad:RadMenuItem> 
                        <rad:RadMenuItem runat="server" Text="sub menu 2" NavigateUrl="/link/menu.aspx">  
                        </rad:RadMenuItem> 
                        <rad:RadMenuItem runat="server" Text="sub menu 3" NavigateUrl="/link/menu.aspx">  
                        </rad:RadMenuItem> 
                    </Items> 
                </rad:RadMenuItem> 
                <rad:RadMenuItem runat="server" NavigateUrl="/link/menu.aspx" Text="this is menu 2"></rad:RadMenuItem> 
                <rad:RadMenuItem runat="server" NavigateUrl="/link/menu.aspx" Text="this is menu 3"></rad:RadMenuItem> 
                <rad:RadMenuItem runat="server" NavigateUrl="/link/menu.aspx" Text="this is menu 4"></rad:RadMenuItem> 
                <rad:RadMenuItem runat="server" NavigateUrl="/link/menu.aspx" Text="this is menu 5"></rad:RadMenuItem> 
                <rad:RadMenuItem runat="server" NavigateUrl="/link/menu.aspx" Text="this is menu 6"></rad:RadMenuItem> 
                <rad:RadMenuItem runat="server" NavigateUrl="/link/menu.aspx" Text="this is menu 7"></rad:RadMenuItem> 
                <rad:RadMenuItem runat="server" NavigateUrl="/link/menu.aspx" Text="this is menu 8"></rad:RadMenuItem> 
            </Items> 
        </rad:RadMenu> 
This is the code for the last item style:
.RadMenu_Dest .item .last  
{  
    backgroundtransparent url('img/menucorner.gif'no-repeat;   
    background-position0px 10px;  
Is this the right style class I should be using?  It doesn't seem to be appearing at all and changing the background position doesn't seem to help either.  Any help appreciated.
Ryan Mariotti
Top achievements
Rank 1
 answered on 06 Apr 2010
6 answers
179 views
Hi,
I am getting the infamous error creating control in the design view of VS 2008 SP1. I was using radGrid control.

I have copied the telerik.web.dll to the following locations

1.[Visual_Studio_Install_Dir]\Common7\IDE\
2.[Visual_Studio_Install_Dir]\Common7\IDE\Public Assemblies
3.[Visual_Studio_Install_Dir]\Common7\IDE\Private Assemblies
4.GAC

I have cleared c:\Users\John\AppData\Local\Microsoft\VisualStudio\9.0\ProjectAssemblies

My OS is  Windows Vista 32bit

Please tell me a way to solve this issue.

Regards,
John
Erjan Gavalji
Telerik team
 answered on 06 Apr 2010
4 answers
97 views
Hello -

I have an issue where I have a ListBox with 4 items in it, ordered Item 1, Item 2, Item 3, Item 4.  When I select Item 2 and drag to infront of Item 1, my code on the postback doesn't seem to register the reorder. Although the event is firing, the code is getting data that in the ItemCollection that resembles the original list.

So just for fun, I turned on the button and tried it.  In this case, everything works. 

So I trace through both approaches, and the Sender object I pass in is different in both cases.  The Selected item is Item 2 in both cases, but the Item collection from drag and drop is (1, 2, 3, 4) and the item collection from button up is (2, 1, 3, 4).  I have tried a variety of combinations and it always seems to follow the same way.

Even stranger, I do the same thing elsewhere on a different page, and it doesn't have this problem at all. 

As far as I can tell, all the setting on the two controls are the same.

Is there any known issue that might be causing this?  Is there anything you suggest we can try to do differently to sort it out?

Thanks-
P.J.
Simon
Telerik team
 answered on 06 Apr 2010
2 answers
179 views
Hello,

Newbie here working with the radgrid.
I have a grid on my page and there are 4 bound fields on it. I am using a sqldatasource to connect to the database.
One of the fields is a Datetime field. When inserting a record I want it to default to the current date.
I saw a property called defaultinsertvalue. I tried using <%=Now()%> or <%=Today()%> on this field but I keep getting an error about the value not being able to be converted to system.datetime.
I am using vb by the way,
Can someone guide me in the right direction to get this field autopopulated with the current date and time?

Thanks in advance.
Tom Edward
Top achievements
Rank 1
 answered on 06 Apr 2010
3 answers
250 views
I am trying to add TEXT with newline and spaces to the radEditor using VB.NET using the radEditor.Content property. But it seems to loose all the formatting made in the TEXT string.

Also I would like to know what method is recommended to call editor.set_html in VB.net. I guess that will solve my problem of formatting.

Thanks.
Rumen
Telerik team
 answered on 06 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?