| |

VerySource

 Forgot password?
 Register
Search
View: 676|Reply: 6

DataGrid control, add a template example problem !!

[Copy link]

1

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-3-4 20:00:01
| Show all posts |Read mode
I added a CheckBox control to the DataGrid and made a check operation on the CheckBox control, but I also want to continue doing this operation. I want to ask you how to honor the previous options?
Reply

Use magic Report

0

Threads

58

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 Korea, Republic of

Post time: 2020-5-18 13:00:01
| Show all posts
Don't understand what it means
Reply

Use magic Report

1

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-5-18 19:30:01
| Show all posts
Is in the DataGrid control, add a check box, I want to clear the contents of the check box
Reply

Use magic Report

0

Threads

14

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-5-19 13:15:01
| Show all posts
Remove all selected items
for (int i = 0; i <DataGrid1.Items.Count; i ++)
{
CheckBox chkTemp = (CheckBox) DataGrid1.Items [i] .FindControl ("CheckBoxID");
chkTemp.Checked = false;
}
Reply

Use magic Report

1

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-5-19 22:15:01
| Show all posts
Is it written in ItemCommand ()?
Reply

Use magic Report

1

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-5-24 11:00:02
| Show all posts
For example: you have select all, not select two buttons at all.

Put

for (int i = 0; i <DataGrid1.Items.Count; i ++)
{
CheckBox chkTemp = (CheckBox) DataGrid1.Items [i] .FindControl ("CheckBoxID");
chkTemp.Checked = false;
}

Written in the "no selection" event.
Reply

Use magic Report

1

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-5-24 11:45:01
| Show all posts
Double-click "Unselect All"
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