Forms Data Controls :: Datagrid With Dynamic Columns & Rows

Dec 6, 2010

I put in my page 1 table like grid with this style:

header of columns are select from table persons(so number of them are dynamic)

header of each row are select from table goods(so number of them are dynamic)

in table , in each cell,show the price & the date ,that this person,buy this goods

for example,in may 2008 ,Jack&sara buy pencil.so in front of pencil&buttom of jack we write his price and in front of pencil&buttom of sara we write her price.

so this table has 2 column & 1 row

in may 2009,

Jack&sara buy pencil.so in front of pencil&buttom of jack we write his price and in front of pencil&buttom of sara we write her price.

and jhon buy pen & suzzan buy book so this table has 4 column & 3 row

Price Date

Price Date

Price Date

Price Date

Pencil

Pen

book

then I want in each cell,I have 1 CHECKBOX that user of my program,checked each on that want. how can I design my page?

is ther any component?or I must create <TABLE> dynamically

View 4 Replies


Similar Messages:

Forms Data Controls :: Create An ASP Grid With Dynamic Columns With An Ability To Freeze Columns And Rows

Sep 20, 2010

I created a gridview that is made up of 4 gridviews and using a stored procedure to populate it. I create columns at runtime because the number of columns changes all the time.To make the grids editable I am adding template fields at runtime as I create the columns, this is to ensure that a user is able to edit the cells and some foot values update. Reason why I have four grids is to freeze rows and columns like in excel using javascript. The problem is that performance is very bad especially in IE, the grids take a long time to load. I am not sure if this is caused by the data load or the creation of text boxes. see some of the code below for my _aspx page:

[Code]....

View 1 Replies

Forms Data Controls :: How To Convert Gridview Rows To Columns And Columns To Rows

Mar 4, 2011

I'm binding a gridview from a webservice with 30 columns and 10 rows, I need to print the same in a PORTRAIT, for that i decided to display columns as rows and

rows as columns like below:

EMP1 1 2 3 4
EMP2 1 2 3 4

View 3 Replies

Datagrid With 2 Columns That Have Different Datatable Rows?

Feb 9, 2010

i want to make a datagrid with 2 columns and many rows the columns i want to have databinding with a datatable

i want the 1 row 1 column of datagrid have data from 1 row of datatable
i want the 1 row 2 column of datagrid have data from 2 row of datatable
i want the 2 row 1 column of datagrid have data from 3 row of datatable
i want the 2 row 2 column of datagrid have data from 4 row of datatable
......
......

i use something like this

[code]...

but i have two times the same in tha datagrid left and right

View 28 Replies

Forms Data Controls :: Datagrid With Column Choose To Choose Columns Dynamically Using DataGrid With Object Data Sour

Sep 30, 2010

I have "Order" object with Columns Ticket,OTP and CustomerName etc.Intially on DataGrid, I'm binding Ticket only , when user clicks on "Column Chooser" button, another windows appears to pickup CustomerName,OTP columns to add specified column dynamically on Datagrid. Environment : Asp.net ,C# with Object Data source

Public Class Order
{
publc void Order()
{
}
public string Ticket
{
get
{
return this.strTicket;
}
set
{
this.strTicket = value;
}
}
public string OtpNumber
{
get
{
return this.strOtpNumber;
}
set
{
this.strOtpNumber = value;
}
}
public string CustomerName
{
get
{
return this.strCustomer;
}
set
{
this.strCustomer = value;
}
}
}
}

View 1 Replies

Forms Data Controls :: Datagrid With Varying Columns

Oct 10, 2010

I am upgrading a classic asp page, the page uses response.write to make a table, as soon as a null value comes up for a month the columns of the grid then stop. The sql is below

SELECT sName, Strategy,
Sum(case when Month([Date])=1 then Rtn else null end) as Jan,
Sum(case when Month([Date])=2 then Rtn else null end) as Feb,
Sum(case when Month([Date])=3 then Rtn else null end) as Mar,
Sum(case when Month([Date])=4 then Rtn else null end) as Apr,
Sum(case when Month([Date])=5 then Rtn else null end) as May,
Sum(case when Month([Date])=6 then Rtn else null end) as Jun,
Sum(case when Month([Date])=7 then Rtn else null end) as Jul,
Sum(case when Month([Date])=8 then Rtn else null end) as Aug,
Sum(case when Month([Date])=9 then Rtn else null end) as Sep,
Sum(case when Month([Date])=10 then Rtn else null end) as Oct,
Sum(case when Month([Date])=11 then Rtn else null end) as Nov,
Sum(case when Month([Date])=12 then Rtn else null end) as Dec
FROM Chess

