I have one window and a few contol user.
I want the control user open from control user (and not from the main window).
How can I do It?
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Mayur GujrathiRank #666 · 3.6K reputationPosted Apr 4, 2011, 1:03 AM EDT
and do like this
suppose there is one control named ctrl1 and you need to call ctrrl2
then
ctrl2 obj=new ctrl2
ctrl1.hide(); or ctrl1.close();//hide or closes previous control
panel1.controls.add(obj);//adds control to your panel control
if it worked then mark as accepted answer
naama6 reputationPosted Apr 4, 2011, 1:20 AM EDT
like this:
ucgril : ucMan: UserControl - Window.
so I havn't use directly at UserControl (I havn't close, hide function).
more Question:
How am I get specific cell from dataGrid (when I look for property of dataGrid I havn't access to Rows).
Mayur GujrathiRank #666 · 3.6K reputationPosted Apr 4, 2011, 1:32 AM EDT
2)
GridViewRow objRow = (GridViewRow)((TextBox)Sender).Parent; //this should get you the GridViewRow
Mayur GujrathiRank #666 · 3.6K reputationPosted Apr 4, 2011, 1:33 AM EDT
2)
GridViewRow objRow = (GridViewRow)((TextBox)Sender).Parent; //this should get you the GridViewRow
for your first problem please tell your problem in simple words, the mentioned is not understood and what do you mean by "control user"
Mayur GujrathiRank #666 · 3.6K reputationPosted Apr 4, 2011, 1:40 AM EDT
naama6 reputationPosted Apr 4, 2011, 2:11 AM EDT
1. I havn't (TextBox)row otion
2. I havn't GridViewRow option only GridViewRowPresenter
3. yes, I mean to user controls
Mayur GujrathiRank #666 · 3.6K reputationPosted Apr 4, 2011, 2:34 AM EDT
i have created a small application to fulfil your needs
i have added reference of windowsformscontrollibrary1 to windowsformapplication1
do it first
Mayur GujrathiRank #666 · 3.6K reputationPosted Apr 4, 2011, 3:23 AM EDT
for your second problem refer this link
http://www.google.co.in/url?sa=t&source=web&cd=9&ved=0CGAQFjAI&url=http%3A%2F%2Fwordbeater.com%2Fgridview-checkbox.html&rct=j&q=how%20to%20get%20checkboxes%20in%20header%20of%20gridview%20of%20c%23.net%203.5&ei=_aiZTca_GcLTrQfTtPn7Cw&usg=AFQjCNHk-InTGaDjHEuc4MD9B8xL_GQxxA&cad=rja