| |

VerySource

 Forgot password?
 Register
Search
View: 742|Reply: 2

WebForm in DataGrid using Hyperlink

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-23 07:30:01
| Show all posts |Read mode
There is a DataGrid in WebForm1. One column of the DataGrid is a hyper-connected column, which is also bound to the database. For example: Name column. Click on one of the hyperlink columns (wangbin) to jump to WebForm2. WebForm2 is the details of (wangbin).
problem:
How can I get the information of this connection when I click the connection, that is, name (wangbin). And how to pass this value to WebForm2 to query the database.
Reply

Use magic Report

0

Threads

7

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-7-9 13:45:01
| Show all posts
HyperLinkColumn hlCol = new HyperLinkColumn();
        hlCol.HeaderText = "Operation";
        hlCol.DataNavigateUrlField = "line_id";
        hlCol.DataNavigateUrlFormatString = "meal_cancel_edit.aspx?action=edit&line_id={0}";
        hlCol.Text = "Modify";
        hlCol.DataTextFormatString = "{0:c}";
        hlCol.Target = "mainFrame";
        DataGrid1.Columns.Add(hlCol);
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-7-10 15:00:02
| Show all posts
Thanks660158. Can be used.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list