I am changing DataGridView cell values programmatically, but values are not pushed to bound datasource. They are pushed only for cells belonging to selected row. How can I ask the DataGridView to push rows values into datasource?
EDIT:
This code seems to do the trick, but may be some better solution?
grid.CurrentCell = cell;
cell.Valu...
As described here, I'm writing a WinForms GUI that is run in an ASP.Net AppDomain.
However, whenever Web.config or the bin folder is modified, ASP.Net unloads the AppDomain, and the entire program dies.
Is there any way to prevent this?
2nd EDIT: In my EXE, I create the AppDomain by calling ApplicationHost.CreateApplicationHost and pa...
Hello,
I am creating a custom combobox which can draw separators. So, I override OnDrawItem() and OnMeasureItem() methods.
The problem is that OnMeasureItem() is called only once when datasource is changed. So if I want to specify a separator item later I need to remeasure it's height (because items with separator should be taller), but ...
The following code attempts to delete a selected row from a datagridview and update the database.
But it's not updating the database...it's just issuing the error, "CommandText Property has not been initialized." ...any ideas? I assume it's because it's not being bound in the beginning, but at this point I'm clueless and my head is sore...
I have one function GetControlRectangle(Rectangle MethodRect) that accepts the rectangle of the control.
Now I write the code like Rectangle rct=dataGridView1.GetCellDisplayRectangle(1,0,false); which finds the location of the cell(1,0) of the datagridview1.
And I pass this rct to the method GetControlRectangle.
Now how to find throu...
We have a winform MDI application, there's quite a lot of forms/dialogs. Some are laid out
with absolute location and sizes, some are laid out using table/flow panels.
Overall appearance looked good under different screen resolutions. Until someone tested it on a machine where the DPI was set to 120. While mostly things looked good, som...
I have one dll of usercontrol and I add to it to the references in my project. And now I want to access this usercontrol from toolbox but it does not appear in the toolbox. And I can access them by writing code, but I want it in toolbox and want to use by just dragging it to the form.
...
I am using vb.net 2005. I want one clarification for datagridview.
I use the following property to set the alignment of header text:
DataGridView1.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomCenter
This property applies to all header cells. I only want to change one headers alignment property.
How ca...
How can I save multipage WinForm to PDF & how can I print it?
thanks,
Ofir
...
Hello everyone,
i am working on a windows forms .net 3.5 project in c# and the project uses the following line to get the current user:
Created_By = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
On one box the result is hostname\username but on my box the result is username\hostname. Both boxes run Windows 7 Ultimate. ...
I have a BackgroundWorker object that I instantiated to perform a DB process on a background thread ansynchronously. I have event handlers for DoWork and RunWorkerCompleted.
I can tell that the BackgroundWorker is disposing of itself because I added a message box into the Disposed event handler.
My question is this:
Is it necessary t...
We've got a Model-View-Presenter setup with our .NET Compact Framework app. A standard CF Form is implementing the view interface, and passed into the constructor of the presenter. the presenter tells the form to show itself by calling view.Run(); the view then does a Show() on itself, and the presenter takes over again, loading up data ...
I have a .NET 2.0 application that runs on Compact Framework. It has a bunch of different forms that were all originally designed to run on a specific device with a specific screen resolution. I'm now looking to get this application to run on some other devices that have very different screen resolutions (some have completely opposite ...
Hello.
I have a panel in witch I represent a timeline - 24 hours(24 x 60 min = 1 440 min).
I need to set my scroll bar's step to a minute. It's evident that minimum size of such a panel should be 1440 pixels.
Let's say the screen resolution on the client screen (width) is 1280, so say panel container max size is 1280.
Now, if I want...
Hey Guys, I've searched around for this question but couldn't come up with anything.
The Problem:
If a user changes the Color Scheme on their Windows Desktop, it tweaks some functionality in my .net application.
Is there any way for me to FORCE my application to use the Windows Classic Theme, regardless of what the user's theme has be...
I made a splash screen and want to have some text change on it as different parts of the program are loaded but the screen isnt updating when i use refresh or update.
Dim splash As New BMSSplash
splash.Show()
splash.lblStatus.Text = "Retrieving active users..."
splash.Refresh()
buddyList.setuserList()
System.Th...
This question is close to what I'm interested in, but not quite.
I have a .NET WinForms application written in C#. I have a ListView control which displays an array of C# objects. I've hooked it up so that you can drag/drop these listview items to a different form in the same application, and it properly passes the array of objects (typ...
Using Winforms, is there a way to allow resize, but only to allow the window to be made taller? The ability to make it wider not only wouldn't be allow, but would also be pleasing to the user.
Additionally, the ability to set a minimum height, and also be pleasing to the user?
...
Hi,
Basic winforms question I think. If I have a dialog where I'm collecting infomation, including some fields which will change depending upon the input of other fields, would it be normal/best practice to create an class/object to hold the various data, and then bind individual controls (e.g. text box, checkbox) to this object? i.e....
I have a tab control and 3 tabpages in it. ( C#)
if i am in tab 2, and edit a text box value
and then click tab 3, i need to validate what was enetered in the text box.
if correct i should allow to to switch to tab 3 else should remain in tab 2 it self
how do i achieve this?
iam curently handling the "leave" event of the tabpage2,
...