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

Create Coulmns Dynamiclly with changed of values over time

1 Answer 38 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ane
Top achievements
Rank 1
Ane asked on 18 Sep 2016, 10:17 AM

Hi there;

I’m tryring to create a radGrid with data from database

What I want to do that I already convert some rows to columns in the database query:

SELECT  Z.id , WR. NAME,

 NVL(MAX(DECODE (Z.ZONE , 'A', Z.n )),0) A,

 NVL(MAX(DECODE ( Z.ZONE , 'B', Z.n )),0)B,

 NVL(MAX(DECODE ( Z.ZONE , 'M', Z.n )),0) M

 FROM  ………………

And I need to publish this data in a radgrid

What is the problem?

That this columns actually change over time, so I can’t keep them static

 

My idea is to loop through this values(A,B,M,….) in c# code-behind  and  convert them to columns in a command string ? Is it possible to do so?

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 22 Sep 2016, 04:41 AM
Hello Afra,

You can achieve this requirement using the implementation demonstrated in the following article:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/defining-structure/changing-the-grid-structure-dynamically-on-postback

I hope this will prove helpful.

Regards,
Eyup
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Grid
Asked by
Ane
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or