473,772 Members | 2,414 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving DataGridView

Mel
I would like to the save the column order of DataGridView.

Thanks
Mel
May 10 '07 #1
2 2258
Mel,

There is nothing like this for the DataGridView. You will have to cycle
through the properties that you want to save, and figure out a format to
save it in. You could create your own object which mirrors the properties
of the DataGridView you want to save, and then serialize it, using binary
serialization, or XML Serialization if your class is structured correctly.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Mel" <Me************ @insdirect.comw rote in message
news:et******** ******@TK2MSFTN GP04.phx.gbl...
>I would like to the save the column order of DataGridView.

Thanks
Mel


May 10 '07 #2
Mel schreef:
I would like to the save the column order of DataGridView.
I'm not quite sure what you're trying to do.. If you want to influence
how the columns are added to the DataGridView by databinding (thus,
autogenerate columns = true) you can do this by implementing ITypedList
and return the PropertyDescrip tors in the order you want them.. (eg:
http://www.timvw.be/control-the-orde...in-your-class/)
--
Tim Van Wassenhove - Read my mind <url:http://www.timvw.be/>
May 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1557
by: RSH | last post by:
Hi, I have created a WinForm that uses a series of dynamic DDLs to select Databases/tables and then loads the data into a DataGridView. The 2.0 Datagridview allows users to reorder columns etc and I was wondering how I would go about saving the DataGridView Layout at then user/table level? I have heard about IPersistComponentSettings but I can't really find any code snippets or tutorials on how to use this. Any help would be greatly...
7
12631
by: Mitchell S. Honnert | last post by:
Is there an equivalent of the DataGrid's DataGridTableStyle for the DataGridView? If not, is there an easy way to duplicate the DataGridTableStyle's functionality for the DataGridView? Here's the background for my question... Before I switched my application over to the Fx 2.0, I used a DataGrid to display my data. I would store different DataGridTableStyles (each one with a custom set of columns) in the DataGrid.TableStyles property...
11
27321
by: Kevin | last post by:
I've been searching forever for examples of saving data changes in a DataGridView. There's all kinds of examples, but none really show how to save changes. Someone please help me. I have a Windows Forms program with a DataGridView and a BindingSource added to a form. Here is the code I'm using to populate the grid: Dim CRClassesTableAdapter As SqlDataAdapter Dim CRClassesTable As New DataTable()
0
1355
by: =?Utf-8?B?QkFUT04=?= | last post by:
I have realy big problem I try lot of things but never success! I need a HELP! Problem is in that I made database in Microsoft access and connect her to C# form and datagridview. and it shoving a data that I was inserted in it trough Office access. but when I try to insert some data in that database trough a C# form it (after refresh) show that data is inserted in datagridview but it never save in database!!!!!!!!!!!!
1
2073
by: nmrpa91290 | last post by:
I have a vb 2005 program that I am writing. It is just a form with a datagridview, textbox, and import command button. The code looks like this: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'TestDbDataSet.TestTable' table. You can move, or remove it, as needed. Me.TestTableTableAdapter.Fill(Me.TestDbDataSet.TestTable)
2
1957
by: RobcPettit | last post by:
Hi, I need some advice on how to proceed with saving gridview contents. Ive got a 'datagridview control' on a form, so its window application only not web. I fill this programatically with 'dataGridView1.Rows.Add(whatever array)' so its not bound to a database. Once the data in I want to save the data in a format that I can 1,reuse in the datagrid or 2, as an excel file. From what Ive googled so far, this doesnt seem possible without...
0
944
by: enrico via DotNetMonster.com | last post by:
how do i save fields that were entered in a datagridview? -- Message posted via DotNetMonster.com http://www.dotnetmonster.com/Uwe/Forums.aspx/dotnet-vb-net/200803/1
3
5745
by: Andrus | last post by:
I have DataGridView in virtual mode containing 3500 rows. In code below, assigning to RowCount value to 3500 takes 8 seconds. CPU usage goes high at this time. Stepping by F11 into user code shows few celltemplate property getters and combobox/datecombo constructor calls without database access which does not take a lot of time. Debug output (below) shows lot of messages Stepping over non-user code. Running in release mode from...
0
989
by: babai28 | last post by:
Hi All, I have an Access Db Table Called Employees. The columns are as follows: EmployeeId (Autonumber) PK EmployeeName (Text) EmployeeRole (Test) DateOfJoining (DateTime)
0
9619
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10103
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8934
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.