Is there anyone who knows this?
I have been trying this for the last week, and no luck.
Now I can see that once can bind successfully to a Button's Text property, but not its ImageKey property:
myButton.Text = "new text"; // really changes the bound data
myButton.ImageKey = "new text"; // does NOT change the bound data
I use:
myBut...
Hi there,
I was wondering if it is possible to remember the order in which rows are selected. I currently have a DataGridView which is bound to a collection of items. It appears that the OnRowStateChanged fires incorrectly during the process of selecting rows using the keyboard.
Any ideas?
Edit
I am using SelectionMode.FullRowSele...
In my form, I have 8 textboxes. All of these need to be filled in, and I wanted to check if they are filled in before going to run the rest of the code.
The only way I've done it thus far is 8 nested IF statements, and this looks unorganised and seems like a horrible way to do it.
Can someone tell me a better way to do this? If there i...
I'm using c#2.0 and WinForms.
I have a datagridview control, unbound, loading small amounts of data which include a "Status" relating to a customer.
Now statuses are set up by the user and assigned a sequence number. I would like to display the name of the status in a column on the grid (straight forward enough) but have the customer d...
I have a winform with a datefield. When a user selects a date and submits, a reportviewer on the page takes the date as a parameter through the tableadapter and shows the report.
What I need is a way to print the user selected date on the report.
Can someone show me how to pass a value from the winform to the rdlc file and make it pri...
Adding contents to listview is a simple proceess like
ListViewItem item = new ListViewItem();
listView1.Items.Add(item);
item.Text = "fdfdfd";
item.SubItems.Add("melp");
item.SubItems.Add("asfd");
Can any one tell me what exactly going on here though here also contents are added and d...
Hi all,
I'm working on a winforms project and I have a combobox implemented inside a menu strip on the MDI parent form.
I'm trying to bind that combobox to a data table (LINQTOSQL) and filter it.
My code is the following :
BindingSource bs = new BindingSource();
bs.DataSource = dataContext.UserRoleInProjects;
bs.Filter = "userID = '" ...
I have a column which is of integer.
when i edit this cell,i need to enter only numbers but not characters.
Am not using datagridviewTextboxColumn.It is a cell.
It should not allow typing characters just like a textbox_keyPress event where we give Char.IsDigit to restrict characters.
How do i do this in C# ?
Thank you
...
I'm drawing images on panel controls. Changing zoom factor changes the size of panel control (which should stretch the image accordingly). With zoom factors greater then 1 (ie, 2,4,8) a small part of panel begins to show (testing shows that it is the background color of the panel) and grows along with the zoom factor.
Panel control bor...
I'm using VS2008's designer for doing this.
For example if I've a windows form of size say 500x500 and I added a DataGridView to it (490x490).
when I run this program. and maximize the form, the DataGridView still remains of the same size. rest of the additional space is blank on the form. I want DataGridView to also take the entire w...
We've been using the MVP pattern and Winforms with a fair amount of success. However, a question always pops-up about MVP:
What is a good granularity for presenters?
What I mean by that is: With Winforms, a fine-granularity usually works quite well for user controls. That way, it's easy to reuse user controls and use them as building b...
I'm creating an application with a help system based on XML. I need to
know how to populate TreeView and ListView controls with XML data
(specification below).
TreeView: <root> and <topic> tags.
ListView: <document> tag (with group and icon dependent on if it's a
web link or local file link, but I can do it).
Can somebody help?
...
I have a RichTextBox in a WinForm with URL:s.
They can be clicked, but I want to detect if the user right clicked them.
...
I have a WinForms ComboBox control at the top of my form. Different ElementHost controls are shown based on what is displayed in the ComboBox.
The problem occurs when I try to tab into the first WPF CheckBox on the ElementHost. The CheckBox gets focus but does not have any focus retangle because WPF doesn't know that the keyboard was th...
Hi
I Develop a Form Designer, also develop some custom control that inherit from standard control like button.
Also, i have some property that related, for example user must select department first, and then select person. and after user select person, I set Text of my custom control (that inherit from button in this case). Note: use...
We're using the Windows Forms "Page Setup" dialog to allow the user to select a page size prior to print preview. On XP, the dialog displays a "Printer..." button which allows the user to select a printer and select from a list of page sizes supported by only that printer. On Vista, the very same code displays the dialog without any butt...
If I turn off automatic updating of a binding data source by setting DataSourceUpdateMode = Never and then use a button to update the whole lot (using binding.WriteValue), a problem occurs - Namely, only the first bound control's data source is updated. All other controls are reset back to the original values.
This is because when the c...
Can we accomplish on Winforms both Tunneling and Bubbling? Maybe by using some API Message Interception? Any article about that?
...
This is for a winform vb.net 2008 app. I'm bringing data back from a database and based on some static conditions... i want to change the color of the background and the text. There is no rowdatabound event in winform...
hope someone can provide some guidance
thanks
shannon
...
I have a background task that imports files into a database. I want the user to see what is currently happening (collecting files/ importing files), which file is currently processed and how far the task has progressed. How can I do this in an easy way? The interaction between Model and Controller is so close, that I could almost put the...