473,396 Members | 2,023 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,396 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 891
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...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.