winforms

Adding a Combobox in DataGridView through Datatable

I have a DataGridView and I am populating it through a DataTable. On initializing, I add DataColumns to the DataTable and then set the DataSource of the DataGridView to the DataTable. Here is the code: DataTable mTable = new DataTable("Test"); DataColumn col = new DataColumn; col.DataType = System.Type.GetType("System.Boolean"...

C# Winforms bold treeview node doesn't show whole text

I'm using the following code to make my treenodes bold: Font font = new Font(tvQuestionSequence.Font, FontStyle.Bold); foreach (QuestionnaireBuilder_Category cat in categories) { TreeNode node = new TreeNode(); node.Text = cat.Description; node.Name = cat.Id.ToString(); node.NodeFont = font; tvQuestionSequence.No...

Draw Line in TextBox C# (.NET 3.5)

Hi, i need a textbox with a bottom-line such like inputfields used in forms. I had looked for a functionality like single border on bottom, or something like this. But i think the only way is to draw a single line in a textbox. The following code doesn't work: private void textEdit1_Paint(object sender, System.Windows.Forms.PaintEven...

Customise a bound datagridview

Howdy, using vs2008 winforms. I want to be able to use a slightly customised datagridview but cant think of a way to do it. i have 1. a sqldataadaptor fill a dataset 2. a binding source bound to the dataset 3 a datagridview with the bindingsource set as the datasource. I want the binding to allow sync between the dataset and datagridv...

how to go from TreeNode.FullPath data and get the actual treenode?

Hi all, I would like to store some data from TreeNode.FullPath and then later i would like to re-expand everything up to that point. Is there a simple way of doing it? Thanks a lot! ...

c# WinForms ReportViewer Performance issue using RefreshReport() and ServerReport.SetParameters()

Hi All, Currently I am writing a c# client application that uses the WinForms ReportViewer Control to display reports from a remote server. I am having performance troubles with the ReportViewer Control, to be specific with the 2 methods reportViewer.ServerReport.SetParameters() and reportViewer.RefreshReport() – they both take a reall...

How do I get the cursor back in VS2010rc winforms designer after drawing controlls?

Not sure if this is a bug or if i'm just missing something but I cannot for the life of me figure out how to get my cursor back in the winforms designer in visual studio 2010. I opened up an existing project and added a group box, now my cursor is stuck drawing group boxes. I just want the simple pointer cursor back but nothing I do se...

Specifying a default export format for the CrystalReportViewer

Possible Duplicate: How do I make PDF the default export option for a Crystal Report? There appears to have been a change in behaviour between versions of the viewer that have changed the default from PDF to the virtually useless (in our scenario) native Crystal Reports format. Is it possible to specify the default file type ...

Winforms: Multiple columns in a listbox

Is there a way to configure a subclassed listbox to arrange items into multiple columns? http://i50.tinypic.com/2n9vozc.png I've considered using a listview, but it seems overkill for what i'm trying to do. Clarification: I want to put multiple items in the same row, rather than giving each item more than one column. ...

Handling Master and Detail tables on the same winform

I'm having trouble using databinding in a situation where the parent table, and it's 0-many detail table is displayed on the same form. The two tables are: CashReceipts and CashReceiptItems The form is controlled by a BindingNavigator on CashReceipt, and the CashReceiptItems are managed by a DataGridView. What's displayed in the datagr...

Windows Mobile ShowDialog form's title bar is not visible

In my Windows Mobile project, I have a form (let's call it form M to help keep thing straight) that I need to display modally, so I am using the ShowDialog method on a new copy of the form. When I show it from a form (form A) that takes up the whole screen (WindowState Maximized, Location 0,0, all other properties default except for name...

SQL Server CE 3.5 SP1 Stored Procedures

I have been tasked with taking an existing WinForms application and modifying it to work in an "occasionally-connected" mode. This was to be achieved with SQL Server CE 3.5 on a user's laptop and sync the server and client either via SQL Server Merge Replication or utilizing Microsoft's Sync Framework. Currently, the application connec...

Winform vb.net - how to change color of Tab?

How can I change the color of the Tab Page Header, the text that appears on the part of the Tab that is always visible? ...

Tips on setting the window state of a winforms

I have a Winform that opens mdichild forms. When i select those forms, i need to set or render its windowstate to Maximized. Problem is, when i navigate between the open forms, it reverts back to normal windowstate. and when i set the windowstate to maximized again, it shows the transition from normal to maximized state and it doesn't lo...

WinForms Invoke/BeginInvoke

I have a C# win form where I read a file and show lines in a datagridview. Everything works fine.. and I use delegate and Invoke for displaying the lines as they are being read. It also shows a progressbar and does some other stuff like calculating line length and parse the lines to extract certain fields from each line. Just curious, i...

How to create tabbed document environment using winforms?

How to create a tabbed document environment (like Visual Studio 2005/2008) using windows forms? ...

Binding to a list of points that have to be drawn in a winformControl

Hi, I have some hardware with some controls to it. There are some visual controls I want to use in My WPF application. I have a binding Source object and a WPF with A TextBox To make it work I use the TextBox.TextChaned to execute some code that is among othere things painting my lines (from the list of points). XAML <TextBox Text="{...

Combobox with clickable items....

Good day S-O Need help in developing a Custom combobox. I should be able to display items like 10 20 30 Custom... whenever i click Item 'x' i should get a pop up window to enter some value My question is ...Is it a good idea to display an additional windows form with just a textbox control in it or is there any other better approach...

One word bold inside a text in winform control.

I want some way to make a given word bold(the first two characters of each item in a listbox), and nothing else, something like this: 01 car 02 house 03 market As for these three, being items in a listbox control, ALWAYS the first two characters, the rest should not be bold. Is there any practical way for doing so ? Data: Visua...

What is proper way of verifying your C# WinForms code works in Visual Studio 2008?

I'm writing an application in WinForms c# that is over 90k lines big. I am not very experienced coder and after some lines of code (depending if it's something new or something I've done before a lot of times) i start my project with F5 in Visual Studio to verify that the things I've done work as i wanted it to. For example: if data f...