Difference between Rowcommand and Row DataBound?

Posted by Laghaterohan under ASP.NET on 4/18/2011 | Points: 10 | Views : 17608 | Status : [Member] | Replies : 4
Hello,

Can any one please help me clear my concept on Row Command and Row DataBound events of the Gridview?


Thanks!

Best Regards,
Rohan Laghate



Responses

Posted by: SheoNarayan on: 4/18/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
RowCommand event fires when a button is clicked from inside the GridView Row.
Can be used to Delete, Update, Select, Insert (Yes, you can add insert functionality too into the GridView, read http://www.dotnetfunda.com/articles/article180.aspx ) or perform any custom operation on click of the button / link from inside the GridView row.

RowDataBound event fires when the data row is bound to the data source of the GridView.
Can be used to customize the look and feel of the GridView rows or bound any custom data based on some other data to the GridView rows.

Hope this helps,

Thanks

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

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

Posted by: Mesh_2010 on: 4/18/2011 [Member] Starter | Points: 25

Up
0
Down

Hi,
plz refer to this link...
http://www.dotnetmonster.com/Uwe/Forum.aspx/asp-net/68530/GridView-RowCommand-event-not-firing

Thanks
RameSH sinGH

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

Posted by: Atuldhiman on: 3/5/2012 [Member] Starter | Points: 25

Up
0
Down
Sheonarayan Sir i have one question :

please help me

If i am binding a gridview with 10 rows , then how many time the Rowdatabound function should fire?

Regards,
Atul Dhiman
"Necessity is the mother of Invention"

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

Posted by: Naraayanan on: 3/5/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
I think , depends upon your row count.

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

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

Login to post response