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
2
votes
3 answers

how to show row data dynamically for table in angular 7

I have an HTML page in which I want to create a table. The columns in this table are dynamic which means that they are fetched from the server into a variable in the component using any[] type. The data in this table is also dynamic which means that…
user2564537
  • 1,041
  • 1
  • 12
  • 16
2
votes
3 answers

Show only the footer for inserting new row in Gridview in .Net 3.5

When my Gridview is bound with "few rows" of data, my current approach for adding a new row is an adequate design and works "well". However, if bound with "many rows" of data, my current approach for adding a new row is flawed: the EmptyDataTemplate…
John Adams
  • 4,773
  • 25
  • 91
  • 131
2
votes
0 answers

Asp.net/c# -> Gridview Pager doesn't get updated when gridview rows are filtered (or hidden)

I have the below code where I have some conditions because of which I have to hide the row from showing to end user. "ShowRow" is a boolean value that gets set in GetUnitOfMeasure function (not copied here) based on these conditions. There are some…
Anirudh
  • 581
  • 5
  • 14
  • 32
2
votes
1 answer

How to loop through specific columns in gridview?

I need to loop thru particualr columns in a gridview. For example, I need to loop every "%" columns and then assign colors according to their values, is there a simple way to achieve it? Thanks. Gridview table RowDataBound event Protected Sub…
user1672932
  • 129
  • 1
  • 2
  • 9
2
votes
2 answers

gridview id in rowdatabound

I have an rowdatabound method that is common for two gridviews. Part of the task for this method, is to asign values to last column of the gridview. The gridviews are the same, but the values are different from the two gridviews. So i need to check…
Ruben Ravnå
  • 659
  • 7
  • 17
1
vote
2 answers

Accessing another row while in Gridview RowDataBound?

Is there a way to access elements that are in another row, while you're in a RowDataBound event? public void gridview1_RowDataBound(object sender, GridViewRowEventArgs e) { // how to compare e.Row with row above or row below? }
Pupper
  • 2,315
  • 2
  • 22
  • 29
1
vote
1 answer

Gridview CommandField validation works, but not firing Delete method

I have a gridview that I'm trying to validate from code behind. In this case, to confirm a record deletion. My deletion method works fine until I add the validation which, when I implement it, it doesn't fire the deletion. To be clear, the deletion…
John Kinane
  • 366
  • 2
  • 8
  • 17
1
vote
1 answer

Handling RowDataBound causes dynamically-bound GridView to show only first record

I have a GridView control which I am dynamically binding to a DataTable which is populated by a query built based on a set of selected options. What I am trying to do is simply handle the RowDataBound event in order to format specific rows based on…
Zogglet
  • 39
  • 2
  • 10
1
vote
1 answer

c# img applying onclick attribute on RowDatabound

On my gridview in c# it's possible edit the single row.
user3368883
1
vote
2 answers

cannot find controls in GridView1_RowDataBound

I have a grid view on edit I run GridView1_RowDataBound in which I need to retrieve the values for drop-down list in the edit template and when user changes the values I post back and fill the following drop-down lists but I am getting null, and…
1
vote
2 answers

How to get current row of datagridview values when clicking on button?

I have a View Model in which my data is stored to be used on the presenter and window. However, I now need to get (when pressing a button) the current row's results on the grid into my view model. I first used the mouse double click event, but the…
user8166711
1
vote
1 answer

Find html control in gridview rowdatabound event in asp.net?

In asp.net we can find HTML standard control using (HtmlInputControlName)e.Item.FindControl("control_id"); My question is that can I find paragraph HTML tag

If yes, than what will be control name

Usf Noor
  • 219
  • 1
  • 5
  • 21
1
vote
0 answers

jquery not working after click event added using the OnRowDataBound event handler

I am having an issue with a Jquery click function and a javascript onclick funcion added using a gridview rowdatabound event. When the page is loaded the first time, the jquery click function works fine. But when the GridView Row is clicked and the…
DavidM
  • 307
  • 2
  • 6
  • 22
1
vote
1 answer

Calling e.Row.Parent.ClientID generate another ID for its GridView

The problem is simple: In a ASP.NET GridView, if the property e.Row.Parent.ClientID is used in the RowDataBound event, .NET generates another identifier for the GridView, and if you had javascripts in your page that used the ClientID for the…
1
vote
1 answer

How to mark records in gridview as read and unread

This is my GridView1. I want the latest record to be highlighted and after user click the authorization no(which user viewed the record in next page), the row will not be highlighted (means after the user view the record, the row is back to normal,…
user3431310
  • 719
  • 1
  • 10
  • 30
1
2
3
9 10