Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
236 views
Hi,

I have to display the following paging format in the grid with Ajax feature.

<<Previous 5 pages | <Previous Page | 1 | 2 | 3 | 4 | 5 | Next Page> | Next 5 Pages>> 

The pager should be display below after hitting "Next  Page"
<<Previous 5 pages | <Previous Page | 2 | 3 | 4 | 5 | 6 | Next Page> | Next 5 Pages>> 

 The pager should be display below after hitting "Next 5 Pages"
<<Previous 5 pages | <Previous Page | 6 | 7 | 8 | 9 | 10 | Next Page> | Next 5 Pages>> 

Viceversa with previous link button.

Thanks in advance.
Naresh.
Pavlina
Telerik team
 answered on 28 Sep 2009
1 answer
213 views
Hi.

I'm trying to boost the performance by loading appointments with a async-method.
But it doesn't seem to work.

Here's my code:

        IAsyncResult beginLoad(Object sender, EventArgs e, AsyncCallback cb, object state) 
        { 
            return loadActivityDataAsync(cb, state); 
        } 
 
 
        private void loadActivityData() 
        { 
            DateTime startDate = radSched.VisibleRangeStart; 
            //6 veckor 
            DateTime endDate = radSched.VisibleRangeEnd; 
 
            //Om sista veckan Ã¤r helt utanför mÃ¥naden 
 
            actList = Activity.getActivities(Master.DB, Master.AresUser.UserID, startDate.AddMonths(-1), endDate.AddMonths(1), cbxShowCompleted.Checked); 
 
            if (actList != null) 
            { 
                string[] str = new string[actList.Count]; 
                bool hasCompanies = false; 
 
                for (int i = 0; i < str.Length; i++) 
                { 
                    hasCompanies = true; 
                    str[i] = actList[i].Company_Entityid.ToString(); 
                } 
 
                if (hasCompanies) 
                    companies = Master.DB.executeDataTable("SELECT * FROM company WHERE author_companyid = " + Master.AresUser.CompanyID + " AND entityID IN (" + string.Join(",", str) + ")"); 
                else 
                    companies = new DataTable(); 
 
                //lblTest.Text = "Start: " + DateTime.Now.ToLongTimeString(); 
            } 
        } 
 
        private void EndLoadActivityData(IAsyncResult res) 
        { 
            radSched.Rebind(); 
            //lblTest.Text = "Stop: " + DateTime.Now.ToLongTimeString() + " Items: " + actList.Count; ; 
        } 
 
        private delegate void GenericDelegate(); 
 
        private IAsyncResult loadActivityDataAsync(AsyncCallback cb, object state) 
        { 
            GenericDelegate gd = loadActivityData; 
            return gd.BeginInvoke(cb, state); 
        } 


And I call the function by running this code:
PageAsyncTask task = new PageAsyncTask(beginLoad, EndLoadActivityData, null, null); 
Page.RegisterAsyncTask(task); 

actList is a List<T>

If I run this without the async it works perfectly. Otherwise I get a blank scheduler, and some appointments in my actList.
Dimitar Milushev
Telerik team
 answered on 28 Sep 2009
3 answers
123 views
Is ASP.NET AJAX Upload MacBinary compatible?

Thanks in advance
Genady Sergeev
Telerik team
 answered on 28 Sep 2009
13 answers
1.2K+ views
Is there a way to change the font and it's size in buttons that are skinned with the FormDecorator? I've tried putting the values in the formdecorator css all over the place and it never seems to take effect.
Martin
Telerik team
 answered on 28 Sep 2009
1 answer
113 views
I have a radgrid on my web page with several columns of data. One of those columns contains a fairly large amount of text data in every row, so the row heights are pretty huge. I tried setting  ItemStyle-Height="20px". but that did absolutely nothing to resolve the problem. Clearly the height is adjusting to accommodate all the text in the cell, but that's not what I want in this case. I want the text overflow to be hidden.

One special note - This grid (and the text in particular) is going to be exported to XLS, so I don't want to shorten it (i.e. add some function to show only (x) characters). It needs to be available, just offscreen.

I'm on a tight timeline, so please help me!

Thanks,

-Todd
Dimo
Telerik team
 answered on 28 Sep 2009
5 answers
110 views
Hi

I have trubble getting Telerik webcontrols to validate.

This line: 

<

 

