开发者

Javascript problem with devexpress grid custom button

开发者 https://www.devze.com 2023-01-31 03:22 出处:网络
StringBuilder scriptFunc开发者_StackOverflowtion = new StringBuilder(); scriptFunction.Append(\"<script language=\'javascript\'>\");
        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.

0

精彩评论

暂无评论...
验证码 换一张
取 消