473,385 Members | 1,400 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,385 software developers and data experts.

buttons on gridview

i have a gridview with more than ten columns. I just have to display only a few selected columns for the user as soon as he opens the website. Once a button is clicked, all those ten columns should be displayed in either grid veiw or in the form of a tree. can you pls help me out on this?
Mar 1 '12 #1
5 1548
Frinavale
9,735 Expert Mod 8TB
You could use CSS to accomplish this.
Set the columns so that they have a style of "display:none" and when the user clicks the button either use JavaScript to change the style or post back to the server and remove the style there.

-Frinny
Mar 2 '12 #2
Thank you for your reply. but what i actually wanted is to place a button inside a gridveiw but i am not able to write a code for that.
Mar 5 '12 #3
Frinavale
9,735 Expert Mod 8TB
You can use a TemplateField column to display a column with a button in it.

Or you could use a CommandField to generate a column with Select or Edit or Delete button/link in it.


-Frinny
Mar 5 '12 #4
Is there a way where, on clicking a button, only that particlar row data get displayed on another page with the data being displayed one after the other(like in rows not in columns)?
Mar 7 '12 #5
Frinavale
9,735 Expert Mod 8TB
Yes, this solution requires JavaScript.

When clicking the row, you would use JavaScript to open another window and pass it the information necessary to display the data in the other screen. You could pass this information via the JavaScript, or you could have the window display another page in your application and pass the ID of the information to display via the QueryString/URL...or you could use cookies ....

Look into the JavaScript window opener property.
There are too many possible ways to display the data, so try something that makes sense to you.

-Frinny
Mar 7 '12 #6

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

Similar topics

1
by: ABC | last post by:
I have an idea. I need to write a common gridview block which contains labels, textboxs, one girdview and some buttons. Then, I think the above block will apply on several girdview with...
3
by: NateDawg | last post by:
I'm reposting this. I'm kinda in a bind untill i get this figured out, so if anyone has some input it would sure help me out. Ok, I’ve noticed a few gridview problems floating around the forum....
1
by: Andrew Nav | last post by:
I dragged a table from a datasource on to my web form and the GridView cpntrol was created. I turned on paging, and Edit and Delete buttons. I ran the app and everything worked great - not a...
4
by: | last post by:
I wanted better control over the display of the command buttons, so I created Template columns for each command. (Otherwise the GridView was putting extras spacing around the images and such.) ...
6
by: Terry | last post by:
Good morning! How do I determine which SELECT button was clicked in a GridView? The multiple SELECT buttons will be used for an application approval process. Thank you in advance for your...
4
by: Patrik | last post by:
hello, based on a client login I call a GridView that presents the appropriate questionnaire for that person. I added three columns (template fields) to the gridview that are radiobuttons. The...
1
by: nospam | last post by:
I have a MultiView with two views in it. View1 has a GridView and a SqlDataSource. View2 has a few link buttons that set the SelectCommand for the SqlDataSource to show a few reports. Here's the...
0
by: jmacduff | last post by:
Big question: How to enable edit/update commands to work when setting the sqldatasource select command from code behind. Details: I have a GridView using a sqldatasouce with the select and...
9
by: lilOlMe | last post by:
Hi there! I have generated a GridView that looks something like: SportName| CompanyNameX |CompanyNameY |CompanyNameZ Hockey.....| Shipping------------ |Accounting-------- |Shipping------------...
3
by: =?Utf-8?B?UGxhdGVyaW90?= | last post by:
I have link buttons in a Gridview that, depending on the value in another column (Not the Key column) will need to be disabled. For example, (Column2 has link buttons) Column1 ...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.