Open Bootstrap popup on ASP.Net GridView RowUpdating event using C#

Last Reply one year ago By chetan

Posted one year ago

have a gridview, when click on row, then row updating event occure, on which i find values from grid, and want to show them in bootstrap popup. Pls help

protected void grdshortlist_RowUpdating(object sender, GridViewUpdateEventArgs e)
        var index = e.RowIndex;
        GridViewRow row = grdshortlist.Rows[index];
        lblcandidateid.Text = grdshortlist.DataKeys[row.RowIndex].Values[0].ToString();
        lblappid.Text = grdshortlist.DataKeys[row.RowIndex].Values[1].ToString();
        IDataReader dr2 = sql.getdr("select  candidates.*,applications.jobid,,applications.jobid,convert(varchar(20),,113) as date,jobs.role,jobs.location from candidates join applications on candidates.candidateid=applications.candidateid join jobs on jobs.jobid=applications.jobid where applications.applicationid='" + lblappid.Text + "' ");
        // lblname.Text = dr2["name"].ToString();
        lblemail.Text = dr2["email"].ToString();
        lblph.Text = dr2["ph"].ToString();
        lbldesig.Text = dr2["designation"].ToString();
        lblemployer.Text = dr2["employer"].ToString();
        pnlpopup.Visible = true;
        ClientScript.RegisterStartupScript(this.GetType(), "Pop", "openModal();", true);

i tried this, but not working for me when i click on gridview row.

<script type="text/javascript">
    function openModal() {
Posted one year ago

try this:

ScriptManager.RegisterStartupScript(this,this.GetType(),"Pop", "openModal();", true);