473,383 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Datagrids with checkboxes and postbacks...

Hi,

I am trying to get a list of all of the rows in a datagrid where a
checkbox is checked but am having a major headache with the postback.

I'm using VB and codebehind and I have an example which works fine as
long as I don't repopulate the datagrid. Unfortunately I need to
repopulate the datagrid to get the paging and sorting to work.

So I have one option where the grid's datasource is refreshed as part
of the page_load and this lets the in grid buttons and paging and
sorting all work fine. Unfortunately the selecting doesn't work unless
I don't do the rebinding in the page_load. Can I make the page_load
check what operation caused the postback or have I just got the whole
of this backwards?

Any help would be great as I'm stuck and going around in circles.

Cheers,

Gav
Nov 17 '05 #1
2 1302
Jos
"Gavin" <ga********@bigfoot.com> wrote in message
news:cc*************************@posting.google.co m...
Hi,

I am trying to get a list of all of the rows in a datagrid where a
checkbox is checked but am having a major headache with the postback.

I'm using VB and codebehind and I have an example which works fine as
long as I don't repopulate the datagrid. Unfortunately I need to
repopulate the datagrid to get the paging and sorting to work.

So I have one option where the grid's datasource is refreshed as part
of the page_load and this lets the in grid buttons and paging and
sorting all work fine.


Why do you want to do this refreshing in page_load?
I would suggest doing it in the event handler (when that option is
selected).

I hope this helps...

--

Jos
Nov 17 '05 #2
>
Why do you want to do this refreshing in page_load?
I would suggest doing it in the event handler (when that option is
selected).

I hope this helps...


Thanks for the suggestion, I got it sorted by moving the refresh logic
around.

Now it only calls the refreshes in the initial load and in various
events and it all works fine.

Thanks again for your help

G
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Kumar | last post by:
try this Dim mycheck As CheckBox = CType(dgWelcomePacks.Items (i).Cells(7).Controls(1), CheckBox) regards, Kumar. >-----Original Message-----
1
by: Jo | last post by:
Hi, I've tried the suggested solution but I'm still getting the same error. It seems that once the page postback is envoked the checkbox control is removed from the datagrid so all my changes...
0
by: Fresh Air Rider | last post by:
I am having trouble getting checkboxes to work within Repeaters and DataGrids I have tried to access the value of each checkbox within a repeater which has been ticked as follows :- string...
0
by: Sebi | last post by:
Hello All, I'm having problems, reading the new Values from CheckBox in a DataGrid. my Code Behind is C# I do exactly what other samples do, but I allways get the Initial Values instead of...
1
by: DJ Dev | last post by:
Hi, I am stuck at a problem for 3 days now. I create runtime datagrids depending on the user selections and they may vary from 2-10 depending on user selection at runtime. The datagrids are...
2
by: tshad | last post by:
I just started using the RowSelectorColumn from Andy Smith (MetaBuilders.com) and can't seem to find a way to find the other controls in the same row of my datagrid. I really like the contro and...
4
by: Jim Bancroft | last post by:
Hi everyone, I'm using a DataGrid with TemplateColumns. My DataGrid is located in a cell of an asp:Table. I did this so it's positioned correctly onscreen. One of the DataGrid's...
6
by: Steve Hershoff | last post by:
Hi everyone, I've got a strange one here. There are two datagrids on my page, one nested within the other. I'll refer to them as the topmost and secondary datagrids. In the topmost...
2
by: rn5a | last post by:
In a shopping cart app, a ASPX page retrieves the order details & personal details of a user from a MS-Access database table depending upon the username of the user. The order details of a...
1
by: Cdude | last post by:
I have a datagrid with checkboxes in it.I have a total column. Now whenever a checkbox is ticked i need to retrieve the total of that row.
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.