Group:  .NET General / Allgemein ยป microsoft.public.dotnet.framework.windowsforms.databinding

Threads Replies Last Post
39 Pages: 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  >>  
BindingSource sorting base class member throws MissingMemberExcept
Hi, have problem with sorting data shown in a DataGridView. Here is how I do it: BindingSource bindingSource = ...; DataGridView dataGridView = ...; dataGridView.DataSource = bindingSource; IQueryable<Tool> query = GetDataByLinqQuery(); bindingSource.DataSource = query; Sorting Rows in der DataGridView by mouse click on column heades works fine for direct members of class T...
1 12/29/2008 10:30:01 AM
How do I go about it?
Hi. ..NET Framework 2.0 I am using a DataGridView control. I have my custom class, which is Deparment. The custom objects are bounded like this.. List<Department> myDepartmentObjects = .... BindingSource bs = new BindingSource(); bs.DataSource = myDepartmentObjects; this.DataGridView.DataSource = bs; This works fine..However, as you know, the problem is that sort is not su...
2 12/18/2008 5:34:15 PM
question about data binding from Custom Business Objects to DataGridView when null values are involved. Best Practices?
Hi. I'm wondering what's the best way to handle data binding between Custom Business Objects and the DataGridView when some of the values (ints, DateTime, etc.) could be null. One place where you can see this problem is in the Microsoft Example, Walkthrough: Connecting to Data in Objects at: http://msdn.microsoft.com/en-us/library/ms171892.aspx If you build and run this example,...
3 12/16/2008 2:29:05 AM
Data Binding to a password protected Access database?
Hello all, I have been searching on the net for a solution for days and have tried many different ways to no avail..:( Here is my project using VB 2008... I have an MS Access database with a password, a Main form with a BindingNavigator, a Bbindingsource, a DataViewGrid, and a Login form with two textboxes.. I have connected all except the login form. The project works well when I s...
2 12/15/2008 2:28:57 PM
Databinding to treeview in C# (WinForms Visual Studio 2008)
Hi again, Besides having problems with databinding to radio buttons (see previous post), I'm having problems databinding to a trees. I've done some research that indicates you can't databind to a treeview as the data schema is not well defined. However, it seems there are some "custom" ways to do it. Anyone have any pointers to articles, tutorials or samples? In my case I have an XML...
1 12/8/2008 3:28:47 PM
databinding to radio buttons (C# - Visual Studio 2008)
Can someone point me to some resources on databinding to radio buttons? I have in my dataset an integer field that can be 0, 1, or 2. Depending on which number is picked, a different radio button should be pressed. And of course the user should be able to switch radio buttons and have that change propogated back to the dataset. I'm using C# WinForms in Visual Studio 2008. I have successfull...
1 12/8/2008 3:18:46 PM
Microsoft Reports w CSharp
I have a form with a report viewer and a combo box. I'm trying to get the report result to "filter" based on the choice in the combo box. From reading on using data in dot NET, I saw that you could bind a control (like the report viewer) to a BindingSource object, while the object is bound to the dataset. Since the BindingSource object has a filter capability, I chose to change that an...
1 12/6/2008 6:41:00 PM
Combobox SelectedItem doesn't change the underlying datatable
I've derived from Combobox and, on the OnValidating method, I have set this.SelectedItem = null; this.SelectedIndex = -1; if the combobox text is empty. The problem is that the databinding engine is not updating the value of the underlying field in the current row, so when I move the position the value for the field is the same as before. I don't know how I can programmaticaly set t...
1 12/1/2008 3:20:07 PM
Not saving data to physical file
I have code that updates the datatable correctly but it is not writen the physical Access database. I have more or less exactly the same code on another table and it works correctly. I am using a derived Binding source so that I can get the MatchRow directly. I am using the same concept in the other part of the code that is working. myDataSet.MatchRow match = MatchBS.AddNew(); ......
2 11/28/2008 3:53:00 AM
C# - Change connection string at runtime
I am new to the .Net environment. I created a C# app that I want to distribute and stored the ConnectionString in the configuration file. I refer to it using ConfigurationManager whenever I need it. The data source will be different for each user. How can I use code to change the connectionstring at runtime? I am frustrated and desperate for an answer. Thank you for helping! -...
2 11/24/2008 7:07:01 AM
About databinding of datagrid
Dear all : I have some problem about databind, in design mode, I have create datagrid with 4 columns. Menawhile , I have create the datatable with 8 columns If I bind this datatable to datagrid during in RunTime. DataGrid will change from 4 to 8 columns How to avoid it , as I want to fix the column to 4 and don't want amend datatable to fit with datagrid Any idea ? Thanks ...
2 11/24/2008 6:50:05 AM
How does databinding depend on GetHashCode()? - Only updates when nothing has changed?!
Dear all, I could need your help on following issue: I have some dataObject databound to a custom trackBar control. If I edit the dataObject with the control, everything is perfect, all other views on the dataObject get updated etc. If I change the dataObject from my Undo component, all other views get updated as well, but the trackBar control doesn't get notified until the very last undo...
2 11/13/2008 11:31:48 AM
large dataset paging and binding
I have what seems like a fairly common problem -- getting results back from a database in small pages, yet letting the user browse over the large list. I hope someone can point me in the right direction, I have been googling all day with no luck. I am calling a webservice which returns search results. I can send it a query and then ask it to return a range of rows as a dataset. When the...
1 11/6/2008 6:20:35 PM
Data Binding Controls and Record Changes question
Dear All, I am having a bit of a strange problem with some new forms that I am trying to write. I hope some of you have come across this and know of a solutions or methodology to rectify this! I have created a strongly typed dataset. I have then dragged one of the tables (Notice) onto a windows form as detail (Changing category to a combo). I have then dragged the category.name fi...
1 11/2/2008 8:17:01 PM
DataViewManager
I have an app which fills a DataSet with parent and child tables, creates relationship between the two tables, uses a the default DataViewManager to set the default DataView settings, and binds a DataGrid to the DataViewManager. I filter both tables using the DataViewManager to reduce the number of rows viewed. My problem is that I can't figure out how to iterate through only the ch...
1 10/28/2008 10:06:06 PM
wierd problem with tabs
hi everyone: i have been loosing data in my database recently. i have a customer form with about 6 tabs on it. by default, the first tab shows (obviously). im not sure what changed, but i discovered that when i call my save routine, that stuff on the other tabs never gets updated correctly...as a matter of fact, it saves blank info from those other tabs, as if there were nothing in thos...
2 10/24/2008 10:57:03 PM
programmatically reset settings in Settings.settings
I've inherited an app that utilizes TableAdapters ... I don't know much about these beasties but what I know I don't like. Unfortunately, I don't have time right now to re-engineer and get rid of them. The TableAdapters' live in .xsd files and apparently are only meant to be configured via the provided GUIs and properties pages ... The TableAdapters' connection strings live in \Prop...
2 10/14/2008 6:45:01 AM
Custom Class and Form Control Data Binding
How do I bind a textbox from a project to -> another property inside a Custom class on another project? Created a Method on the custom Class. Already added a Reference. Still I can't call the Textbox Control on Form to mycustom Class. '--- Code --- '--- Project Name : FirstProj '- Custom Class Public Class Company Private PKCompanyID As Integer Private CompanyName As S...
1 10/3/2008 4:08:04 AM
Trap Not Nullable Exception
Does anyone know how to trap the exception that is not handled under these conditions? - BindingNavigator is bound to datasource with non-nullable column - Add button is clicked to create new record - a navigation button is clicked before non-nullable field is populated I know how to handle the case where "Add" button is clicked... don't know how to handle "First" and "Previous" button...
1 7/2/2007 6:40:14 AM
Cancel addition of new row
I have a simple Windows form bound to one SQL Server table using the BindingSource control. I would like to use the BindingNavigator control to navigate through records. One text box holds a required field. When I click the AddNew button on the BindingNavigator, a new record is added to the DataTable and all fields are cleared on the form. If I happen to press the AddNew button again and the ...
3 7/2/2007 6:29:56 AM
update data bound listbox - get "System.Data.DataRowView"
Hello, World! Good day to you! I am using VS 2005 and I have a listbox that is data bound to a column in a table on a SQL Express database. When I select the "New" button it calls an openFileDialog. I'd like to put the filename returned from the open file dialog into the listbox and update the dtabase with that information. It all seems to work, except for the problem that the first it...
2 7/2/2007 6:11:42 AM
Bound DataGridViewCheckBoxColumn Doesn't Pass Value
I have a DataGridView (DGV) bound to a BindingSource, which itself is bound to a custom list type that inherits from BindingList<T> (SortableBindingList) to add sorting capability. Within the DGV there is a bound DataGridViewCheckBoxColumn. The column is bound to a "Selected" member within the list encapsulated by the BindingList<T> implementation. The idea is that the CheckBoxCol...
2 6/29/2007 11:49:33 PM
Inserting row into user sorted, data-bound DataGridView
I'm trying to insert a new row at a specific location of a data-bound DataGridView. I understand that you would normally do that by inserting the row into the bound DataTable. The use case is sort of like an accounting situation with a "split" - I am entering donations made by donors, and I want another line in the DGV for a 2nd donation by the same donor. When they click the "Split" b...
13 6/29/2007 1:56:04 PM
bind to elements in a NameValueCollection, hashtable, or Dictionary?
I'd like to create an object that has a field derived from one of the objects in the title such that I can bind simple controls (textboxes, etc) to individual elements of the collection such that: 1. The binding can be done at either runtime or designtime 2. If the entry doesn't exist, the binding succeeds and "returns" a null string 3. If the user edits the control text, the entry is cre...
7 6/27/2007 11:53:19 PM
Displaying data from parent
What is the best method to display columns in a parent table and not using comboboxes? Example: You have an Order entry form and want to display additional columns from the customer table, let say customer name and adress. If you use a combobox and bind the selected value to the order customer id and set the datasource to customer binding source (and corresponding displaymember, valu...
4 6/27/2007 9:34:59 AM
39 Pages: 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  >>  

Home | Search | Terms | Imprint
Newsgroups Reader