Questions tagged [boundfield]
107 questions
22
votes
6 answers
width of grid view boundfield
I can not set the width of bound field. Is there any problem in the following markup.
…

mmk_open
- 1,005
- 5
- 18
- 27
22
votes
2 answers
How do I break the a BoundField's HeaderText
In HTML in the td of a table you can break text by using
between the words. This also works in the HeaderText of a TemplateItem but not the HeaderText of a BoundField. How do I break up the Header text of a BoundField.
between the words. This also works in the HeaderText of a TemplateItem but not the HeaderText of a BoundField. How do I break up the Header text of a BoundField.

minty
- 22,235
- 40
- 89
- 106
13
votes
2 answers
How to add hyperlink to boundfield in gridview c# asp.net
I have a gridview in aspx page, I need it to go add hyperlink to the Component from BoundField once the user clicks on the Component1 value. How can I add the hyperlink to boundfield that's related to BoundField?

user2994144
- 177
- 1
- 1
- 11
11
votes
4 answers
Get value from hidden boundfield? ASP.NET
I know the question I'm going to ask is already asked for by other people, but those answers are no solution for my problem.
I have a gridview containing 2 BoundFields, 2 ButtonFields and a checkbox field (which is a TemplateField).
I also have a…

Wesley Lalieu
- 487
- 2
- 8
- 22
7
votes
3 answers
How to wrap text in the boundfield of Gridview?
I have a table, in the table there are couple of buttons and a Gridview. I am trying to wrap the text in one of the boundfield of the Gridview.
I have tried to set the RowStyle Wrap="true" in the Gridview properties and set the ItemStyle Wrap="true"…

GLP
- 3,441
- 20
- 59
- 91
7
votes
8 answers
Retrieve data from visible false BoundField of Gridview
I have this BoundField in a GridView
But when I try to get text in that field, it returns empty.
protected void gvwReports_RowCommand(object sender, GridViewCommandEventArgs…

Darshana
- 2,462
- 6
- 28
- 54
6
votes
1 answer
BoundField style
How can I give style for BoundField?
I'm using BoundField in Gridview. Tt shows an underline and an unwanted color.
How do I remove underline and color?

joji
- 61
- 1
- 1
- 4
6
votes
1 answer
Ignore inexistent column in dataset ( bound field )
I'm working on a legacy windows forms project which I'm migrating to webforms.
There is a dataset which I bind to a gridview .
I have made all boundfields, so the gridview won't automatically generate the columns. Whenever I bind this dataset to the…

Phiter
- 14,570
- 14
- 50
- 84
6
votes
3 answers
Asp Gridview use Boundfields? or Templatefields?
I put data in a data table e.g.
dt.TableName = "SA1";
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
Now I'm not sure if I should use boundfield (For all columns)

Jack
- 526
- 3
- 10
- 30
5
votes
3 answers
ASP.NET GridView use FindControl() on BoundField to manipulate field
I'm working with an old app that had hard coded columns for different locations, now that new locations are being added I decided to try and make things populate dynamically. One of the features of the app was displaying red text and bolding text…

RSolberg
- 26,821
- 23
- 116
- 160
5
votes
3 answers
Use a variable DataFormatString in asp.net ascx
So I have some code that looks like this:
This works as I would like it to. However, I want to reuse the date…

Andrew
- 1,571
- 17
- 31
4
votes
1 answer
GridView boundfield nested class
I'm developing ASP.NET page on localhost and then uploading it on the server. On localhost I successfuly use nested classes in DataField property of BoundField of an GridView. By nested class I mean this: DataField="Object.property" where Object is…

uiii
- 469
- 1
- 7
- 19
4
votes
3 answers
Evaluate datafield on boundfield to display text accordingly
Hello everyone How can I display different strings in boundfield according to value from datafield?
For instance, if datafield has a value of 1, it should display "Pending". If 2, "Deleted".
Thanks in advance.

Heinser Diaz
- 123
- 4
- 15
3
votes
1 answer
Can I change the colspan of a BoundField column's HeaderText
I have a 'status' cluster of three columns. I want to have the header row span all three. I know I can use the colspan="3" parameter with the th tag in HTML. How do I accomplish this with BoundField?
Sample code snippet as it exists…

Doug Wolfgram
- 2,064
- 4
- 27
- 42
3
votes
3 answers
How do I convert a BoundField to a HyperLinkField?
I have a GridView (gv) bound to a dataset (ds). Columns[1] is bound to a field in ds named orderFilename; Columns[6] is a date field.
If Columns[6] is null, I want Columns[1] to appear as text; if Columns[6] is not null, I want Columns[1] to…

Dave Reinheimer
- 45
- 2
- 8