dynamic column in structure according to user type

dynamic column in structure according to user type

  

we have a scnerio where strucure field are not fix so how can we add dynamic column in structure.we have to show column in grid according to usertype.

ankur rai wrote:

we have a scnerio where strucure field are not fix so how can we add dynamic column in structure.we have to show column in grid according to usertype.

Hi Ankur Rai,

Can you elaborate further the scenario?

Kind regards,

Cy


Ankur,

How many usertypes you have if you are having less than 4-5 usertypes then you have to use switch case for all usertypes fetch data accordingly in this case you have to create structure for all user types in this way you can achive your goal.

Regards

SK


Ankur,

I understand your requirement ..number of columns in your query are dependent on user type and thus you want it to be dynamic but as you know the output structure is tightly coupled with the number of columns returning form the query and due to this it is not possible.

Either you need to create different structure for every user type or you can create  a single structure which includes all columns for all user type but in that case you need to have same number of column returning from each query.



Regards

-PJ-


 you can searched with forums about that matter..


Sahshi kant Shukla wrote:

Ankur,

How many usertypes you have if you are having less than 4-5 usertypes then you have to use switch case for all usertypes fetch data accordingly in this case you have to create structure for all user types in this way you can achive your goal.

Regards

SK

there are 3 user type and fields are not fixed according to user.

ankur



Ankur,

As per my undersatnding you can not increase structure columns at run time but if you have idea about max number of columns occurs then you can define that(max) number of columns and i think in this way you can resolve your problem.

SK