TelerikWebControls:RadWindowManager ID="RadWindowManager1" runat="server" VisibleStatusbar="false"/>
generates this error:

 

document type does not allow element "title" here

… class="Telerik_stylesheet" /><title>
So there is a title tag added after the Telerik link, why?







The next error comes from this line:
<a id="OKbtn_{0}" onclick="$find('{0}').callBack(this.parentNode.parentNode.getElementsByTagName('input')[0].value);"    
     class="radwindowbutton" href="javascript:void(0);" >
The error is this:

character "{" is not allowed in the value of attribute "id"

				<a id="OKbtn_{0}" onclick="$find('{0}').callBack(this.parentNode.parentNode.

How can I solve these two errors?


Thanks!





Cecilia
Top achievements
Rank 1
 answered on 28 Sep 2009
12 answers
308 views
Hi,
I'm having a similar issue as the one reported here- http://www.telerik.com/community/forums/aspnet-ajax/grid/pdf-exporting-error.aspx

Essentially you get this exception when using the method-
System.Xml.XmlException: The '*' character, hexadecimal value 0x2A, cannot be included in a name.

I did some debugging and found this in the markup:
<span id="RadGrid1_ctl00_ctl03_ctl01_ChangePageSizeLabel" class="rgPagerLabel">Page size:</span> 
<div id="RadGrid1_ctl00_ctl03_ctl01_PageSizeComboBox" class="RadComboBox RadComboBox_Default " style="width:46px;display:-moz-inline-stack;display:inline-block;zoom:1;*display:inline;margin-left:-1px;margin-right:-1px;white-space:normal;">  

The offending character comes after the 'zoom:1' style on the RadComboBox generated for the grids page size selector (it says 'zoom:1;*display:inline;'  notice the *).

Is this a bug in the RadComboBox or RadGrid or is there some way to remove this style?
Udaya Kumar
Top achievements
Rank 2
 answered on 28 Sep 2009
6 answers
353 views
Hi there,

I'm loading my Radgrid programmatically:

        if (!IsPostBack)
        {

        var gridDS = from statements in db.tblEstatementDetails
                     where statements.EpageStatementId == Convert.ToInt64(cardType)
                     join card in db.tblEpageStatements on statements.EpageStatementId equals card.EpageStatementId
                     select new
                     {
                         statements.EstatementDetailId,
                         card.CardName,
                     };


        RadGrid1.DataSource = gridDS;
        RadGrid1.AllowPaging = true;
        RadGrid1.DataBind();

}

Umm but when the records exceed 10 then the pagination options are available which is great. However when I click next, or previous or even try to expand my record list from '10' to say '20' then the grid just empties as if the Radgrid is not databound any more.

wdudek
Top achievements
Rank 1
 answered on 28 Sep 2009
1 answer
175 views
Hello everybody !

i've got a RadGrid with paging enabled and 1600+ rows.
and i wanted to optimize it's performance by querying data only for items which are currently shown, so i made NeedDatasource event  look like this :

        protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            int currentPageIndex = RadGrid1.MasterTableView.CurrentPageIndex;
            int itemsToTake = RadGrid1.PageSize;
            int offset = currentPageIndex * itemsToTake;
            var ds = GetGridDataSource(itemsToTake, offset);
            RadGrid1.DataSource = ds;
        }
it worked, but the pager now dissapeared, i tryed to set VirtualItemCount property to 1600, but nothing happened.

are there any possibility to set Pager pages count ? or maybe there exists better solution to optimize performance ?

Thank You !
Pavlina
Telerik team
 answered on 28 Sep 2009
1 answer
104 views
This problem only presents itself in ie6. Not Firefox or IE7 or 8. (not concerned with mac)
When I mouse over a top level menu item and the .slide .vertical.group.level1 slides down, the panel bar which is in a template slides down, and all underlying "select" inputs are properly hidden. If I then expand a panelbar item (within the template), the slide height increases and all "select" form inputs show thru any additional height on the slid out menu. If i mouse off the top level menu item and mouse back over it, at that point, the panel bar remembers that it is open, still has the greater height, but the select items on the underlying page do NOT show thru the additional height.

Is there a quick fix to this?

If this is unclear, I can create a simplified version of my page and supply the source (but am trying to save some time).
Thank you ahead of time,
Erik
Paul
Telerik team
 answered on 28 Sep 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?