If this is run in oct i only have data from jan -0ct , how do i not display nov and dec so that its dynamic?

View 1 Replies

Forms Data Controls :: DataGrid - How To Get Columns From Two Table

Jun 16, 2010

i need to extend this so that i can inlcude another column from a different table. so let's say i have a colume in table Price and the column i want to display in datagrid header is cost, how can i do this? there is code backend but could i simply code the below to include this column?

[code]....

View 10 Replies

Forms Data Controls :: Datagrid - Display Columns Vertically

Jan 13, 2010

Does anyone know of a data control that displays the columns vertically?

Example
First Name Bill Bob
Last Name Smith Jones
Middle Initial A C

View 2 Replies

Forms Data Controls :: DataGrid Columns HeaderText Modification?

Jun 29, 2010

I'm trying dynamically to change the HeaderText of one of my DataGrid's columns but have some problem.

I'm making the change on button click event.

At the first click nothing happened, but at the second click the change is made correctly.

Why only at the second click the change is made?

View 4 Replies

Forms Data Controls :: Datagrid Template Columns Sorting

Mar 4, 2011

can i implement multiple column sorting in an ASP.NET DataGrid.Datagrid contains Template columns.

View 5 Replies

Forms Data Controls :: How To Re-order Rows In DataGrid

Jul 10, 2010

Im trying to re-order rows in datagrid. i've looked all over, i still cannot make it work.

[Code]....

And this is the code behind to bind the data

[Code]....

View 5 Replies

Forms Data Controls :: Can Display Columns Inside The Datagrid Footer

Feb 22, 2011

can i display columns inside the datagrid footer? if can.. i can i have the syntax?

for example: i have a columns in the datagrid which is binded to database. at the column footer.. i want to display another column.

View 45 Replies

Forms Data Controls :: Datagrid - Displaying Specific Columns As A Dropdown

Mar 16, 2011

I have a datagrid which displays a list of user data, such as name, his or her status, age. I have created a list of rows of user data but where the column shows status for example Single, Married, i want it to create a dropdown list where i can easily change the user status by selecting it from a dropdown and clicking the update button at the top of the datagrid. The update button will update all records that have been changed not just from the dropdown. I assume the dropdownlist requires a columnbinding event but i can't find any straight forward tutorials.

View 2 Replies

Forms Data Controls :: Datagrid Deleting Random Rows?

Jul 14, 2010

I have an asp.net 2.0 web app and one of the pages uses a grid to add/edit items before exporting the contents to excel. The items in the grid are selected based on a dropdown list--after the item in the list is selected, the grid goes and gets the items, populates a dataset and binds the dataset to the gridview. Some of my users are experiencing an issue where after deleting a random number of rows, a row not deleted will disappear or reappear. Though I have witnessed the behavior, I cannot duplicate it on my machine where the developement occurs (Win XP Pro, IIS 5.1, vwd2005 express). The windows 2003 server uses ASP.Net 3.5

Here is the code related to editing and deleting:

[Code]....

If I had to make a guess as to what was occuring, I would say that it appears at times to retain the deleted item's index after the grid is sent back to the user and tries to delete another row. But like I said, I can't duplicate the problem on my dev machine. if this might be caused by .Net 3.5 trying to run a 2.0 site?

View 5 Replies

Forms Data Controls :: Dynamically Create Rows In Datagrid?

Oct 7, 2010

I need to add three columns one with combo box and two text boxes.

I need to add rows to the data grid based on the collection i get which determines the number of rows. Could anyone point to right place to add a row dynamically.

View 8 Replies

Data Controls :: How To Add Dynamic Rows Together With Non-Dynamic To Single GridView Table

Dec 11, 2013

I have a Webform with a TextBox (Static) and 3 TextBox (Dynamic - based on the following article: [URL].... )

How to use this scenario with a single GridView table?

Based on the User input, the GridView might have (1 + 3) columns; (1 + 6) columns; (1 + 9) columns; ...etc.

View 1 Replies

Forms Data Controls :: Displaying Images From Database In The Datagrid In Multiple Columns

Jul 29, 2010

I'am developing a commercial website using vs2005 and sql2005 in which i want to display the images from the datagrid in three columns,as

1 2 3




4 5 6




7 8 9

View 8 Replies

Forms Data Controls :: Freeze Datagrid Columns / Scroll Bar Movement Getting Slow?

Jul 13, 2010

I have to freeze the first column in a data grid. i have done freezing part but the issue is vertical and horizontal scroll bar movement getting slow. in my data grid each row contains 18 textboxes and 18 image buttons.if number of rows count around 15 then the scroll bars working almost properly.issue in
morethan 15 rows

