473,625 Members | 3,330 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

to check all checkbox when header checkbox is clicked in datagrid with paging

1 New Member
hi,
i m new to asp.net n i m tryin to work wit datagrid.
my prob is tat...when i click the header checkbox all d checkbox in the first page is selected n when i go to d sec page in datagrid..the checkbox are not selected in the sec page..but i want the sec page checkbox to be selected as well..i used onitemdatabound ..but looks like when i click the sec page..by default d header checkbox is unchecked..pls help me wit tis...
thanks
Dec 6 '11 #1
1 1640
Frinavale
9,735 Recognized Expert Moderator Expert
Store whether or not the check box in the header column should be checked in ViewState for the page.

This way you can retrieve whether or not the column should be checked based on what you stored in ViewState.

-Frinny
Dec 6 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1085
by: Tom | last post by:
Does Anyone know how to add a checkbox in the header of a datagrid so when they click the checkbox, all the rows will be checked? Thanks Tom
0
1342
by: Clement | last post by:
I have an user control(Control1) that dynamically adds another user control(Control2). In Control2, I am displaying data in a datagrid which I enable paging and sorting. When I click on the page number, there is a javascript error: Object Expected. I searched this group for solutions, I found a similar problem ...
1
1407
by: Danny Ni | last post by:
Hi, We use ASP.Net datagrid paging a lot and we have been experiencing "Index out of bound" error messages when we click on rows of datagrid on differnet pages every now and then. The problems do not apear to be consistent, they could happen anywhere, anytime. We only use datagrid's default paging ability. That is, set AllowPaging property to true and write a handler for PageIndexChanged. Somebody told me this is datagrid's...
2
1368
by: George Durzi | last post by:
Is there a way to implement datagrid paging without using javascript on the client-side?
1
1298
by: HP | last post by:
hi, I have a problem with my datagrid paging code, I dont know what's wrong with that, here is what i got as the error: AllowCustomPaging must be true and VirtualItemCount must be set for a DataGrid with ID myDataGrid when AllowPaging is set to true and the selected datasource does not implement ICollection. Here is my code:
2
2703
by: Javier | last post by:
Hi Everyone, I have a dynamic checkbox in a datagrid that uses the ITemplate interface and has the checkchanged event wired up. When the checkbox is checked, the event event handler that handles the event gets called, however when it is unchecked, it does not fire. Is this by design, or is something else that is going on? Thanks!!. This message was originally posted by marian@discussions.microsoft.com, but
3
2638
by: GD | last post by:
Got a simple ASPX page (.NET v1.1) with a DataGrid displaying a list of widgets. If the page has a QueryString called WidgetId specific, I need to automatically mark the specific DataGridItem as selected. Pretty simple, here's what I did: for (int i=0; i<dgWidgets.Items.Count; i++) { DataGridItem oDataGridItem = dgWidgets.Items; if (oDataGridItem.Cells.Text == WidgetId)
2
11044
by: Kiran_Juikar | last post by:
How to add the header checkbox in the datagridview checkbox column? Is there any property available to add a header checkboxor one need to write the custom logic for this?
0
941
by: Steve Hershoff | last post by:
Hi everyone, I'm using the paging feature in the DataGrid class for the first time, and am having some trouble. I have an asp button column in the DataGrid, and when I click on it my OnItemCommand function fires just fine-- but for some reason the DataGridCommandEventArgs parameter always thinks it's on the first page. Say, for instance, I'm on page 33 of my DataGrid and I click the button
10
5008
Dököll
by: Dököll | last post by:
Me again! I have been battling this one for months. Wrote below to aid in getting certain subforms to hide once checkbox named Active is clicked. I am hoping to make the code work for Date fields that may be empty. I think i am going about it the wrong way: Private Sub Active_BeforeUpdate(Cancel As Integer) 'On current event of main form 'Check if checkbox is selected 'then show or hide subform
0
8256
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8189
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
7184
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6118
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4089
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4193
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1500
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.