Answer Questions
Tony Sperling How to make Cell value changed along with with other cell value changing in DataGridView same time?
In dataGridView control, how to make cell value changed along with other cell valu changing in the same row In dataGridView control, how to make other control ( editBox.text ) value changed along with special cell value changing in the DataGridView I can make value changed after Enter Key or click other cell of DataGridView. i want to make them value changed same time. Thanks I hope this thread will inspire you a little http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=712954&SiteID=1 Hi, Henry_Yang May be This Thread could give you some hint. Regards. Ye. ...Show All
prujohn How do I update the changes from my DataGridView into my SQL table?
Hi all, having a hard time to understand the relation among Dataset, tables, Dataviews,etc... I am trying to update my SQL table after I do some modifications in my DataviewGrid(or table ). See code below: ... string strConn = "Data Source=(local);user id=sa;password=xxx;Initial Catalog=UpgradeClient;"; da = new SqlDataAdapter("SELECT * FROM STBData", strConn); table = new DataTable("STBData"); da.FillSchema(table, SchemaType.Source); dataGridView1.DataSource = table.DefaultView; da.Fill(table); ... private void btnUpgrade_Click(object sender, EventArgs e) { string strAccountId, strSTBid, strSTBType = ""; Int32 selectedRowCount = dataGridView1.Rows.GetRowCount(DataGridViewEl ...Show All
maheshkg MTAThread and AutoComplete
I need to use the WaitHandle.WaitAll and TextBox.AutoCompleteMode. The problem is that the first requires MTA and the latter STA . Is there any way around this rich Thanks. My concern is not with using the Control.Invoke to talk to the UI. It is with the cost of cross thread marshalling that occurs with the STA objects. If you follow the rules for STA any object created in one apartment must be marshaled for use in another. In my app a large number of objects are created in the main thread and heavily used by worker threads. When complete Control.BeginInvoke is used to update the UI. Does the ThreadPool marshall objects created in STA apartments rich The issue with the S ...Show All
bashman Text field/box
Task: I have a text box with maxlength property set to 0. What I want to accomplish is to determine whether an overfilling of the text box has occured. Example if you enter a text beyond the visual space or width of the textbox. Example: TextBox _txt = new TextBox(); _txt.MaxLength = 0; _txt.Text = "Yandisa Mtyide has been developing in C# for the last 10 months"; _txt.Width = 60; //Basically the text will overfill the text box, so if this occurs I want to notify the user that the textbox has been overfilled Thank you Note that the MaxLength property has no effect on the length of the text when it is assigned through the Text property. It only restricts user input. Is your question answ ...Show All
Jeff Weber doubt regarding panel location at runtime
My UI is like below........................... it has two panels................. one left and one right in right panel there is one tabcontrol, one toolbar,one panel But here my question is for the tab control its name is tabBooks. now in tabBooks there are 4 tab pages . in first tab page there is a panel. in seond tab page there is one more tabcontrol and panel. in third tab page there are 2 tab controls My question here is for second tab page Currently tabcontrol and panel is side by side. I want to put panel below the tabcontrol. I am changing the location of panel at runtime. but it's not changing............ Can anybody please tell me what may be the reason for that. I have tried ...Show All
Thibaud After form resizing problems with anchored controls
On form were put some controls which were anchored to form. After resizing the form (not first resizing, happens not always, after some time) controls that were anchored to all 4 borders shrink in size to (Width=0; Height=0;) while other loose their position (coordinates became negative). Everything is done in designer view and this happens only in release. Any suggestions this is in vs 2005. I suspected it is anchoring problem. Any ways to avoid this problem Put min size on every control, maybe this will help, but not sure. AlexMil wrote: On form were put some controls which were anchored to form. After resizing the form (not first resizing, happens not a ...Show All
Michael Barrett Exiting from a UserControl Prematurely
I have a UserControl that contains several textboxes. Under certain conditions I need to exit the Control (ie move to the next control on the parent form after the User Control) from a text box that is not the last one in tab order on the control. In the Validation Event of the text box I have tried changing focus to the last textbox in the control and executing Me.ProcessTabKey(True). The focus remains with the last text box. I have tried Me.ProcessDialogKey(Keys.Tab), but that seems to go off into loop. I could throw an event, but that would require that the parent form always process it. What is the secret of exiting the UserControl programatically either forward or backward Any help would be appreciated. ...Show All
Valery Zharkov Winforms+JavaScript
Quick question for the group. I'm embedding a winforms user control into a web page. This web page is going to be launched from another page in a Modal sense. Once the user is done with the pop-up control webpage I would like the page to close automatically when the finish button is pushed. Is there a way to communicate between the html and the winforms control using javascript so that I don't have to have a two button scenario where the user pushes finish then pushes Ok outside of the control Any help would be appreciated. Ok, finally got this working as well. In my previous post, I mentioned a msdn article relating to this issue. There are a few lines of COM code that need to be added to the ones alr ...Show All
manqueInspiration windows forms 2.0> when close button on title bar is clicked
windows forms 2.0> when close button on title bar is clicked, it should display message box for confirmation if yes, window should be closed set the MaximizeBox to false in the properties of the form or by code thank u, but one more similar problem my form , by default , loads in maximized window state so it is shows restore button on the title bar, I want to disable that restore button i will be very thankful if u help me In form's FormClosing event, display a message box (showing buttons Yes and No), asking user if she really wants to close the form. If message box returns DialogResult.No, set e.Cancel to true. Andrej sorry, is t ...Show All
mohasad Adding Components to Windows Forms
anyone have any links on how i would add a component control to my windows form I created a component and now i want it to be inside my panel on my windows form but I cant find much info on the net to help me out though.... to add a control, you need to add it to the control container. Example if I create a control at runtime and want it on the form, I add it to the Controls collection: this.Controls.Add( myControl ); then I need to set the location of where I want to show that control on the form using the control's location property. So in your panel, try this: this.thePanel.Controls.Add( myControl ); does this work When i do it like stated in the previous post i get the world famous exception "Obj ...Show All
SolveIt Implement the ComboBox of the Properties Windows when hosting forms in run-time.
I'm implementing a designer form. I've a PropertyGrid that work fine, but i want to show all the controls in the hosted form in a combobox just like de Properties Windows of the VS2005 ide. I've got several problems doing this. I'm reusing the classes of the DesignerHost sample of MSDN. Could anyone helps me on this Thank you. Duplicate post (http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=860068&SiteID=1) ...Show All
FrankyLi Extend control functionality without subclass
Hi, How to write a behavour class that able to extend functionality of winforms control without subclass I hope to let my developer to drop an instance of my class on tray, set the control and event to listen using property sheet. In my class constructor, it will bind listen to specified control's event and respond accordingly. Any ideas and sample code Thank you Hi, As per your need, its really good to have a derived class from winform controls. If you really dont want that, then you can create a UserControl and do whatever you want with it. OR, Create a class, instantiate a panel/form in it as per your need and add appropriate required functions to manipulate your needs - events, propert ...Show All
sbayeta How to Stop Hiding Menu Items?
Hi, I have a scenario wherein i need to add couple of menu items to the menu when a existing menu item is clicked.I could able to add the menu items,but the problem is the menu closes or hides because of the click event.But i dont want this to happen and i want the menu items to be visbile. Is there anything i could do to stop menu items being closed or hidden on menu item click Thanks, Suresh. You can also add a single item to your menu-item to make it a sub-menu. Then rebump the list once the menu_item dropdown event is fired. No Andrej.I need to use Click Event or any sort of it like MouseDown. And one more thing,If items(B & C) are visible then i wan ...Show All
Jakein2006 Session Time-out For Windows Application
Hi All, First thanks for taking the time to view my question. Here is the problem. I have a client that I am building a windows based (client server) application for in VS 2005. Similar to a web application, the client would like the Windows app to time-out after a predetermined amount of time. They are requesting this for security puporses (so if someone leaves their machine on the system will log them out after x minutes of inactivity). Any help would be appreciated. p.s. I suggested the simplist measure would be to put screen savers with pass-word protect on but they did not buy-in to that idea. Thanks, Stat Well you could place a timer and set the timer to kick in after a period ...Show All
enric vives Two way databinding doesn't work?
Hi guys I have a class which has a Dob (date of birth) property with validation rule (If user select a date early than 1920/01/01, reset the value to 1920/01/01. If user select a date later than .... ) inside it. Then I bind it to a Windows.Forms.DateTimePicker control and found out that the validation rule works but the new value won't be displayed on the DateTimePicker control until I manually call Form.validatechildren or Bindsourse.ResetItem method in Validated event of the DateTimePicker control. What do you guys think By the way, Yes, I do have INotifyPropertyChanged interface in the class and it works very well except the above problem. And also I know I can use the MaxDate/MinDate properties of DateTimePicker control in ...Show All
