hi i have found the solution and i would like to share and which is as follow.
on the rating change event put this code
AjaxControlToolkit.Rating myRating = (AjaxControlToolkit.Rating)sender;
GridViewRow GridItem = (GridViewRow)myRating.Parent.Parent.Parent.Parent.Parent; // (this will depends on ur grid stucture m having 2 tables inside itemtemplate)this.updateRating(((Label)GridItem.FindControl("lblTransactionId")).Text, e.Value);
myRating.Enabled = false;
myRating.ReadOnly =
true;
private void updateRating(String Id, String Rating)
{
SqlCommand cmdInsertPostReply = new SqlCommand();
cmdInsertPostReply.CommandText =
"SPName";cmdInsertPostReply.CommandType = CommandType.StoredProcedure;
cmdInsertPostReply.Connection = objGeneral.con;
cmdInsertPostReply.Parameters.AddWithValue("@Id", Convert.ToInt64(Id.ToString()));cmdInsertPostReply.Parameters.AddWithValue("@rate", Convert.ToInt16(Rating.ToString()));
objGeneral.connect();
cmdInsertPostReply.ExecuteNonQuery();
objGeneral.closeconnect();
}