Michael Murman
Top achievements
Rank 1
Michael Murman
asked on 23 Jul 2010, 12:50 AM
Hi support,
Having an issue with the ASP.NET AJAX RadGrid pager style that is hopefully and simple fix. Have a pager on a grid set to alwaysvisible=true. When there is more then one page the style is correct set (notice in source class="rgPager Pager"). However, when there is only one page, the pager style is different and hard to read (using the Vista skin). The source class for the pager is class="Pager". Is there an easy solution to this issue.
BTW, just download the ASP.NET 2010 Quarter 2 and that did not fix the problem.
Thanks
-Wayne
Having an issue with the ASP.NET AJAX RadGrid pager style that is hopefully and simple fix. Have a pager on a grid set to alwaysvisible=true. When there is more then one page the style is correct set (notice in source class="rgPager Pager"). However, when there is only one page, the pager style is different and hard to read (using the Vista skin). The source class for the pager is class="Pager". Is there an easy solution to this issue.
BTW, just download the ASP.NET 2010 Quarter 2 and that did not fix the problem.
Thanks
-Wayne
3 Answers, 1 is accepted
0
Hi Wayne,
Check the attached sample an let me know how to change it in order to reproduce the issue.
Regards,
Pavel
the Telerik team
Check the attached sample an let me know how to change it in order to reproduce the issue.
Regards,
Pavel
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Michael Murman
Top achievements
Rank 1
answered on 23 Jul 2010, 05:00 PM
Figured out the problem to be in the <PagerStyle> tag of the grid, I was setting the CssClass to a non existent stylesheet class. Once I removed it, it worked fine. Its odd that it only affected it when the page size was only 1. Thanks for your help.
0
Michael Murman
Top achievements
Rank 1
answered on 23 Jul 2010, 05:16 PM
Since I can't send back a .zip here is a code block illustrating the problem. Notice on only 1 page the pager background is white, where if there are multiple pages, it is grey.
Default36.aspx
Default36.aspx.cs
Thanks for the help.
Default36.aspx
<%@ Page Language="C#" AutoEventWireup="true" Inherits="PLWeb.Default36" %>
<%@ 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
runat
=
"server"
>
<
title
></
title
>
<
script
type
=
"text/javascript"
>
function Sort()
{
//var masterTable = $find("RadGrid1").get_masterTableView();
//masterTable.fireCommand("MySort");
}
function test()
{
alert(1);
}
</
script
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
asp:ScriptManager
ID
=
"SM"
runat
=
"server"
></
asp:ScriptManager
>
<
telerik:RadFormDecorator
ID
=
"RadFormDecorator1"
DecoratedControls
=
"all"
runat
=
"server"
DecorationZoneID
=
"PLZoneID"
Skin
=
"Vista"
/>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadGrid1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:radgrid
id
=
"RadGrid1"
runat
=
"server"
CssClass
=
"RadGrid"
Width
=
"100%"
AutoGenerateColumns
=
"true"
PageSize
=
"50"
AllowSorting
=
"True"
AllowMultiRowSelection
=
"False"
AllowPaging
=
"True"
GridLines
=
"None"
ShowGroupPanel
=
"False"
AllowRowSelect
=
"False"
AllowCustomPaging
=
"False"
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
AlwaysVisible
=
"True"
CssClass
=
"Pager"
></
PagerStyle
>
<
ClientSettings
ReorderColumnsOnClient
=
"False"
AllowDragToGroup
=
"False"
AllowColumnsReorder
=
"False"
>
<
Selecting
AllowRowSelect
=
"True"
></
Selecting
>
<
Resizing
AllowRowResize
=
"True"
AllowColumnResize
=
"True"
EnableRealTimeResize
=
"True"
ResizeGridOnColumnResize
=
"False"
></
Resizing
>
</
ClientSettings
>
<
GroupingSettings
ShowUnGroupButton
=
"true"
/>
<
MasterTableView
DataKeyNames
=
"ID"
DataMember
=
"Calls"
GridLines
=
"Both"
AllowMultiColumnSorting
=
"True"
Width
=
"100%"
HierarchyLoadMode
=
"Client"
GroupLoadMode
=
"Server"
>
<
HeaderStyle
CssClass
=
"Header"
></
HeaderStyle
>
<
ItemStyle
CssClass
=
"Row"
></
ItemStyle
>
<
AlternatingItemStyle
CssClass
=
"AltRow"
></
AlternatingItemStyle
>
</
MasterTableView
>
</
telerik:radgrid
>
</
div
>
</
form
>
</
body
>
</
html
>
Default36.aspx.cs
using
System;
using
System.Drawing;
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
PLWeb
{
public
partial
class
Default36 : System.Web.UI.Page
{
protected
Telerik.Web.UI.RadGrid RadGrid1;
#region Web Form Designer generated code
override
protected
void
OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base
.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private
void
InitializeComponent()
{
this
.RadGrid1.NeedDataSource +=
new
Telerik.Web.UI.GridNeedDataSourceEventHandler(
this
.RadGrid1_NeedDataSource);
}
#endregion
protected
void
RadGrid1_NeedDataSource(
object
sender, EventArgs e)
{
RadGrid1.PagerStyle.Position = GridPagerPosition.TopAndBottom;
RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
RadGrid1.DataSource = SampleData;
}
public
DataTable SampleData
{
get
{
if
(Session[
"_data"
] ==
null
|| !Page.IsPostBack)
{
DataTable table =
new
DataTable();
table.Columns.Add(
"ID"
, Type.GetType(
"System.Int32"
));
table.Columns.Add(
"Value1"
, Type.GetType(
"System.Double"
));
table.Columns.Add(
"Value2"
, Type.GetType(
"System.Double"
));
table.Columns.Add(
"Value3"
, Type.GetType(
"System.Double"
));
Random rand =
new
Random();
for
(
int
i = 0; i < 25; i++)
{
table.Rows.Add(i,
rand.Next(0, 50),
rand.Next(0, 50),
i * 12);
}
Session[
"_data"
] = table;
}
DataTable original = (DataTable)Session[
"_data"
];
DataTable ret = original.Clone();
DataRow[] sortedRows = original.Select(
""
,
"ID ASC"
);
foreach
(DataRow row
in
sortedRows)
{
ret.Rows.Add(row.ItemArray);
}
return
ret;
}
}
}
}
Thanks for the help.