Bernd Wachter
Top achievements
Rank 1
Bernd Wachter
asked on 31 Oct 2009, 11:01 AM
Hello,
I have a Gridview and its bound to a Datasource (LINQ)
OK then i have insert in my Grid a Template Column with a Button....
My Template Colum comes alway as the First Item in my Grid
and the comes the Databound Columns from my Datasource..
How do i Sort does the Databound Columns comes first and my Template Colum comes
as the Lst Column Item ????
Where can i say the Gridviev does my Template Column comes at the End of al Columns
and not as the First (Order)
I have a Gridview and its bound to a Datasource (LINQ)
OK then i have insert in my Grid a Template Column with a Button....
My Template Colum comes alway as the First Item in my Grid
and the comes the Databound Columns from my Datasource..
How do i Sort does the Databound Columns comes first and my Template Colum comes
as the Lst Column Item ????
Where can i say the Gridviev does my Template Column comes at the End of al Columns
and not as the First (Order)
5 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 02 Nov 2009, 06:37 AM
Hi,
Check the demo link to know more on Grid Column Reorder
Grid / Column/Row Resize/Reorder
Thanks,
Shinu
Check the demo link to know more on Grid Column Reorder
Grid / Column/Row Resize/Reorder
Thanks,
Shinu
0
Bernd Wachter
Top achievements
Rank 1
answered on 02 Nov 2009, 02:08 PM
Hi,
I bound the Grid Dynamic with my Data from my LINQ
My LINQ Data comes from Code ...
In my GridView i bound only the Datasource to my LINQ
And i have insert one Template Field per Hand in my Grid
and al the other Data Loads Dynamic from my LINQ Source
I bound the Columns not Fix !! only the Template Field..
How can i say does the Dynamic Data Loads as first in my Grid and
then the Template Filed Loads on the End ????
in Code
I bound the Grid Dynamic with my Data from my LINQ
My LINQ Data comes from Code ...
In my GridView i bound only the Datasource to my LINQ
And i have insert one Template Field per Hand in my Grid
and al the other Data Loads Dynamic from my LINQ Source
I bound the Columns not Fix !! only the Template Field..
How can i say does the Dynamic Data Loads as first in my Grid and
then the Template Filed Loads on the End ????
in Code
0
Hi Bernd,
To achieve your goal you can use the SwapColumns method from the server API of the grid. Review the content of this help topic for more details concerning the implementation.
Best regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
To achieve your goal you can use the SwapColumns method from the server API of the grid. Review the content of this help topic for more details concerning the implementation.
Best regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Bernd Wachter
Top achievements
Rank 1
answered on 07 Nov 2009, 07:00 AM
Hi,
The Swap Column helps not for my Problem....
OK
I have a LINQ Query to bring Data in my Grid (Auto Generate Columns)
at this my Grid shows my Data from my LINQ Query in Order where i set in the LINQ Query
A Snippet of my Linq Query:
OK my Grid show the Data in Order where i have set in the Query like this
------------------------------------------------------------------------------------------------------
ID | Datum | Uhrzeit | Name
--------------------------------------------------------------------------------------------------------
Ok this is good so !
And then i Insert a Link Button Column per Hand in my Grid
When i click on this Link Button i will Redirect to another Page an give him the selected
ID Number of the selected Row.. This works
When i insert the Link Column in my Grid it shows alway at the first !!!! like this
------------------------------------------------------------------------------------------------------
Select | ID | Datum | Uhrzeit | Name
--------------------------------------------------------------------------------------------------------
This is my Problem !!
The Select must be as the Last Column always like this:
------------------------------------------------------------------------------------------------------
ID | Datum | Uhrzeit | Name | Select
--------------------------------------------------------------------------------------------------------
When i use the Swap Column Method then the Select Column is correct at the last,
but the Name Column goes at the first !!!
and this is not Correct... At the First must the ID !!!!
I must the Order have where i set in my LINQ Query
and then as the Last Column i must have my LinkButton Column ??????
The Swap Column helps not for my Problem....
OK
I have a LINQ Query to bring Data in my Grid (Auto Generate Columns)
at this my Grid shows my Data from my LINQ Query in Order where i set in the LINQ Query
A Snippet of my Linq Query:
| Select New With {p.ID, _ |
| .Datum = String.Format("{0:d}", p.Datum), _ |
| .Uhrzeit = String.Format("{0:T}", p.Uhrzeit), _ |
| p.Flughaefen.Name _ |
OK my Grid show the Data in Order where i have set in the Query like this
------------------------------------------------------------------------------------------------------
ID | Datum | Uhrzeit | Name
--------------------------------------------------------------------------------------------------------
Ok this is good so !
And then i Insert a Link Button Column per Hand in my Grid
When i click on this Link Button i will Redirect to another Page an give him the selected
ID Number of the selected Row.. This works
When i insert the Link Column in my Grid it shows alway at the first !!!! like this
------------------------------------------------------------------------------------------------------
Select | ID | Datum | Uhrzeit | Name
--------------------------------------------------------------------------------------------------------
This is my Problem !!
The Select must be as the Last Column always like this:
------------------------------------------------------------------------------------------------------
ID | Datum | Uhrzeit | Name | Select
--------------------------------------------------------------------------------------------------------
When i use the Swap Column Method then the Select Column is correct at the last,
but the Name Column goes at the first !!!
and this is not Correct... At the First must the ID !!!!
I must the Order have where i set in my LINQ Query
and then as the Last Column i must have my LinkButton Column ??????
0
Hello Bernd,
You will need to swap the positions of all columns accordingly (using the SwapColumns method) in order to position them in par with your preferences. Please excuse us for not being able to provide more straight-forward solution.
Kind regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
You will need to swap the positions of all columns accordingly (using the SwapColumns method) in order to position them in par with your preferences. Please excuse us for not being able to provide more straight-forward solution.
Kind regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.