Javascript problem with devexpress grid custom button
StringBuilder scriptFunc开发者_StackOverflowtion = new StringBuilder();
scriptFunction.Append("<script language='javascript'>");
scriptFunction.Append("alert('de')");
scriptFunction.Append("</script>");
ClientScript.RegisterStartupScript(GetType(), "alert", scriptFunction.ToString());
This is my code and it can run on page_load but i want it to run in my devexpress grid's CustomButtonCallback event. There is no error but it dont show an alert too. Do you have any idea?
KR,
Çağın
RegisterStartupScript registers script to run after postback. DevExpress controls use callbacks to interact with server. So, no postback - no script running.
CustomButtonClick="function(s, e) { var ID = e.buttonID }" it returns button's id.
精彩评论