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

Adding Columns to Gridview

Hi,

I am using a dataset to capture 30 records from a stored procedure and bind it to Gridview. I have to display 30 records in the Gridview in 3 columns such that first 10 records are in column 1, next 10 records are in column 2 and next 10 records are in column 3.

Anybody please let me know how to get such a display.

Thanks
gs
Feb 4 '08 #1
1 845
Shashi Sadasivan
1,435 Expert 1GB
Are you trying to show all 30 records all together in 3 columns?

So your dataset contains a table with just one column and 30 records in it?

Am I right?

If you do want to implement it this way, i think you will have to create a new dataset, and define 3 columns in it (it will contain 10 records)
and then feed the first 10 values to the 1st column, next 10 to the 2nd column...and so on.

Im not sure if this is the best way to do it.
Feb 4 '08 #2

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

Similar topics

2
by: GCeaser | last post by:
All, I am attempting to use the following code to add a TemplateColumn to my GridView programatically: lobj_TemplateColumn = New TemplateColumn lobj_TemplateColumn.HeaderText =...
4
by: Eamonn | last post by:
Hi I am running Microsoft Visual Studio 2005 Team Edition Version 8.0.50727.42. I am adding columns to a GridView at runtime. When I add a BoundField that will contain DateTime data I want to...
4
by: VMI | last post by:
I'm working on a questionaire, and I'd like to add the questions to a gridview, so that each row (of two "columns" each) has the question in one field, and the editable section (where the user will...
1
by: JB | last post by:
I'm dynamically creating a Gridview object and filling it with contents from an ArrayList as follows: GridView2.AutoGenerateColumns = true; GridView2.DataSource = ArrayListObject;...
0
by: ami | last post by:
Hi everyone, I have a question about dynamically adding columns to a gridview. Based on user input (after a button click), some columns are being added to my gridview. What I do: ...
1
by: Dev147 | last post by:
I need to dynamically create a GridView that contains a variable number of columns that must be bound to an underlying collection in an entity class. These columns represent days from a specified...
0
by: ganesh22 | last post by:
Hi... Iam using GridView in asp.net(2.0) .My requirement is user can add,update,delete in gridview I written the code for add & update but can u help adding rows in grid view My code: ...
2
by: Kbalz | last post by:
I have a user control that has a gridview in it. I am dynamically setting up its datasource and columns based on an XML file. I have everything done except adding columns to the gridview, so that...
1
by: | last post by:
How do I add static text to a bound field in a gridview? For instance, I want the following label in a gridview to be displayed as "Smith: Exempt" "Jones: Exempt" etc. <asp:Label ID="Label1"...
1
by: Normann | last post by:
I am trying to add data to an existing gridview, the gridview already has defined columns and I need to add data to these columns. However when I use gridview.datasource, it just adds new columns...
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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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.