Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Browsing all 2535 articles
Browse latest View live

How do I add a DataTable to a ListView?

How do I add a DataTable to a ListView?Consider this code: public partial class Form1 : Form { public Form1() { InitializeComponent(); addData(); } public void addData() { DataTable dt = new...

View Article


Can't write to specific cells in table?! C#

StartAdapter.Fill(dt.Rows[LoopCount]["FirstDay"]);EndAdapter.Fill(dt.Rows[LoopCount]["LastDay"]);ReasonAdapter.Fill(dt.Rows[LoopCount]["Reason"]);Why doesnt this work?!

View Article


DataView Sort Order

I'd like to use the DataView Sort property to sort on a string field (i.e. "MyField ASC"), but want a different result than it's giving.  In particular, the strings look like "Text n" where n ranges...

View Article

Insert Int/DateTime Format into a specific cell of DataTable (Difference...

                So I'm trying to Getthe difference between 2 dates as an Int and add the int to thedatatable,  I'm pretty sure the error is in the final line, since instead of executing this line, the...

View Article

How to use xml database in winforms ?

Hi all,          I am making an  Document Upload and  search windows form application , where i want to upload scanned documents by name and category but i  want to use xml database for this because i...

View Article


Export from datagridview to *.txt file only first 20 cell's letters

I'm using this code to export from datagridview to *.txt fileTextWriter sw =newStreamWriter(@"C:\fiscal.txt");int rowcount = dataGridView1.Rows.Count;for(int i =0; i < rowcount -1; i++){...

View Article

Image may be NSFW.
Clik here to view.

FirebirdSql.Data.FirebirdClient.dll 4.10.0.0 crashing forms

I have a VB.NET solution on .Net 4.5 with 6 projects. I am using VS2013 Professional. 3 of the projects rely on Firebird SQL database. After updating my Firebird client from 4.6.1.0 to 4.10.0.0 I...

View Article

Image Retrieving from sql to data gridview

Assalamu Alaikum Please tell me how to retrieve image from sql database in to Datagridview in C# winform.i have tried many time but  i m failed .please help me in this regard

View Article


Memory leak in DataGridView with binding datasource.

I used the Microsoft DataGridView inside the tabcontrol. And assign the binding data source to DataGridView. When I run the sample,the CPU memory takes maximum of 9% alone.But after making any changes...

View Article


Memory leak in BindingSource when using in windows form

I declared the BindingSource inside the form designer, when I run the form without any other controls the CPU memory is more than normal one. For example, if I run the form without declaring the...

View Article

DataGridViewComboBoxColumn shows value and combo control separately

The DataGridViewComboBoxColumn works fine in my application.  It shows the data bound to the data grid view and the combo box contains the correct list of items.  The problem is that the edit box...

View Article

edit one column of datagridview into column of checkbox

hello ..  i have this problem .. applicant | module | date | approvation | xxxx xxxx xxxx xxxxxxx yyyy yyyy yyyy yyyyyyy tttt tttt tttt tttttttI have this db table ... After query i assign  DataTable...

View Article

Get "Current" Cell Value from datagrid

Hi folks,My form has a datagrid that has a numeric column called allocated with a default value of 0.00.I change the value in the cell from 0 to 100. At this point I press the Down Arrow. I am trapping...

View Article


I can not clear comboBox

HelloI have tow comboBoxes, the first one get its items from DataGridView  by condition, and the second one is empty, then when i select from the first comboBox, then the items of second comboBox must...

View Article

Image may be NSFW.
Clik here to view.

how to refresh datagridview

  when i update row in grid view(drag & drop)    how to refresh grid view so that upgradation show in the  datagridview

View Article


C# Add DataRow to the End of a DataGridview from DataTable

I'm not sure on a best approach to this.  Was hoping for some help.  In short,  I have a DGV that pulls unscheduled workorders from the database (this.datasource = theTable)  When I change the...

View Article

Alternative to SQL Server in C# Windows Forms to release the program to others

Hello,I have a program I'm making in VS 2015, in C# (Windows Forms) using SQL Server for databases. However, if I were ever to build this and release it to other users, which I want to do, I know I...

View Article


How to Get Browser Details for all Operaing systems using C# Windows forms

Hi,I am using the Web Browser control to show web content in my project. To Print the Browser details (Only IE version ) I am using Web Browser class to get browser details. It works fine up to Windows...

View Article

combobox in datagridview

how to get selectedindex chaned event in datagridviewcombobox column in C#.net. private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) { int...

View Article

Winforms TextBox Data binding to Text and Tag (Value and ID) not working

Hi, I have a TextBox control which is data bound to Value and ID properties ( Text = Value, Tag = ID) with DataSourceUpdateMode onValidation. Somehow the Model object ID property is updated with null...

View Article
Browsing all 2535 articles
Browse latest View live