| |

VerySource

 Forgot password?
 Register
Search
View: 697|Reply: 4

A problem with DataGrid, how to change the last row of DateGrid to other content without changing the style

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-21 13:20:01
| Show all posts |Read mode
example:
id user pwd operation
1 a a modification (update, cancel)

2 b b modify (update, cancel)

.........

n + 1 TextBox1 TextBox2 added
(The last line n + 1 is a whole with the entire DataGrid. Add users)
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-30 20:36:02
| Show all posts
Seek expert puzzles How to complete the addition of n + 1 rows?
Reply

Use magic Report

0

Threads

17

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-1-31 19:18:01
| Show all posts
In the DataGrid's ItemDataBound event, first determine if it is the last row, and if so, replace the contents:
e.Row.Cells [0] .Text = n;
e.Row.Cells [1] .Text = '<asp: TextBox ID = "TextBox1" runat = "server" />';
e.Row.Cells [2] .Text = '<asp: TextBox ID = "TextBox2" runat = "server" />';
.........
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-1 09:18:01
| Show all posts
ItemDataBound event can be replaced
Reply

Use magic Report

0

Threads

43

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 China

Post time: 2020-2-1 16:18:01
| Show all posts
Add one line to the dataset
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