This is a migrated thread and some comments may be shown as answers.

Re-ordering columns in Designer when Dock=Left is broken

4 Answers 154 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
B
Top achievements
Rank 1
B asked on 17 Dec 2010, 01:44 PM
I'm creating a simple list report with columns and rows.
I don't use Table object because I need paging in html view in ReportWriter
I add ID, First Name, Last Name, Phone to the detail band in the report.
Per your docs I set Dock = Left to each item.  (they all align nicely)
Now I need to insert Middle Initial between First Name and Last Name
I select Last Name and Phone and set Dock = None, i move them to the right to make room for Middle Initial
I add Middle Initial field and insert it between First and Last Name.  My field order looks like ID, First Name, Middle Initial, Last Name, Phone

Here's the problem:
When I select all fields and set Dock = Left.  Middle Initial is moved to end!  ID, First Name, Last Name, Phone, Middle Initial.

When dock = left is set, it appears the designer aligns based on the order in which you add the field.  How do i change that behavior? 

4 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 21 Dec 2010, 01:26 PM
Hi B,

You need to change the order of the items in the items collection i.e. move the textbox item between the First/Last Name textboxes e.g.:

this.detail.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
            this.FirstName,
            this.MiddleInitial,
            this.LastName});

Best wishes,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
B
Top achievements
Rank 1
answered on 22 Dec 2010, 01:26 AM
Thanks Steve.  Yes, that works great.  I updated the order in the details and header collections.  I appreciate it!
0
Lukas
Top achievements
Rank 2
answered on 04 Jan 2011, 02:40 PM
Hi,

I have the same problem, but I'm using a SQLDataSource.

I already tried to change the order in the SELECT-Statement, but that didn't change a thing.
The columns still seem to be ordered alphabetically.
How can I change the order of the columns in the way I prefer?
0
Steve
Telerik team
answered on 05 Jan 2011, 05:31 PM
Hi Lukas,

It seems you're talking about a different thing - the order of the columns in the select statement is totally irrelevant to the order in the report, unless of course you have used the Report Wizard to create the report layout. In this case whenever you made changes to the sql query to include more columns, either re-run the report wizard to recreate the layout for you or manually place the new columns to the desired position from the Data Explorer.

Kind regards,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
Tags
General Discussions
Asked by
B
Top achievements
Rank 1
Answers by
Steve
Telerik team
B
Top achievements
Rank 1
Lukas
Top achievements
Rank 2
Share this question
or