Forms Data Controls :: Input Control For Multiple Rows And Columns?
Jun 10, 2010
I want to put an input table on a web page using ASP.NET. The input table has 3 columns: date, quantity, and price. The number of rows is variable, depending on user input. The code behind will read the data and perform the necessary calculations. The data will not go into a database. It would be nice to have some client-side or server-side validation for the data, such as required fields and range checking.
Which control(s) in Visual Studio 2008 will perform what I want to do?
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
Iam working on an asp.net application.Recently client come with new requirement. Need a control which is similar to table or like gridview with rows and columns.It should allow user to enter data in the cells. And when the user press tab it should go to next cell and finally if we press enter key, it should validate the data entered in the current row and if data is correct it should create a new empty next row(like entering data manually in an sqlserver table). How can i implement this functionality? Can i use gridview / javascript to implement this functionality.
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:
i'm using the code below to select multiple rows in a gridview using a checkbox, how do I modify the code in a "select all" button click event to select all the rows by checking the checkboxes in all the rows? How do I also clear all the checkboxes using sa "Clear" button click event?
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
UserPatientStatusID RelevantPeriod TotalCount ProviderSpecialtyServiceName a OUT November2008 1 Not Available a ER September2008 1986 Not Available a ER April2009 1837 Not Available a ER December2009 2367 Not Available a ER August2008 1908 Not Available b ER February2009 1598 Not Available b ER January2009 1972 Not Available b ER June2009 2087 Not Available b ER December2008 2012 Not Available b ER November2009 2148 Not Available b ER November2008 2030 Not Available c ER October2009 2240 Not Available c ER September2009 2029 Not Available c ER October2008 2079 Not Available c ER July2010 1714 Not Available c ER August2009 2115 Not Available c OUT July2010 2 Not Available c ER March2010 1755 Not Available c ER May2010 1759 Not Available c ER July2009 2063 Not Available c OUT April2009 1 Not Available c OUT December2008 1 Not Available c ER March2009 1931 Not Available c REC August2009 1 Not Available
I know that there can be 24 relevant periods for each user. There may or may not be all 24 present for each user.
Now all that 24 periods I have in an array in C#. I know what these periods will be. They change so I cannot hardcode it. It has to be dynamic.
I want to create 24 columns of that rows for relevant periods and display TotalCount in that and get all other data accordingly in c#.
I have a page in which i need to show data in the form of a grid. Each row in the grid is made up of 2 sub-rows, the first sub-row consists of a dropdown, a textbox & a textarea. Whatever is entered in these controls should be displayed in the second sub-row in the form of labels at runtime (i.e. using javascripts)
There can be multiple rows like this. The grid would have a max of 30 row, not more than that. create this which one would be better, in terms of performance & complexity, a GridView or a DataRepeater?
I am trying to sum the rows in a gridview. It works find except when I do an update. Then I get the following error:Input string was not in a correct format. The error occurs when it its the Total1 +=gr1.cells(5).text or the Total2 area. Here is my code to sum the rows:
Need row editing on page_load for all the cells and need to validate each cell entry. Means cell1 one entery isvalid it fills thrid cell and insert or update to a table in the database. How do i handle on tab clicking to update in databse.
I have a couple of things that are not working with my Gridview:
1) I've managed to display 3 columns in one column (see code above) but the data is separated by commas, how can I display each data item in separate rows.
2) How can I make the data unique, as I have added the distinct command which I configured in my SQL data source
3) I need the rows to not display nulls, but at the moment it isn't displaying the row if one of the columns is null?
If i use the multi delimited than error shows.How to use the multi delimited.If i run the code to to load the text file given in above show the bellow error
Input array is longer than the number of columns in this table.
Created button in the rowdatabound event grid show the button fine, but on clicking it dont fire the delete button event :(. How to resolve it. Rows and columns of grid are created dynamically.
Button btnDelete = new Button(); btnDelete.Text = "X"; btnDelete.EnableViewState = true; btnDelete.Command += new CommandEventHandler(btnDelete_Command);//Add this to every cell. e.Row.Cells[4].Controls.Add(btnDelete); void btnDelete_Command(object sender, CommandEventArgs e) Response.Write(e.CommandArgument); }
I want search with multiple names in Name coloumn. example I have pass the criteria to Name cloumn is 'Atul', 'Mayur', 'Suraj' this three names how to pass in a query.
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: