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
1 answer

Preserve tablesorter order on postback

I'm using a Tablesorter 2.0 plugin with Gridview on ASP.NET. I used this code to fix the THEAD problem : if (GridView1.Rows.Count > 0) { GridView1.UseAccessibleHeader = true; GridView1.HeaderRow.TableSection =…
0
votes
2 answers

Using C# to set System.Drawing.Color.FromName

Objective: The objective is to set the System.Drawing.Color dynamically based on a text value within a datatable. The text value is the name of a color within System.Drawing.Color. The purpose is to change the backcolor of a grid based on the given…
0
votes
0 answers

ASP.NET Gridview custom command field that switches to edit mode and some difference can be captured in rowdatabound

My first ever question on Stackoverflow ASP.NET C# Gridview My question is this How can I have a custom Edit button in my command field template that will still switch the rows to edit mode but will show different content in one of the fields. I…
Wazi
  • 11
  • 4
0
votes
1 answer

Setting tooltip to link button inside gridviewin.net

I have a link button which is a template field of my gridview. I need to set different text as tooltip of linkbutton in each row.My code not working, protected void Grid_course_RowDataBound(object sender, GridViewRowEventArgs e) { connect con…
user3065219
  • 45
  • 2
  • 12
0
votes
1 answer

grid view page numbers are hidden on RowDataBound

I have a grid view and set allow page to true.it worked fine but when I want to invisible some column (such as ID), the page numbers are hidden!
Hamid Talebi
  • 1,298
  • 2
  • 24
  • 42
0
votes
1 answer

ASP.Net Gridview For Next loop within RowDataBound

I'm trying to do something reasonably simple but for some reason something is going wrong and i can't for the life of me see why. I have a data grid, on RowDataBound i want to loop through another DataSet and show multiple values within one cell. So…
Jammer
  • 2,330
  • 11
  • 48
  • 77
0
votes
1 answer

Dynamically added cells disappear while exporting to Excel

I have a gridview. I have created two columns dynamically in the Row_DataBound event of the gridview. if (e.Row.RowType == DataControlRowType.DataRow) { TableCell cell1 = new TableCell(); cell1.Width = 100; …
Shanna
  • 753
  • 4
  • 14
  • 34
0
votes
3 answers

How to set the background color on a gridview row

I was trying fire a row data bind event to a grid view. When data is being bound to grid view, i would like to check a condidtion , if the condidtion is satisfied , then i need to apply some color to that entire row..Please check the below code i am…
Sai Avinash
  • 4,683
  • 17
  • 58
  • 96
0
votes
1 answer

How to read from Listview in asp.net

I have a ListView i have add in asp.net form there is code is below:
Vikram
  • 489
  • 3
  • 8
  • 18
0
votes
1 answer

System.Web.UI.WebControls.GridViewRow' is not accessible in this context because it is 'Friend'

I would like to set the first column in a Gridview to zero, but in doing so, I get the following error: System.Web.UI.WebControls.GridViewRow' is not accessible in this context because it is 'Friend'. This is my Grid:
user1724708
  • 1,409
  • 7
  • 31
  • 53
0
votes
1 answer

javascript not firing after setting onclientclick in gridview rowdatabound

I want to fire a javascript to confirm deleting the row. This is the rowdatabound Private Sub GridSlide_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridSlide.RowDataBound If…
user2621831
  • 93
  • 2
  • 8
0
votes
2 answers

Selecting specific column in RowDataBound

I am trying to make it so that if there is a cell in a specific column that doesn't contain a value, i want that cell to change colour. I don't currently have any example code that i can show but i would be grateful if anyone can help.
GeoffWilson
  • 433
  • 7
  • 21
0
votes
0 answers

rebinding gridview when adding row adds the overhead of rebinding the already binded rows

I have a GridView that contains a DropDownList and I populate the DDL with a DB query in the RowBoundEvent. The rest of the columns of the Grid are BoundFields and they are populated from a list of ( Object ) . Every time I add a new Row to the…
UrsulRosu
  • 507
  • 1
  • 6
  • 16
0
votes
1 answer

GridView RowDataBound event makes my GridView slow

I have a PopupExtender that shows some information when a button in the GridView is pressed. This button exists on every row. I also have a DropDownList present in every row that is populated by querying a database. I do this because it may be…
UrsulRosu
  • 507
  • 1
  • 6
  • 16
0
votes
0 answers

asp.net gridview RowDataBound method

There's a way to build a link button with CommandName directive within the GridView RowDataBound method? I can only create html elements such as: link, img, or simply text. thanks a lot. PS. I prefer vb.net code instead of c#!!
Blasco73
  • 2,980
  • 2
  • 24
  • 30