How To Display Gridview Datas As Two Columns

Oct 29, 2010

I have a gridview in a webform. When the page is laoded the data from xml is binded to gridview. Say i have twenty product details in xml. Now i have written code to bind those details with gridview its working fine.

i want to display like this, for exmaple if there are twenty records i want to display ten datas on left and ten datas in right, find the sample below,

Records in dataset,

a 1
b 2
c 2
d 3

this is the way i want to display in gridview,

a 1 c 2
b 2 d 3

View 1 Replies


Similar Messages:

C# - Display GridView With Many Columns As Two Sets Of Columns?

Jan 20, 2010

I apologize for the odd title. I've been trying to figure out how to do this and can't quite put it into words. Basically, I need to try to display a GridView with a whole bunch of columns (37 in one case) in two "rows" of columns. More or less.

So instead of this:

Column1 Column2 Column3 Column4 Column5 Column6
Data Data Data Data Data Data
Data Data Data Data Data Data
Data Data Data Data Data Data

I'd like something like this:

Column1 Column2 Column3
Data Data Data
Data Data Data
Data Data Data

Column4 Column5 Column6
Data Data Data
Data Data Data
Data Data Data

As in the example there can be multiple rows returned which all need to be displayed. I'm trying to stop a very large horizontal scroll bar being required. I've been searching as much as I can but haven't found anything that fits what I'm looking for.

View 1 Replies

C# - Convert The Gridview Datas To The Table?

Apr 10, 2010

i have a gridview as follows:

Sub marks result

eng 56 p
maths 45 f
science 67 p
S.S 78 p

im using the mail function to send the marks to the student. how to convert these gridview rows to the table rows or how to pass the gridview datas into mail function as'message'

View 2 Replies

C# - Addition Of Two Columns Display Its Result In Third Column Of Gridview?

Jan 5, 2011

Rate AnodeRate TotalRate
100 100 200

txtrate,txtanoderate n txttatalrate are added in ItemTemplate of gridview.

rate field is in database table while anoderate n totalrate not in database table ,also totalrate is readonly so that user can see only its addition,this addition will b passed to txtrate field n wil get bind that value in database. also i took

<asp:HiddenField ID="hdnTotalRt" runat="server" /> as it is readonly..

sample code:

enter code here
<asp:TemplateField HeaderText="Standard Rate">
<ItemTemplate>
<asp:TextBox ID="txtRate" runat="server" BorderWidth="0.5pt" Text='<%# Bind("rate") %>' BorderColor="green" BackColor="#ffffcc" Width="40px"></asp:TextBox>

[Code]....

It is showing me error as The name "txtRate"does not exist in d current context

View 1 Replies

Forms Data Controls :: Gridview Display Only 255 Columns?

May 8, 2010

I read excel file into gridview

Excel file has about 500 columns

Gdidview displays only 255 columns

What do you think of this problem??

excel 2003 and 2007 are the same

View 6 Replies

Data Controls :: Display Dates As Columns In GridView Header

Mar 26, 2014

I want to add the header dynamically during runtime in grid view. I am implementing an attendance application where I want to show the report as absent or present for the last few days for a subject. 1 means present and 0 means absent. How to bind these dates as header during runtime these dates i am getting from database.

Name 17-03-2014 18-03-2014 20-03-2014 21-03-2014 22-03-2014

Rohit 0 1 1 1 1
Raj 0 1 1 1 0
Abhijit 0 1 0 1 1
Sonu Nigam 0 1 1 1 1
Arnold 0 0 1 0 0

View 1 Replies

Data Controls :: GridView - Display Multiple Columns Under One Heading?

May 7, 2015

Gridview code :

<div class="table-responsive">
<asp:UpdatePanel ID="ExistingBuilderGrid_UpdatePanel" runat="server">
<ContentTemplate>
<asp:GridView ID="ExistingBuilderGrid" CssClass="table" EnableViewState="False" AutoGenerateColumns="False"

[Code]....

I want to merger both Fields and both Values column HEADER to one Header cell like Business Assigned Resource ...

NOTE:

dont merge the data cells , only merge header cells

View 1 Replies

Data Controls :: Calculate SUM Of Columns In GridView And Display In Label?

Dec 13, 2013

I have to display sum of Basic_Amt, Tax_Amt, Net_Payable in gridview without using database.

