473,378 Members | 1,412 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.

Need help with Gridview

Hi, I am trying to display data from a database on to the website in a table
format using Gridview.
The problem is that each cell contains alot of data and so, when I try to
show this in the gridview the cells get stretched too large to show it
properly on the page.
One idea I had to remedy this is to have the data "cutoff" at a certain
number of characters and have the cell so that when it is clicked a
Multiline Textbox at the bottom of page show entire content of the "clicked"
cell.
My question is, how can I take the data and modify it for the gridview
before the page loads?
I am new to this, but I am looking at the Gridview events and I am wondering
if using the "onDatabinding" or "onDatabound" event is what I can use to
accomplish this?

If anyone has other advice or a workaround to my issue, I greatly appreciate
it.

thank you in advance.
Jun 27 '08 #1
1 1149
On 5 May, 23:56, "Durango2008" <el_dura...@yah00.c0mwrote:
Hi, I am trying to display data from a database on to the website in a table
format using Gridview.
The problem is that each cell contains alot of data and so, when I try to
show this in the gridview the cells get stretched too large to show it
properly on the page.
One idea I had to remedy this is to have the data "cutoff" at a certain
number of characters and have the cell so that when it is clicked a
Multiline Textbox at the bottom of page show entire content of the "clicked"
cell.
My question is, how can I take the data and modify it for the gridview
before the page loads?
I am new to this, but I am looking at the Gridview events and I am wondering
if using the "onDatabinding" or "onDatabound" event is what I can use to
accomplish this?

If anyone has other advice or a workaround to my issue, I greatly appreciate
it.

thank you in advance.
It's much easier to modify the databinding expression rather than mess
around with text in controls after they have loaded. For example:

For a label control in the item template the text attribute could be

text='<%# (Eval("BigField").ToString()).SubString(1, 10) %>'

in place of the 10 put whatever maximum length you require

Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: theKirk | last post by:
using Visual Studio 2005 C# ASP.NET I know there has to be a simple way to do this....I want to use C# in a code behind for aspx. Populate a GridView from an xml file Add Fields to the...
1
by: Miguel Dias Moura | last post by:
Hello, I have a GridView in my page which is created in runtime. It works fine. My page has 2 Asp Buttons: - The HIDE button makes GridView.Visible = False; - The SHOW button makes...
1
by: Siva | last post by:
Hi, I have a 3 tier ASP.Net app for a handheld which needs to fetch orders from database via a DAL and populate it in a gridview using objectdatasource. In the search page I have a few parameters...
5
by: Siva | last post by:
Hello I have a dropdownlist inside the gridview as a template column defined as follows: <asp:TemplateField HeaderText="Choose Location"> <ItemTemplate> <asp:DropDownList ID="ddlChooseLoc"...
3
by: mosscliffe | last post by:
I have a gridview and in the GridView1_SelectedIndexChanged routine I am attempting to get at the data in the row I have done it successfully with cells 'Access the contents of a field in a...
0
by: yeltsin27 | last post by:
I need some advice on handling dynamically added controls in a GridView. My app takes an uploaded CSV file containing addresses, converts it to a DataTable, databinds the DataTable to a...
0
by: LiamLiamLiam | last post by:
G'day all. I having a problem with my formview. I'll ty to explain my situation as best as i can. I have a page with a search field at the top which is just a simple asp:textbox. Below that i...
4
by: svgeorge | last post by:
I NEED TO COLLECT FROM THE GRIDVIEW(DATASELECTED) IN TO A TABLE(SelectedPayment) -------------------------------------------------------------------------------- How TO COLLECT THE ROWS...
0
by: steve | last post by:
I have been fighting with trying to update a GridView for a while. I don't want to use the "built-in" way to do it because I am using business layer methods for updating and deleteing and I don't...
1
by: Durango2008 | last post by:
Hi, I am not sure if this is the place to seek help for my issue, but I will explain what I am stuck on. I am currently creating a page that will display data from a DB using a Gridview.(simple...
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
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: 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: 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...
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: 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.