Using multiple object types in a dropdown to provide filtering for a data grid
<p>In my ASP.Net C# project I have a requirement to display a dropdown containing both people's names and office names.</p>

<p>When the user makes a selection, the event is handled in JavaScript and used to filter the results of a grid. So if the user selects a person's name from the dropdown then the grid displays only the results for that person. If the user selects an office then the grid should show the results for all the people in that office.</p>

<p>The filtering is handled in JavaScript on the OnClientDropDownClosed event of the dropdown.The grid and dropdown are Telerik controls not standard ones BTW. </p>

<p><strong>My question is - what is the best way to determine what type of item the user has selected.</strong>
The Value for the dropdown item is either the person's name or the office identifier.</p>

<p>I'm thinking I could simply add a prefix to the Value and do a substring test for it but that seems a little hacky...</p>

<p>is there a better way to achieve what I want?</p>
