Self-learning. NET GridViewRowEventArgs class

Source: Internet
Author: User

When studying the GridView, it was found that MSDN had a thorough explanation of the GridViewRowEventArgs class. When taking notes ,:

Before rendering the GridView control, you must create a GridViewRow object for each row of the control. When each row in the GridView control is created, the RowCreated event is triggered. This allows you to provide an event processing method, that is, to execute a custom routine (such as adding custom content to a row) each time this event occurs ).

Similarly, each row in the control must be bound to a record in the data source to render the GridView control. When you bind a data row (represented by a GridViewRow object) to the data in the GridView control, the RowDataBound event is triggered. This allows you to provide an event processing method, that is, a custom routine is executed every time this event occurs (such as modifying the value of the data bound to the row ).

SetGridViewRowEventArgsThe object is passed to the event processing method so that you can access the attributes of the row that raises the event. To access a specific cell in a Row, use the Cells attribute of the GridViewRow object contained in the Row attribute. You can also use the RowType attribute of the GridViewRow object to determine the row type (header row, data row, and so on) to be created ).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.