0

I've created one user control which have textBox & DatabGridView etc. When any user start typing in textbox then the filter is applied in DatabGridView. Now I want to add following features in this control how can I add these?

  1. I want to use same control for supplier, customer, vendors on a single form, so I've placed it 3 times from toolbar. But for each control I want to fill different data from database. So what will be the best way to bind the control?

  2. As we knew each table (customer,supplier & vendor) can have different columns, so I also need properties to set them. I've added property to my control but how can I ensure user has assign value in it? I.e. if user run the form and X property is not assigned to control then it should show message.

Note: I've tried it on control load event but didn't get any success because control's load event is occurred prior to form load and I'm assigning property on form load.

Please help....

  • Try the answer here... http://stackoverflow.com/questions/7931915/required-property-in-custom-asp-net-control - its in c# but you can use an online converter to get VB. There are other links in that question which may have vb code. – Mych Apr 08 '14 at 12:50
  • http://stackoverflow.com/questions/5276874/asp-net-server-control-property-attribute-must-be-required - This one suggests using the UserControl Init event – Mych Apr 08 '14 at 12:56
  • Yes I've seen that post but the issue is same, user control's load event fire before form's load event and we're setting values on forms load. And at that time UC is loaded already. – Pankaj Joshi Apr 09 '14 at 05:42

0 Answers0