Click here to Skip to main content
15,894,343 members

change sequence of columns of UltraWinGrid

M_Mogharrabi asked:

Open original thread
Hi everybody,
I have a UltraWinGrid in my form that the user allowed to change the sequence of columns of it.also i have a button in my form that it should send the DataSource of this Grid as a DataTable to a class that generates report.
I have used following code to cast the DataSource to DataTable:

C#
(DataTable)UltraGrid1.DataSource


but the problem is that the sequence of columns in this new DataTable is not the visible sequence that the user sets...
How can i change the DataSource of UltraWinGrid to what i can see in Grid on screen now??

Edit: my application user can modified the WinGrid (for example select columns that he want to see in grid and also change sequence of them) and then when he press 'Print' button the current WinGrid with current columns and sequence and data should send to a class as a parameter in DataTable type.
Now what should i do???
Tags: C#, Windows Forms, Grid, Infragistics

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900