Main Topics
Browse All TopicsAll,
I am looking at adding a basket to a web page. I have this working to a basic standard, but now want to add extra functionality to it.
At the moment I have the data held in a session array that i populate on the basket screen in a grid view.
I have populated the gridview with 6 columns . The first 2 are not data assigned by the session variables but is a check box column called remove and a text box column called Tyres required that has a text box in.
The other columns are assigned by code (see snippet)
Basically I have three problems that i do not know how to do.
1. Because I used the designer to add the first 2 columns and code the rest the designer columns appear first in the gridview when i would like them to appear at different stages. How do I write the code to add a column and in that column have a text box and how do i do the same but for a check box?
2. How do I then reference that columns text box or check box? At the moment I loop through each row and use this
Dim tb As TextBox = CType(r.FindControl("TextB
Would this be different?
3. On a different note i would possibly like to make something on the row happen if the check box is ticked. Is there an event that says when a row is changed do something. What would the code be say on the check box being checked i wanted the textbox column for this row only to be disabled, but still in the view?
Thanks for your help.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
the answer did not really answer my question, but got me thinking a different way. Basically you add your data bound fields in the grid designer, but you set there data field attributes in the columns collection to the name of the column you have created in code.
Also, I unticked auto generate fileds in the columns collection I think this helped. Obviously this was only section 1 out of 3 the answer for but no one else is writing any comments.
Business Accounts
Answer for Membership
by: yo_daz_ukPosted on 2008-06-18 at 15:15:13ID: 21817786
Any ideas?