When to use OnRowCreated in GridView? [Resolved]

Posted by Amatya under ASP.NET on 7/21/2016 | Points: 10 | Views : 599 | Status : [Member] | Replies : 5
When to use OnRowCreated in GridView? Need an Example for better understanding. Thanks in Advance.

Feel free to share informations 9731764134
mail Id ' adityagupta200@gmail.com
Thanks



Responses

Posted by: Bhuvanesh6 on: 7/22/2016 [Member] Starter | Points: 50

Up
0
Down

Resolved
It is created when you bind the set of data through Dataset to a grid view, during this operation if you wish to implement any operation in application then this method will help you to get your logic done here.

Example: on Data binding by row on Row should enable edit option for some data but not for all data based on a flag in data [Active Date / Inactive Data], these kind of operations can be achieved here.

Bhuvan

Amatya, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jitendrasoft09 on: 7/21/2016 [Member] [MVP] Starter | Points: 25

Up
0
Down
OnRowCreated fires when a new row is created dynamically in gridview. This is applicable when developer looks for change the properties behavior of the controls like row cell color, text etc once row is created in gridview. Real time example like we usually do the CRUD operation in gridview.

Jitendra Kumar
If my post helps you, plz mark as an answer.

Amatya, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sheonarayan on: 7/21/2016 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Hi Amatya,

Thanks for asking this question. As explained by Jitendra, OnRowCreated event of GridView is used to attach any property or event to the rows of the table that is generated by GridView. Here is the a nice & to the point example, click on the link

http://www.dotnetfunda.com/codes/show/6827/highlighting-gridview-row-when-it-has-alternating-row-color


@Jitendrasoft09, your given link has nothing to do with the OnRowCreated event. That article is on different topic. Please remove it and do not provide any link that has nothing to do with the question being asked.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Amatya, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jitendrasoft09 on: 7/21/2016 [Member] [MVP] Starter | Points: 25

Up
0
Down
Done....

Jitendra Kumar
If my post helps you, plz mark as an answer.

Amatya, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Amatya on: 7/22/2016 [Member] Silver | Points: 25

Up
0
Down
Thanks Bhuvanesh6

Feel free to share informations 9731764134
mail Id ' adityagupta200@gmail.com
Thanks

Amatya, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response