Thursday, 14 December 2017

TextBox Change Event trigger Fired on row command event

1.> Create Jquery Function.

function SetMachineValue(txt) {
            $("#" + txt).trigger("change");
        }

2.> Call Jquery Function From Code behind using ScriptManager
    protected void grdConfiguration_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        try
        {
                ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "myJsFn",                                           "SetMachineValue('" + txtRatio1.ClientID + "');", true);
        }
        catch ()
        {           
        }
     }

No comments:

Post a Comment

React Hooks - custom Hook

  v CustomHook Ø React allows us to create our own hook which is known as custom hook. Example – 1 localStorage Demo Step-1 Create ...