0
votes

I have an usercontrol that contains a text box. when user in main window, press F5(when focus to textbox) , my user control show a window(usercontrol) that contains a gridview. that grid contains an id and field Columns. this user control most execute for diffrence Entity models. how can pass any entity model to the user control as attribute?

1
I have some entity models that i want to pass each model to the user control and when user press an special key, usercontrol must be show the grid view of the model list. have can pass varient entity model to user control? - Sepid

1 Answers

0
votes

I think you answered your question within the asked question. Pass the EntityFramework object (or Data Transfer Object if you chose to use one) into the control, modify the data, and as long as the "main" control recognizes that data has changed, you should be good to go. Hope this helped!