Recent update: 2008-3-21
I have a problem databinding my child DataGridView to my master DataGridView. When I simply add two DataGridView's then its no problem, I can select a record on the master table and get the child records in the other DataGridView.But now I like to have my child DataGridView in another control, ...
953 byte By
yaakov at 2008-3-6
Hi everybody.I have a form which contains a user control.When the form loads, I'm populating some DataSet, and assigning the dataset refernece to one of the control properties.The control contains other control that are bound to various paths on that dataset, adding new rows, modifying, ...
Hello. I am a beginner. I am using Visual studio 2005 (B2) to create a user interface that contains a list box, data navigator and several text boxes that are bound to two relational tables (Investors and ContactDetail). Investor ID is the primary key in the Investors table and has a type of ...
I've had a search through the forum for an answer to this, or a similar question, as well as MSDN, but no luck, so am creating a new post.I have created asp.net forms in vs2005 using object data sources, and was pretty impressed how flexible they were, and you had the ability to map operations ...
Using VS 2005 Beta 2, VB, SQL Server 2000I have an existing SQL table with a field 'Comments' of SQL datatype 'text'. The data stored in the field was created using the RichTextBox under VB6.I use a Data Source/Data Set and set the Comments field to RichTextBox. When I drag the control onto ...
When I try to clear controls and DataviewGrid from a panel which has bound data, it takes several seconds to do it, when I have this lineGridHandle.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCellsIf Comment this line then it clears fast. If comment the above line then it clears ...
I have been trying to get the following Windows Forms binding working, without success.The following Code, successfully populates the GridControl, and both combo boxes with data. The two comboBoxes represent: SalesOrderType, and SalesOrderStatus. There six SalesOrderTypes, and five ...
449 byte By
Rick at 2008-2-27
I have a windows form with a datagridview. The first column is a bound column of type DataGridViewButtonColumn. the button shows the value of the column as its text. Everything works as intended. The problem is that a tooltip is displayed when hovering over the button showing the same text that appe...
I am currently writing a Windows Forms Application using Beta 2 in C#.I will be using data binding.I understand that the .net framework 1.1 has a memory leak http://support.microsoft.com/default.aspx?scid=kb;en-us;813137Has this memory leak been resolved in the new 2.0 Framework?ThanksRussell ...
Using VS 2005 beta 2. I did a drag and drop of a data source table that points to an existing SQL Server 2000 table. I want to use a chekbox with a few fields. They are defined as smallint and have nulls, 0, and 1 in the exisitng data. The chekboxs show up OK on the form in IDE but at runtime ...
I was using a datagrid binding it with a web service object, i was just wondering whether it is better to bind a grid with the webservice object directly or using certain datasets to bind the datagrid to the webservice object.
I was working thru an excellant example by Robert Green of Microsoft entitled Walkthrough: Smart Client Data in Visual Basic 2005. This was for Visual Studio 2005 beta 1. Using beta 2 there seems to be a significant change. When I worked thru this example the DataConnector object has been ...
I have a Windows form that was created by dropping a data source. One field was set to create a checkbox control. The SQL field is SmallInt with 0's and 1's. If I run the form and click on the checkbox the program hangs. I can stop the program from the IDE. 1) This appears to be a bug 2) Is ...
I have tried to bind som data to at windows form from sqlserver 2000 in th new visual studio 2005 beta. It works ok but when I try to change the data a window displays saying unhandeld exception has occurred...Update requires a valid updatecommand when passed DataRow collection with modified ...
In the project I am working on I did some databinding on custom objects and on application settings. Because I want to separate the domain model from the view, the custom objects are in the model and the databinding is happening in the view. The domain model has also defined some application ...
996 byte By
GarthK at 2008-2-20
I need to populate a C# Combobox with potentially several thousand items. I know this is not recommended but this is after horiz data splitting so it's the best I can do. In VS2003, I tried binding to a dataset but this was way too slow so I started loading the Itemlist from a datareader and ...
Hello, I have noticed if I use a custom struct instead of a class as a data source for a binding source I cannot get the changes back ( if I write (CustomStruct)customStructBindingSource.DataSource I'm getting a struct with no changed values ).I presume this is because for structs, asignment ...
Hi, Are there any scenarios that describe how to bind a DataGridView to your own Objects? I've been to this useful website and there are no examples for this scenario: http://msdn2.microsoft.com/library/k39d6s23(en-us,vs.80).aspx) I have a class that represents my data record - say it's a ...
270 byte By
Gravy at 2008-2-19
Hi, I have a DataGridView bound to a bindingSource, it also contains an unbound calculated column. I have found that sorting isn't supported on the unbound column. Is there a way I can perform my own sorting for this particular column? Thanks for your help Graham
880 byte By
TAS at 2008-2-18
I designed a user control that can be described as an enhanced combobox. It has more than just a dropdown button right besides the text field and offers much more functionalty. Because deriving from a combobox isn't very flexible it's derived from a user control and contains a textbox and ...
916 byte By
Gravy at 2008-2-17
Hi,I'm binding to a set of data using the BindingSource control and a DataGridView. In the data I have various that contain enum values the need looking up for there text descriptions.What I descided to do was to create an unbound column and respond to the CellFormatting event on the DGV; in ...
618 byte By
Brady at 2008-2-17
I have a DocumentTable and DocumentLineTable in a DataSet. They are linked by a FK relation on DocumentID, the primary key of the DocumentTable. I have a TexBox for DocumentDesc, bound to a docTableBindingSource, and a DataGridView bound to a docLineBindingSource. This docLineBindingSource has docTa...
2050 byte By
Paulvo at 2008-2-16
Hello, I developed a small win forms application in VS 2005 Beta 1 (which runs perfectly) and recently converted it to Beta 2 and I am seeing strange behavior with formatting of a dataGridView.I'm trying to find out if this is a bug or not.After programmatically adding a datatable to the ...
Hello All,I'm using .NET Visual Studio 2003 C# and SQL 2000.I have strange problem using SqlDataReader.I'm using SqlDataReader in for cycle (from 0 to 99 in example bellow) to get data from SQL 2000 database in transaction. The SQL command executes reader on a Stored Procedure (which is ...
1062 byte By
TAS at 2008-2-15
I have a combobox (dropdown) that contains something that was loaded from a database. The selectedvalue of the combobox is bound to a typed dataset. The database's column that is displayed by the combobox allows null values. If I select the combobox text and delete it I'm not able to leave ...
I have to do databinding to a custom object. This custom object has an int property which must be databinded to a textbox with a special format (it's for chess squares, so 0 means "a1", 1 means "a2" , ... , 63 means "h8"). And the databinding must be two-way (editing the textbox will update ...
Hi All,I have a combobox and a text box. They are both databound to different fields of a datatable. The combobox contains a list of telephone number descriptions eg. Home, Mobile, Work. When an item is selected the appropriate number is displayed in the text box.When I call AddNew the textbox ...
348 byte By
Gravy at 2008-2-15
Hi,A real quick question...I'm using a DataGridView to show a list of record from a business collection. I want full row select (like a listview) and I want a double click to open the selected item. Am I best responding to the CellDoubleClick event the checking to make sure the user didn't ...
Bug or not? we wanted to show different properties of objects of a BindingList in a DataGridView. Some of the properties had to change their values depending on the values of other properties. Therefore we introduced a new BindingList with an event handler 'ChildObjectChanged', that is raised ...
HiI have a datagridview that is databound to a table via a bindingsource and a DataGridViewComboBox column that is bound to a second table (both in the same dataset). I am dynamically adding the column to the grid. Dim viewcol As New DataGridViewComboBoxColumnviewcol.DataSource = ...
Facing a problem and not sure it can be solve or not. And my english is a bit weak, hope you still able to understand what i am trying to tell.In my program there are 2 main portion, left part is a treeview, right part is a datagridview. I want to implement drag and drop from datagridview's ...
1269 byte By
eddwo at 2008-2-13
I'd like to create an application, part of which involves the customer creating XML documents compliant with a government standard schema. Much of the data will be filled in automatically, but parts will be manually entered by the customer.For the customer data, I want to create a few simple ...
Hi All,Ref: VS 2003I have a two datetimepickers which show the arrival and departure date. I also have two navigation buttons to go through the different arrival and departure dates in the dataset. There is also a lable that show the current position of the total number of dates. That all works ...
Hi,if have a DataSet (SQLExpress) whith 2 Tables.On one table I add a RowChanging event handler.When I add a record in a boud datagridview then an exception occures in the handler. (After changing the postion in the DGV the event is fired).Here my handler:void PCs_RowChanging(object sender, ...
Hi, Im a engineer really suffering and would beg for some kind of help on a log shipping issue. Im getting the following error msg when doing log shipping: Microsoft SQL-DMO (ODBC SQLState:42000) Error 14261: The specified @name ('Log Shipping copy for NIMMAIN.vanxdb_logshipping') already ...
Hi,is there a simple way to display a different text on a bool-bound text.Assume I have an app with a label showing some bool value from an SQL-Table.This shows True or False - what I want is to show (for an example) Yes / No, or 1 / 0 on "Out off office" / "In the office".Another "problem" is ...
Hi,is there a simple way to display a different text on a bool-bound text.Assume I have an app with a label showing some bool value from an SQL-Table.This shows True or False - what I want is to show (for an example) Yes / No, or 1 / 0 on "Out off office" / "In the office".Another "problem" is ...
393 byte By
Zaph0d at 2008-2-8
I have a generic dictionary of my custom class and want to use it as a listbox datasource. Is this possible?Actually, I don't really have to use it as a datasource if this is not possible. My custom class is an item in a listbox and combobox. If I change the description property in my class, ...
5218 byte By
Ed_G at 2008-2-7
Hi all,I've got a problem trying to bind on SelectedValue of a ComboBox - if a value of the field in the DataRow is DBNull the ComboBox show empty. But I want it to show a 'no selection'-Item that I added to the DataTable especially for that.I've tried to do it adding ConvertEventHandler on ...
Hi, Why there is no databindings for ToolStripStatusLabel? I need to add a databinding to it, like a regular label allows databinding for its text. I know StatusStrip can be databinded, but I cannot use this solution (I need a StatusStrip with 3 labels, each of them databinded to different ...
Hi,I know that databinding has largely improved in vs2005.However I cannot seem to put together a databindingListview.Could somebody help me with an example how to do it.thanks a ...
209 byte By
frgu at 2008-2-7
How can it be achieved to display one record from a datatable into two rows in a datagridview. I've seen this example in the MSDN Windows Forms on Tour, where the outlook userinterface was rebuilt in .NET.
372 byte By
Vasu at 2008-2-6
Hi friends! I am developing one project in windows application using c#.In that project i have two datagrid.One datagrid have values from database.Anotherone is empty in the same page.If i am selecting one vrow in first datagrid means it comes to second datagrid one one by one.How can i do it?I will...
1112 byte By
frgu at 2008-2-6
When using combobox columns in a datagridview, I've encountered the following problems:1. I'm working with a datagridview which contains a databound combobox. The edit mode of the cells = EditOnEnter. When I select a comboboxcell for which no value has been selected yet, and I try to sort the ...
Hi All, I have the following line of code on a form of mine: Me.BindingContext(dsBookings, "Bookings.BookingDates").EndCurrentEdit() Me.BindingContext(dsBookings, "Bookings.BookingDates").AddNew() Now the result of the following is correct: Me.BindingContext(dsBookings, ...
1283 byte By
guest at 2008-2-6
Hello,I have a series of comboboxes collected in a user control that are populated by a datatable. Essentially it's a stripped down query editor, so the first combobox is the available fields. Then when the field is selected, the next combobox should list available operators for the field, and t...
756 byte By
Zaph0d at 2008-2-5
I have a combobox manually filled with a couple of items. I want to bind the combo to a dataset to store the value selected. As there is no datasource for the combo and no valuemember set, I am binding to the text property rather than the selectedvalue. Is this right?Whilst this works fine when ...
Hi All, Hope someone can help me out. I have a winform with user details (textboxes, combos etc). I bind the textboxes to a dataset containing contact data. The combos are set to a reference dataset as the data source and bound to the contacts dataset. Like this… ...
670 byte By
Zaph0d at 2008-2-4
I want to give the user the functionality of the autocomplete, allowing them to enter one or more letters and receive a list of possible entries, whilst also ensuring that the user can only select an item from the list and not type any old thing. I know that I cannot use the dropdownlist list ...
3003 byte By
dida at 2008-2-4
I made a TableAdapter and use ObjectSource to bind it to GridView, when I insert new rows it works OK, but when I try to Update or Delete it gives me this error: ObjectDataSource 'RegionObject' could not find a non-generic method 'Update' that has parameters: RegionDescription, ...