hi all,
I have three bound columns in my gridview, namely :address 1, address 2, address 3.
- I want to have a single coulmn instead.
- Where i want to display the text something like (address1 = address 1 + address 2+ address 3)
- Also want to rename the header 'address 1' to 'Bank Address'.
- Moreover address 2 and address 3 columns should not be visible.
What I tried is:
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
GridView1.Columns[5].HeaderText =
"Bank Address";
e.Row.Cells[5].Text = e.Row.Cells[5].Text + e.Row.Cells.Text + e.Row.Cells[7].Text;
GridView1.Columns.Visible =
false;
GridView1.Columns[7].Visible = false;
}
The above code is not giving the desired output.
Regards,
Royal
Enter your message below
Sign in or Join us (it's free).