my query.

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="dataTables_wrapper"
CellPadding="4" ForeColor="#333333" GridLines="None">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<Columns>

[Code].....

View 1 Replies

Forms Data Controls :: GridView With Datas From VB.NET Script?

Apr 30, 2010

I'm wondering if it's a GridView is able to display data from my VB.NET Script.

My GridView is connected to a SQL server wich display datas from an user which can have a few accounts.

My script write one password per line.

How can I display passwords in the same lines from the GridView ?

View 2 Replies

Forms Data Controls :: Gridview Display Multiple Columns Under One Heading

Jun 28, 2010

I want to display my data from sql in a grid view. Here the problem is how do I display more than one columns under one column. For example, I have A, B, C, D, E, F columns in sql and then when displaying in Grid, I want to display as 3 columns A, B, C and under column "B" I want to Display D, E, F.

View 19 Replies

Data Controls :: Display Long Text Strings In GridView Columns

Apr 7, 2014

In my website, there is a page called "SMS Log"It contains a GridView, in which there are 5 columns:

1) SMS sent time
2) SMS Text
3) Recipients
4) status
5) Button (view detail) since, "SMS Text" is large and "Recipients" are more than 1.

So Gridview looks very conjusted, also it does not look good.Is there any other control I can use other than Gridview to show above 5 columns in a well organized way.

View 1 Replies

Forms Data Controls :: Editing Datas In Gridview Using A Dropdownlist?

Dec 20, 2010

i am making an application using a datagridview... And I am very new to it. And I need to edit my datas in gridview using a dropdown list.

So this is the flow of the program. As the page load, my gridview will appear, with the datas from the database binded to it, so far I have done that already. Every row in the gridview has an edit hyperlink, so when I click that, I can change the values in that row using a dropdownlist, wherein, the item in my dropdown are aswell from my database.

View 2 Replies

Forms Data Controls :: To Display The Gridview Rows/columns In Breadcrumb Style?

Dec 27, 2010

I want to display the gridview content in breadcrumb style.

View 5 Replies

AJAX :: How To Display 4 Columns And It's Columns Name In AutoCompleteExtender Control

Feb 9, 2010

I am developing an web application. One of this form has a textbox. When the user enter chars i need to fetch the records from db and display as 4 columns in AUTOCOMPLETEEXTENDER CONTROL TOOL KIT and it's column name also. When the user click any one of the row, i need to get the 2nd clicked column name and display it in textbox.

how to display 4 columns and it column name in autocompleteextender control?

View 1 Replies

Forms Data Controls :: Filter GridView From SQL Datas With Windows Username

Apr 15, 2010

I have a list with computers, username and other values in a SQL server.

I can diplay this on a gridview with a SQL script.

However i wan't to filter the list by the windows's username.

When a user logon from this windows account and goes to the ASP.NET web page he could shows only the list that contains his username...

I'm able to ask to the SQL server the SQL login, computer name wich we are logged on but no the windows login.

If someone known how make a kind of filter, i can display the windows username with a VB.NET script

View 9 Replies

Data Controls :: Display Data Of Multiple Columns In Same Column GridView?

Jan 8, 2014

 have a GridView with two columns:   Part Number |  Part Details

When I search for the part number 12345, the gridview will display like this

PartNumber   |   PartDetails

12345           |   image1  (image1 will see as document picture)

If I search Part Number and doesn't get any data results in gridview the information will be:

PartNumber   |   PartDetails

 0                 |   image2  (image2  will see as red cross picture)

How to change the image2 in the same column cell 1 in the GridView when the data results are "0" ?

Here is my code:

<asp:GridView
Width="570px"
runat ="server"
ID="grdView1"

[Code]....

View 1 Replies

Data Controls :: Display Multiple Columns In Multiple Lines In Single Column In GridView

Aug 18, 2015

I have a question in gridview, I want to combine my two or more records into a single cell with two rowsfor Example i have a ID, Name, Year Start, and Year End for Column name in database and i want call it into my gridview that the Year Start and Year End will combine to Year like:

In Database

ID Name Year Start Year End

1 Yourname 2010 2015

In Gridview:

ID Name Year

1 Yourname 2010 2015

in a year column i want it to two row..

View 1 Replies

Forms Data Controls :: Calculation On Textbox In Gridview Row - Display Total Of All Three Columns In Total Column?

