<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>VBForums - ASP.NET And ASP.NET Core</title>
		<link>https://www.vbforums.com/</link>
		<description>Drop in here to discuss anything and everything about ASP.NET</description>
		<language>en</language>
		<lastBuildDate>Thu, 04 Jun 2026 03:16:48 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>https://www.vbforums.com/images/misc/rss.png</url>
			<title>VBForums - ASP.NET And ASP.NET Core</title>
			<link>https://www.vbforums.com/</link>
		</image>
		<item>
			<title>Question about web page DevExpress and Blazor</title>
			<link>https://www.vbforums.com/showthread.php?912004-Question-about-web-page-DevExpress-and-Blazor&amp;goto=newpost</link>
			<pubDate>Tue, 05 May 2026 19:58:19 GMT</pubDate>
			<description><![CDATA[First of all, I don't know if I'm in the right forum so feel free to move this if you are a moderator and secondly I have a very specific question because I code 95% of the time in windows desktop applications and I can't speak about what I'm doing "generally", I will explain in terms of my modules and what the overall goal is.

Our desktop winforms application has a new form that I'm also developing to run on the web.  It is just a grid of data, very simple.  The complexity (and fun) is because it has dynamic columns.  Employees here work on projects and the grid displays those projects and who is doing what.  For example, we have project roles: Assigned PA (PA), Review Technical Lead (Tech Rev), System Technician (ST) etc.  There are currently 18 roles.  I don't want to have to code them all statically.  Because next week we might decide there are two more roles.  So I want to be able to do something like SELECT * FROM xtblProjectRoles, get all the roles that exist right now and build the grid with a column for each, and the employee who is fulfilling that role will have his empID in the row for the project.  The problem I am having is with my class, ProjectListModel.  It's code as below with names "colRole" and the control # in of that role in the database table.  Is there some dynamic way I can define this class so I'm not locked into knowing how many possible roles there are? That is, how I can make it work when next week we have colRole18 and colRole19?   Here is file ProjectListModel.cs.

Code:
---------
    {
       public string? ProjectName { get; set; }
        public string? ProjectStatus { get; set; }
        public string? ProjectLevelOfEffort { get; set; }
        public string? ProjectType { get; set; }
        public string? ProjectTeam { get; set; }
        public string? CTS { get; set; }
        public string? colRole1 { get; set; }
        public string? colRole2 { get; set; }
        public string? colRole3 { get; set; }
        public string? colRole4 { get; set; }
        public string? colRole6 { get; set; }
        public string? colRole7 { get; set; }
        public string? colRole8 { get; set; }
        public string? colRole9 { get; set; }
        public string? colRole12 { get; set; }
        public string? colRole13 { get; set; }
        public string? colRole14 { get; set; }
        public string? colRole15 { get; set; }
        public string? colRole16 { get; set; }
        public string? colRole17 { get; set; }
        public string? colRole18 { get; set; }
        public string? PrevailingWage { get; set; }
    }
---------
Here is Index.razor.  I started to work on the dynamic columns but had an error until I defined them all in the class above.  
Attachment 196003 (https://www.vbforums.com/attachment.php?attachmentid=196003)

I hope this makes sense.  If I'm not explaining it well and you care, please ask questions and I'll say more.  I didn't want to get overly complicated to start.  Thank you.]]></description>
			<content:encoded><![CDATA[<div>First of all, I don't know if I'm in the right forum so feel free to move this if you are a moderator and secondly I have a very specific question because I code 95% of the time in windows desktop applications and I can't speak about what I'm doing &quot;generally&quot;, I will explain in terms of my modules and what the overall goal is.<br />
<br />
Our desktop winforms application has a new form that I'm also developing to run on the web.  It is just a grid of data, very simple.  The complexity (and fun) is because it has dynamic columns.  Employees here work on projects and the grid displays those projects and who is doing what.  For example, we have project roles: Assigned PA (PA), Review Technical Lead (Tech Rev), System Technician (ST) etc.  There are currently 18 roles.  I don't want to have to code them all statically.  Because next week we might decide there are two more roles.  So I want to be able to do something like SELECT * FROM xtblProjectRoles, get all the roles that exist right now and build the grid with a column for each, and the employee who is fulfilling that role will have his empID in the row for the project.  The problem I am having is with my class, ProjectListModel.  It's code as below with names &quot;colRole&quot; and the control # in of that role in the database table.  Is there some dynamic way I can define this class so I'm not locked into knowing how many possible roles there are? That is, how I can make it work when next week we have colRole18 and colRole19?   Here is file ProjectListModel.cs.<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp;  public string? ProjectName { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? ProjectStatus { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? ProjectLevelOfEffort { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? ProjectType { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? ProjectTeam { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? CTS { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? colRole1 { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? colRole2 { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? colRole3 { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? colRole4 { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? colRole6 { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? colRole7 { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? colRole8 { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? colRole9 { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? colRole12 { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? colRole13 { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? colRole14 { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? colRole15 { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? colRole16 { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? colRole17 { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? colRole18 { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string? PrevailingWage { get; set; }<br />
&nbsp; &nbsp; }</code><hr />
</div>Here is Index.razor.  I started to work on the dynamic columns but had an error until I defined them all in the class above.  <br />
<img src="https://www.vbforums.com/attachment.php?attachmentid=196003&amp;d=1778010955" border="0" alt="Name:  Project List on the web code.jpg
Views: 146
Size:  41.9 KB"  /><br />
<br />
I hope this makes sense.  If I'm not explaining it well and you care, please ask questions and I'll say more.  I didn't want to get overly complicated to start.  Thank you.</div>


	<div style="padding:10px">

	

	
		<fieldset class="fieldset">
			<legend>Attached Images</legend>
				<div style="padding:10px">
				<img class="attach" src="https://www.vbforums.com/attachment.php?attachmentid=196003&amp;stc=1&amp;d=1778010955" alt="" />&nbsp;
			</div>
		</fieldset>
	

	

	

	</div>
]]></content:encoded>
			<category domain="https://www.vbforums.com/forumdisplay.php?31-ASP-NET-And-ASP-NET-Core">ASP.NET And ASP.NET Core</category>
			<dc:creator>MMock</dc:creator>
			<guid isPermaLink="true">https://www.vbforums.com/showthread.php?912004-Question-about-web-page-DevExpress-and-Blazor</guid>
		</item>
	</channel>
</rss>
