Webgrid column value depending on multiple values

1 reply. Last post: April 8, 2012 11:22 PM by Yudi
Tags :
  • New Discussion
  • New Question
  • New Product Feedback
berk kurtMember

The first thing I'm trying to achieve is, get a columns value that is calculated using 2 other columns, like:


"User" table has the "PrimarySectorId" and "PrimarySectorTypeId" columns.

 And I have 8 different "Sector" tables like "SectorA", "SectorB", .... "SectorH".

There is a "WorkAreaId" column in every sector table that is a foreign key relation with "WorkArea" table's Id.


"PrimarySectorTypeId" is a enum value (integer) that differentiates the sectors.

Therefore, all I need to do is to bind the users to a webgrid and include a WorkArea column, so I need to get both the "PrimarySectorId" and "PrimarySectorTypeId" to get the correct "WorkArea" value.


But as far as I know, I can just use a <value list> and take only one value to calculate a column value.


I'd really like to get it by myself but it has been so long and no step forward I could get.

Thanks in advance.


Note: It would be lovely if someone could include a sample of many to many realationship binding to a webgrid. 

All times are GMT -5. The time now is 2:09 AM.
Previous Next