| |

VerySource

 Forgot password?
 Register
Search
View: 606|Reply: 1

In the same interface of DataGrid, how to delete the current record? GetItem is not a CDataGrid class function

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-3-12 13:30:01
| Show all posts |Read mode
In the same interface of DataGrid, set a delete button, how to delete the current DataGrid record

With VC6, no other patches were applied.
The idea is to first get the current index of the DataGrid control, use this index to delete records, and update the control.
The following code is incorrect. Please give pointers. Thank you!

CString strID = m_DataGrid.GetItem (0); // Get the index of the selected record
// Prompt GetItem () is not a function of the CDataGrid class, and I did not find this function in the CDataGrid class.
Reply

Use magic Report

0

Threads

55

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 China

Post time: 2020-6-16 17:30:01
| Show all posts
After deleting the corresponding record in the record set, you can rebind it with the DataGrid.
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