Ask a Question related to ASP.NET General, Design and Development.
-
Eddy Soeparmin #1
Please Help - Allow Paging on Grid Properties Builder
Hi,
I'm working on a grid when the database returns ... say 100 rows. I would
like to use the Allow Page in the grid Properties, but don't really know how
to code it right. I copied some code from the help, but it doesn't really
work yet. The compiler complains on the following...
private void InitializeComponent()
{
this.gridLegalEntityEmployee.SelectedIndexChanged += new
System.EventHandler(this.gridLegalEntityEmployee_S electedIndexChanged);
this.gridLegalEntityEmployee.PageIndexChanged += new
System.EventHandler(this.gridLegalEntityEmployee_P ageIndexChanged );
this.Load += new System.EventHandler(this.Page_Load);
}
private void gridLegalEntityEmployee_PageIndexChanged( object source,
System.Web.UI.WebControls.DataGridPageChangedEvent Args e)
{
gridLegalEntityEmployee.CurrentPageIndex = e.NewPageIndex;
gridLegalEntityEmployee.DataBind();
}
=== Error ======
this.gridLegalEntityEmployee_PageIndexChanged =>
'cpNET.WebForm1.gridLegalEntityEmployee_PageIndexC hanged(object,
System.Web.UI.WebControls.DataGridPageChangedEvent Args)' does not match
delegate 'void System.EventHandler(object, System.EventArgs)'
Here is some other sniplet code
================================================== ==============
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
gridLegalEntityEmployee.AllowPaging = true;
gridLegalEntityEmployee.PagerStyle.Mode = PagerMode.NumericPages;
gridLegalEntityEmployee.PagerStyle.PageButtonCount = 15;
gridLegalEntityEmployee.PageSize = 15;
LoadLegalEntityEmployeeList();
if (!Page.IsPostBack)
{
gridLegalEntityEmployee.DataBind();
}
}
private void LoadLegalEntityEmployeeList()
{
LegalEntityEmployee leEmployee = new LegalEntityEmployee();
// Retrieve data from database
gridLegalEntityEmployee.DataSource = leEmployee.SelectAll();
// Bind it to Databind
gridLegalEntityEmployee.DataBind();
}
================================================== ==============
I know there is a stupid mistake I made here, but I just cant't see it. Any
suggestion or recommeded is greatly appreciated. I really appriciate you
guys help.
Thanks a lot.
Eddy
Eddy Soeparmin Guest
-
TypeError: beforeNode has no properties-MX query builder
Hi everybody Hope i can find some support in here.sad that this bundle is discontinued. Anyways,am working on Classifieds Ad tutorial found... -
Flex2: General question on approach to paging data in the Grid component
What is the best way/preferred approach to working with large recordsets (100 to 200 rows) for the DataGrid? Is there inherent support for paging... -
Setting Control Properties with a Control Builder
I have a control that requires a custom ControlBuilder to parse certain child tags as controls, but I also want to use other tags to set properties.... -
alpha paging and data grid??
Can someone please tell me why this is not working??? I used a sample that I found and it works great with the pubs database, however, as soon as... -
Grid Paging
I am having trouble making the grid paging work. When I first come into the page the page count is 3. But when I click to go to page 2 and do the... -
Alvin Bruney #2
Re: Please Help - Allow Paging on Grid Properties Builder
you page index changed event is mapped to the wrong handler
it should be
System.Web.UI.WebControls.DataGridPageChangedEvent Handler instead of
system.eventhandler
"Eddy Soeparmin" <esoeparmin@clientprofiles.com> wrote in message
news:OyTwWzjSDHA.940@TK2MSFTNGP11.phx.gbl...how> Hi,
>
> I'm working on a grid when the database returns ... say 100 rows. I would
> like to use the Allow Page in the grid Properties, but don't really knowAny> to code it right. I copied some code from the help, but it doesn't really
> work yet. The compiler complains on the following...
>
> private void InitializeComponent()
> {
> this.gridLegalEntityEmployee.SelectedIndexChanged += new
> System.EventHandler(this.gridLegalEntityEmployee_S electedIndexChanged);
> this.gridLegalEntityEmployee.PageIndexChanged += new
> System.EventHandler(this.gridLegalEntityEmployee_P ageIndexChanged );
>
> this.Load += new System.EventHandler(this.Page_Load);
>
> }
>
> private void gridLegalEntityEmployee_PageIndexChanged( object source,
> System.Web.UI.WebControls.DataGridPageChangedEvent Args e)
> {
> gridLegalEntityEmployee.CurrentPageIndex = e.NewPageIndex;
> gridLegalEntityEmployee.DataBind();
> }
>
> === Error ======
> this.gridLegalEntityEmployee_PageIndexChanged =>
> 'cpNET.WebForm1.gridLegalEntityEmployee_PageIndexC hanged(object,
> System.Web.UI.WebControls.DataGridPageChangedEvent Args)' does not match
> delegate 'void System.EventHandler(object, System.EventArgs)'
>
> Here is some other sniplet code
>
> ================================================== ==============
> private void Page_Load(object sender, System.EventArgs e)
> {
> // Put user code to initialize the page here
> gridLegalEntityEmployee.AllowPaging = true;
> gridLegalEntityEmployee.PagerStyle.Mode = PagerMode.NumericPages;
> gridLegalEntityEmployee.PagerStyle.PageButtonCount = 15;
> gridLegalEntityEmployee.PageSize = 15;
>
> LoadLegalEntityEmployeeList();
>
> if (!Page.IsPostBack)
> {
> gridLegalEntityEmployee.DataBind();
> }
> }
>
> private void LoadLegalEntityEmployeeList()
> {
> LegalEntityEmployee leEmployee = new LegalEntityEmployee();
>
> // Retrieve data from database
> gridLegalEntityEmployee.DataSource = leEmployee.SelectAll();
>
> // Bind it to Databind
> gridLegalEntityEmployee.DataBind();
> }
> ================================================== ==============
>
> I know there is a stupid mistake I made here, but I just cant't see it.> suggestion or recommeded is greatly appreciated. I really appriciate you
> guys help.
>
> Thanks a lot.
>
> Eddy
>
>
Alvin Bruney Guest



Reply With Quote

