Questions tagged [rowdatabound]

Occurs when a data row is bound to data in a GridView control. Contained in the namespace System.Web.UI.WebControls

According to Microsoft Developer Network:

  • Detail of RowDataBound event

    The RowDataBound event is raised when a data row (represented by a GridViewRow object) is bound to data in the GridView control. This enables you to provide an event-handling method that performs a custom routine, such as modifying the values of the data bound to the row, whenever this event occurs.

  • Syntax (C#)

    public event GridViewRowEventHandler RowDataBound
    
  • See example here:

139 questions
0
votes
0 answers

How to created an event of a control created during GridView RowDataBound?

I programmatically created ImageButton on RowDataBound Event. I want to make ModalPopup appear when the ImageButton is clicked. How can i create an ImageButton_Click Event for the ImageButton? protected void gv_RowDataBound(object sender,…
Seehyung Lee
  • 590
  • 1
  • 15
  • 32
0
votes
1 answer

Gridview click on row enable controls

I have a gridview. The gridview has a textbox multiline that keeps an text. After that I have a column with imagebutton named approved, and one named not approved. I want to force the user before click approved or not approved to read the text…
Equilibrium
  • 163
  • 2
  • 15
0
votes
3 answers

Change row color of gridview by database Values

I am making a application in asp.net which shows the values in gridview from the database.In database i am having a colmn named as StatusId which has a value of 1 or 2 or 3. I tried to show the grid view rows in different color by their statusId…
Vivek Dragon
  • 2,218
  • 4
  • 27
  • 48
0
votes
3 answers

Converting some code to vb.net from c#

I am converting some classes from C# to VB.NET and this line can't be converted properly. I tried few online converters but they don't seem to work. this.mGrid.RowDataBound += new GridViewRowEventHandler(RowDataBoundHandler); Converted VB.NET that…
Laurence
  • 7,633
  • 21
  • 78
  • 129
0
votes
1 answer

filling rows with conditions in a gridview

I need to evaluate a condition from a database using linq so that a checkbox for each row enables or no, I think it can be done using the RowDataBound or CreateRow event. i.e, I have a gridview with several columns that are fillied with a datasource…
esteban
  • 63
  • 3
  • 9
0
votes
1 answer

How can I use the RowDataBound declaration on a GridView to navigate away to new .aspx page with Specific window size

I used the following code in rowdatabound event if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes["onClick"] = string.Format("window.location = 'CandidateProfile.aspx?candidateID={0}';", DataBinder.Eval(e.Row.DataItem,…
Shameel Faraz
  • 78
  • 1
  • 6
0
votes
1 answer

How can I use the GridView datasource in code-behind to not trim text?

Hi and thanks for looking. I have a GridView, and its datasource is set to an external class which returns an ArrayList. Now, in the aspx page, I have a TemplateField, and the Text property is set to Text = '<%#Eval("Name") %>' except that the…
Freakishly
  • 1,533
  • 5
  • 32
  • 61
0
votes
2 answers

Gridview rowdatabound is taking forever setting the onclick javascript for checkboxes in rows

enter code hereI have a gridview in some code I inherited that is using rowdatabound to add javascript to checkboxes. This is to enable the row checkboxes to be set by a master checkbox in the header. And that all works. The problem is performance.…
Joe B.
  • 1
  • 3
0
votes
2 answers

Hide GridView Column using linq

I am trying to hide my gridview columns on RowDataBound event. At the moment, I am doing : e.Row.Cells[4].Visible = false; The problem with this approach is that whenever I change the order of the column in grid veiw, I also have to change the…
Usman Khalid
  • 3,032
  • 9
  • 41
  • 66
0
votes
1 answer

ASP.net GridView get database values

I have my GridView populating like so:
StealthRT
  • 10,108
  • 40
  • 183
  • 342
0
votes
2 answers

GridView RowDataBound event handler does not find GridView cells content

I have the following GridView, which has as DataSource a List:
CiccioMiami
  • 8,028
  • 32
  • 90
  • 151
0
votes
1 answer

GridView -> Databinding from SQL. FindControl object reference not set to an instance in RowDataBound

I am trying to change one of my columns to show a picture instead of text. The text is currently all gathered from SQL. if (e.Row.RowType == DataControlRowType.DataRow) { DataRow dr =…
0
votes
1 answer

Pass a value using Request.QueryString when I doubleclick

I have a gridview and I want to pass a value from a row cell to another page. Based on the value which is a string, I can run a specific query and fill another gridview. My problem is, that when I double click the row, it won't pick up the value,…
Colin Roe
  • 774
  • 1
  • 18
  • 35
0
votes
3 answers

How to chage the disabled hyperlink color in gridview?

In Gridview RowDataBound I am disabling hyperlink based on its value. But hyperlink text is grayed out. I want to change the fore color of the disabled hyperlink, so that I can read text easily. I tried as mentioned below. protected void…
Ranjith
  • 549
  • 4
  • 10
  • 20
0
votes
1 answer

Display Hyperlink field on rows based on value from the database

How do I dynamically display the 'Edit' on the hyperlink field based on the values on the rows, generated from the database. N/B.: the gridview automatically generates rows.
user851971
  • 23
  • 1
  • 7
1 2 3
9
10