For freeze i am using CSS.Platform is asp.net1.1

in CSS i am using below given codes.
div#div-datagrid {
width: 200px;
height: 200px;
overflow: auto;
}
/* Locks the left column */
td.locked, th.locked {
position:relative;
cursor: default;
left: expression(document.getElementById("div-datagrid").scrollLeft-1);
}
/* Locks table header */
th {
font-size: 14px;
font-weight: bold;
text-align: center;
background-color:Navy;
color: white;
border-right: 1px solid silver;
position:relative;
cursor: default;
top: expression(document.getElementById("div-datagrid").scrollTop-4);
z-index: 10;
}
/* Keeps the header as the top most item. Important for top left item*/
th.locked {z-index: 99;}

View 2 Replies

Forms Data Controls :: Retrieve Cell Values From Datagrid Whose Columns Are Autogenerated?

Aug 1, 2010

I have a datagrid whose columns are autogenerated (based on the results from an SQL SELECT query). However, I need to retrieve values from certain cells across the datagrid, using the following code to step through the results.

[Code]....

I need to specify all my columns using TemplateField?

View 5 Replies

Forms Data Controls :: Missing Value In Some Rows When Populate Value In DropDownList (Datagrid)

Aug 10, 2010

So I have a dropdownlist and I'm trying to populate it with values in the database. For some reason, half of the rows has no value. It's happenning in a sequence as well, like the first row has no value, then the second row has value, then the third hasno value....

Does any one know why it does this?

View 3 Replies

Forms Data Controls :: DataGrid - Extracting Results And Hiding Rows?

Jan 14, 2010

I have a dataGrid with ButtonColumns in my asp page and I would like to do the following to:

When a row is clicked, I want to be able to:

1 - Hide all rows and display only the clicked row dynamically/on the fly.

trying to loop thru the datagrid and display only the Row index passed by the OnITemComman - but unsure of how to do it.

2 - Extract the row values (all cells in the row) to use as parameters in a query.

Used many ways of many examples but i always get a blank value. Managed to get the button text in the class but i need the full row values not just the cell clicked.

View 1 Replies

Forms Data Controls :: Hiding Rows In Datagrid W.r.t System Date?

Feb 5, 2010

I am using C# and VS 2008.

I have a nested Datagrid, Datagrid1 and Datagrid2 with access database, Where Date1 is PKey in Datagrid1 and corresponding to it entries are filled in Datagrid2 also.

It should be like:

1. Gridview2 Should not show any button/link like Edit.

2. Should hide the columns to insert new data, i.e No add button also and GridView2 add row should not be visible of Gridview2.

In all, Gridview2 should only show the data that is already inserted and user should not be able to make any changes in it and can only view it.

Here is my aspx code for Gridview2:

[Code]....

My code behind for Gridview2:

[Code]....

As you can see i have successfully hide Edit button of Gridview2 older then 3 days. Now i want to hide the Delete and all the columns to add new data in Gridview2 older then 3 days.

View 2 Replies

Forms Data Controls :: Transpose Columns To Rows In C#?

Jan 7, 2011

Gridview-

Id Name Initial
1 abc A
2 def B
3 ghi C

After transposing,I want it to be like this-

Id 1 2 3
Name abc def ghi
Initial A B C

how to transpose in c# with code and if it is made as a function then how can I call it?I'm new to c#.

View 1 Replies

Forms Data Controls :: Create Datagrid Row That Spans Columns And Holds Form Controls?

Mar 18, 2011

Here is the situation:I have a Datagrid which is going to display a number of rows. I want to click a button on the datagrid and have the following occur

open a row underneath the row clicked, without hiding or replacing that row Open this row so that it spans all of the columns as one continuous row where i can put form fields and/or just data formatted as I would like and not just in columns.Be able to close that new row. While I do most of my work in VB.NET, don't think that is a requirement for answering this.I have managed to currently take the first column (with the "Edit" button) and when clicked to
Hide the rest of the cells in that row Expand the button column to run all the way across the table Unfortunately I loose the clicked row's data, and I've only started getting this to work so I haven't tried too much, or getting data to bind to fields "on the fly"

View 9 Replies

Forms Data Controls :: Get Dynamic Datagrid Value To Textbox?

May 21, 2010

I have a code which generated dynamic gridviews based on a column ('c_AnalyticalSystemID"). Now I have a samll problem in passing cell parameter into a textbox which I clicked on a datagridview.

the code is :

[Code]....

Is it correct what I'm doing to get the value of cell into a textbox when clicked on a paticular datagridview.

View 1 Replies







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