Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
 in gridview i have link button "lbnOrderId" 
when im clicking "lbnOrderId" i want to display(@orderId,@UserName,@PhoneNo)
 in popup window.
Posted
Updated 4-Apr-12 22:47pm
v3
Comments
hiren soni 5-Apr-12 1:48am    
Whats ur question actually???
sandeep nagabhairava 5-Apr-12 2:06am    
i want to display some values in popup window, from database.
hitech_s 5-Apr-12 4:55am    
for popup which one u r using ? i mean div as a popup or showmodaldialog javascript function?
sandeep nagabhairava 5-Apr-12 5:02am    
i used ModalPopupExtender ajax.

On GridView1_RowCommand
use like as
C#
protected void fect_taskid(object sender, GridViewCommandEventArgs e)
    {
        try
        {
            
                int index = Convert.ToInt32(e.CommandArgument);
                GridViewRow row = GridView1.Rows[index];
                lblassinmentno.Text = row.Cells[1].Text;
                lblassinedon.Text = row.Cells[9].Text;
                lblcontactno.Text = row.Cells[8].Text;
                lbldeptt.Text = row.Cells[4].Text;
                lblempcode.Text = row.Cells[3].Text;
                lblmailid.Text = row.Cells[6].Text;
                lblName.Text = row.Cells[2].Text;
                designation.Text = row.Cells[5].Text;
                GridView3.DataBind();
                this.modal11.Show();
            
        }
        catch(Exception ex)
        {
            
        }
 
Share this answer
 
Hi ,
Just change statement according to your Query as long you are using Bind expression just Give to Grid Data soure .
C#
void Getdata()
 {
     SqlConnection con = new SqlConnection(@"Data Source=.;Initial Catalog=test;Integrated Security=True");
     string statement = "select item_code, Item_name, brand, size, section, price, Material, Qty, tax, tt  from Items ";
     SqlDataAdapter da = new SqlDataAdapter(statement, con);
     DataSet ds = new DataSet();
     da.Fill(ds);
     GridView1.DataSource = ds;
     GridView1.DataBind();
 }

Best Regards
M.Mitwalli
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900