Ramco Ramco

Ramco Ramco

  • 442
  • 3.4k
  • 528.4k

Display Data in Modal Repeater

May 17 2023 5:13 AM

Hi

  In below code Dynamic Link Button r created in Gridview RowDataBound. I want when user clicks on burron Data should get dispayed in Modal Popup Repeater

protected void gr_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            try
            {
                if (e.Row.RowType != DataControlRowType.DataRow)
                    return;
                e.Row.Cells[0].HorizontalAlign = HorizontalAlign.Center;
                for (int i = 6; i < e.Row.Cells.Count; i++)
                {
                    var row = (DataRowView)e.Row.DataItem;
                    var currentPerson = row[0].ToString();
                    var currentDate = row.DataView.Table.Columns[i];
                    var commandArgument = currentPerson + ":" + currentDate;

                    LinkButton button = new LinkButton();
                    button.Text = row[i].ToString();
                    button.CommandName = "Select";
                    button.CommandArgument = commandArgument;
                    button.OnClientClick = "GetModuleData(this)";
}
}
}

************************
private void ShowPopUpData()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(@"<script language='javascript'>");
            sb.Append(@"$('#modal_form_horizontal').modal('show');");
            sb.Append(@"</script>");

            ClientScript.RegisterStartupScript(this.GetType(), "JSScript", sb.ToString());
        }

Thanks


Answers (2)