Apr 7, 2010

i have one grid which have 5 columns 1 for subject,2,3,4 for marks which have textbox to insert obtained marks,and last column have one lable to display total of (2+3+4),now i want total value on textbox event,when user enter any value to any column of textbox i need to display total of all three columns in total column.

View 2 Replies

Forms Data Controls :: Display The Gridview Control With An Interface That Is Ready For Inputting Data Into Columns?

Jan 6, 2010

how to display the gridview control with an interface that is ready for inputting data into columns. Bsically I want the grid to display initially in update mode without the user having to click the update link or button.

View 1 Replies

Data Controls :: Display Multiple Columns In Multiple Lines In Single TemplateField Column In GridView?

Aug 18, 2015

I want to bind three column with one row in gridview in asp.net with c#,

i want like this, 

Name | Info
----------------------
name | lastname

        | phone number

        | address

I get this by default

name | last name | phone number | address 

View 1 Replies

C# - GridView - Columns.Insert() Cause Data To Vanish On Postback But Columns.Add() Works OK?

Oct 13, 2010

I have a GridView that has several dynamic columns (I do not know how many at design time and it could be 0-12 columns, hence need for dynamic columns). I have the columns in the grid and data bound to them - works great. There are other standard, design-time TemplateField columns with TextBox controls in them. These are bound with values that the user can edit. The grid is posted back via a Submit button. My question is "Why does gv.Columns.Insert() cause all my TextBox data to be null on Postback, but gv.Columns.Add() works like a champ?"

protected void BuildColumns()
{
// The first column to begin to insert the columns in the GridView
int columnIndex = 5;
BoundField aoColumn = new BoundField();
aoColumn.HeaderText = "New Column 1";
gvMyGrid.Columns.Insert(columnIndex, aoColumn); // kills txtQuantity.Text on postback
gvMyGrid.Columns.Add(aoColumn); // works fine
columnIndex++;
foreach (MyEntity my in _myEntityCollection)
{
BoundField myColumn = new BoundField();
myColumn.HeaderText = String.Format("{0:d}", my.StartDate);
gvMyGrid.Columns.Insert(columnIndex, myColumn);
columnIndex++;
}
}

I then go on to assign values to these BoundFields in the _RowDataBound method and all of this works great. However, when I post back and try to reference some TextBox and they are all null. And yes, I have the BuildColumns() call wrapped in if (!IsPostBack) on Page_Load. Of course I would like to use .Insert() so that the columns can go in the proper location and not at the end of the Columns array.

View 1 Replies

Forms Data Controls :: In Page User Able To Select Gridview Columns And It Will Hide Remaining Columns

Mar 18, 2010

in asp.net page user able to select gridview Columns, and it will hide remaining columns and that selection done by check box with column list bellow is Image link , what exactly I am looking for [URL] it look bellow after selection of column done [URL]

View 1 Replies

Hide Columns In GridView With Auto - Generated Columns?

Jan 19, 2010

GridView1.Columns.Count is always zero even SqlDataSource1.DataBind();

But Grid is ok I can do

for (int i = 0; i < GridView1.HeaderRow.Cells.Count;i++)

I rename request headers here but

GridView1.Columns[i].Visible = false;

I can't use it because of GridView1.Columns.Count is 0. So how can I hide them ?

View 5 Replies

Show Several Columns In Datasource As Autogenerate Columns In Gridview?

Jan 27, 2011

I have a datasource, which includes many columns, idealy, I need use a gridview to show:

1) first 3 columns: template fields, these fields depends on values in some columns of datasource. I use template fields, hard coded. works fine.

2) the other columns. This is I do not know how to do it. In the data source, there are about 10-20 columns data, each time, the # of columns of the data varies. idealy, I need show each of them as a seperated column in gridview. The entire data source may have 30 columns, but some of them are used in 1), and I only want show these 10-20 columns in gridview. Some columns in data source, I may not use them at all. is there a way to do this? or have to seperate them as a detail view style UI?

View 1 Replies

C# - How To Join Two Datatable Datas Into One Datatable To Show In One Gridview

May 24, 2010

how to join two datatable datas into one datatable to show in one gridview

i.e in 1 datatable i have username and pwd and in another datatable i have that user details. how to show all these in one datatable to get those values display in gridview(asp.net)

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved