This question is locked. New answers and comments are not allowed.
Our system provides a mechanism by which our users define their business rules outside of our code. Our front end applications adapt to these business rules by dynamically assembling all data entry dialogs at runtime. Since there are n-possible properties for a given dialog we need a way to bind the XML that we retrieve through are webservice without defining a class that can be use as an IList for the datasource.
Basically we can probe the webservice for the column names and datatypes that a the dataview should display but we cannot define a matching object in code since the activities and properties that can be defined are customized in our database.
Another way to look at this is to tell me how to bind the following XML(See below) to a GridView without the benefit of having an object that has the same column values. In the example below the <evt_mast_chemical> tag delineates a row and the child tags are the column values. Keep in mind that a new activity could be defined 5 minutes from now that would have a completely different column values. I do have schema information that delineates what each column value datatype is.
<?xml version="1.0" encoding="utf-8"?>
<DocumentElement>
<evt_mast_chemical>
<id>23168</id>
<eventtypeid>20</eventtypeid>
<userid>27</userid>
<parentid>27</parentid>
<objectid>84</objectid>
<objecttable>field</objecttable>
<datetime>2007-04-17T10:42:21-04:00</datetime>
<sparentid>0</sparentid>
<Farm_id>3</Farm_id>
<Farm>Branson Farms</Farm>
<Field_id>84</Field_id>
<Field>Field 5 of 10</Field>
<Active_x0020_Ingredient>N/R</Active_x0020_Ingredient>
<Air_x0020_Temperature />
<Air_x0020_Temperature_x0020_unit>C</Air_x0020_Temperature_x0020_unit>
<Applicator_x0020_Certification_x0020_Number>fddssd</Applicator_x0020_Certification_x0020_Number>
<Barcode />
<Chem_x0020_EPA_x0020_Reg>Exempt</Chem_x0020_EPA_x0020_Reg>
<Chem_x0020_Manufacturer>Helena</Chem_x0020_Manufacturer>
<Chem_x0020_Product>Joint Venture</Chem_x0020_Product>
<Chem_x0020_Type>Adjuvant</Chem_x0020_Type>
<Chemical_x0020_Application_x0020_Method>Drops</Chemical_x0020_Application_x0020_Method>
<Chemical_x0020_Application_x0020_Rate />
<Chemical_x0020_Application_x0020_Rate_x0020_unit>dry oz / acre</Chemical_x0020_Application_x0020_Rate_x0020_unit>
<Chemical_x0020_Applicator_x0020_Comments />
<Chemical_x0020_Applied_x0020_Area />
<Chemical_x0020_Applied_x0020_Area_x0020_unit>acres</Chemical_x0020_Applied_x0020_Area_x0020_unit>
<Chemical_x0020_Cost_x0020__x0028_Est._x0029_ />
<Chemical_x0020_Cost_x0020__x0028_Est._x0029__x0020_unit>$</Chemical_x0020_Cost_x0020__x0028_Est._x0029__x0020_unit>
<Crop_x0020_for_x0020_Chem_x0020_App>Soybeans</Crop_x0020_for_x0020_Chem_x0020_App>
<Date_x002F_Time_x0020_of_x0020_Chemical_x0020_Application>2007-04-19T10:30:07-04:00</Date_x002F_Time_x0020_of_x0020_Chemical_x0020_Application>
<Duration_x0020_Until_x0020_Re-Entry />
<Duration_x0020_Until_x0020_Re-Entry_x0020_unit>days</Duration_x0020_Until_x0020_Re-Entry_x0020_unit>
<Equipment_x0020_Used_x0020_to_x0020_Apply_x0020_Chemical>dafgd</Equipment_x0020_Used_x0020_to_x0020_Apply_x0020_Chemical>
<Humidity_x0020__x0028__x0025__x0029_ />
<Name_x0020_of_x0020_Chemical_x0020_Applicator>adl;jf;lak</Name_x0020_of_x0020_Chemical_x0020_Applicator>
<Residue_x0020_Cover_x0020__x0028__x0025__x0029_ />
<Soil_x0020_Condition />
<Weather_x0020_Conditions />
<Wind_x0020_Direction />
<Wind_x0020_Speed />
</evt_mast_chemical>
<evt_mast_chemical>
<id>31979</id>
<eventtypeid>20</eventtypeid>
<userid>27</userid>
<parentid>27</parentid>
<objectid>84</objectid>
<objecttable>field</objecttable>
<datetime>2007-06-08T09:34:16-04:00</datetime>
<sparentid>0</sparentid>
<Farm_id>3</Farm_id>
<Farm>Branson Farms</Farm>
<Field_id>84</Field_id>
<Field>Field 5 of 10</Field>
<Active_x0020_Ingredient>PCNB</Active_x0020_Ingredient>
<Air_x0020_Temperature />
<Air_x0020_Temperature_x0020_unit>C</Air_x0020_Temperature_x0020_unit>
<Applicator_x0020_Certification_x0020_Number />
<Barcode />
<Chem_x0020_EPA_x0020_Reg>400-453</Chem_x0020_EPA_x0020_Reg>
<Chem_x0020_Manufacturer>Crompton</Chem_x0020_Manufacturer>
<Chem_x0020_Product>Terraclor</Chem_x0020_Product>
<Chem_x0020_Type>Fungicide</Chem_x0020_Type>
<Chemical_x0020_Application_x0020_Method />
<Chemical_x0020_Application_x0020_Rate>56</Chemical_x0020_Application_x0020_Rate>
<Chemical_x0020_Application_x0020_Rate_x0020_unit>dry oz / acre</Chemical_x0020_Application_x0020_Rate_x0020_unit>
<Chemical_x0020_Applicator_x0020_Comments />
<Chemical_x0020_Applied_x0020_Area>0</Chemical_x0020_Applied_x0020_Area>
<Chemical_x0020_Applied_x0020_Area_x0020_unit>acres</Chemical_x0020_Applied_x0020_Area_x0020_unit>
<Chemical_x0020_Cost_x0020__x0028_Est._x0029_ />
<Chemical_x0020_Cost_x0020__x0028_Est._x0029__x0020_unit>$</Chemical_x0020_Cost_x0020__x0028_Est._x0029__x0020_unit>
<Crop_x0020_for_x0020_Chem_x0020_App>Soybeans</Crop_x0020_for_x0020_Chem_x0020_App>
<Date_x002F_Time_x0020_of_x0020_Chemical_x0020_Application>2007-06-13T00:00:00-04:00</Date_x002F_Time_x0020_of_x0020_Chemical_x0020_Application>
<Duration_x0020_Until_x0020_Re-Entry />
<Duration_x0020_Until_x0020_Re-Entry_x0020_unit>days</Duration_x0020_Until_x0020_Re-Entry_x0020_unit>
<Equipment_x0020_Used_x0020_to_x0020_Apply_x0020_Chemical />
<Humidity_x0020__x0028__x0025__x0029_ />
<Name_x0020_of_x0020_Chemical_x0020_Applicator />
<Residue_x0020_Cover_x0020__x0028__x0025__x0029_ />
<Soil_x0020_Condition />
<Weather_x0020_Conditions />
<Wind_x0020_Direction />
<Wind_x0020_Speed />
</evt_mast_chemical>
<evt_mast_chemical>
<id>93640</id>
<eventtypeid>20</eventtypeid>
<userid>27</userid>
<parentid>27</parentid>
<objectid>84</objectid>
<objecttable>field</objecttable>
<datetime>2009-06-19T11:34:44-04:00</datetime>
<sparentid>0</sparentid>
<Farm_id>3</Farm_id>
<Farm>Branson Farms</Farm>
<Field_id>84</Field_id>
<Field>Field 5 of 10</Field>
<Active_x0020_Ingredient />
<Air_x0020_Temperature>0</Air_x0020_Temperature>
<Air_x0020_Temperature_x0020_unit>C</Air_x0020_Temperature_x0020_unit>
<Applicator_x0020_Certification_x0020_Number />
<Barcode>0</Barcode>
<Chem_x0020_EPA_x0020_Reg />
<Chem_x0020_Manufacturer />
<Chem_x0020_Product />
<Chem_x0020_Type />
<Chemical_x0020_Application_x0020_Method>Banding</Chemical_x0020_Application_x0020_Method>
<Chemical_x0020_Application_x0020_Rate>0</Chemical_x0020_Application_x0020_Rate>
<Chemical_x0020_Application_x0020_Rate_x0020_unit>dry oz / acre</Chemical_x0020_Application_x0020_Rate_x0020_unit>
<Chemical_x0020_Applicator_x0020_Comments />
<Chemical_x0020_Applied_x0020_Area>0</Chemical_x0020_Applied_x0020_Area>
<Chemical_x0020_Applied_x0020_Area_x0020_unit>acres</Chemical_x0020_Applied_x0020_Area_x0020_unit>
<Chemical_x0020_Cost_x0020__x0028_Est._x0029_>0</Chemical_x0020_Cost_x0020__x0028_Est._x0029_>
<Chemical_x0020_Cost_x0020__x0028_Est._x0029__x0020_unit>$</Chemical_x0020_Cost_x0020__x0028_Est._x0029__x0020_unit>
<Crop_x0020_for_x0020_Chem_x0020_App />
<Date_x002F_Time_x0020_of_x0020_Chemical_x0020_Application>2009-06-19T11:34:41-04:00</Date_x002F_Time_x0020_of_x0020_Chemical_x0020_Application>
<Duration_x0020_Until_x0020_Re-Entry>0</Duration_x0020_Until_x0020_Re-Entry>
<Duration_x0020_Until_x0020_Re-Entry_x0020_unit>days</Duration_x0020_Until_x0020_Re-Entry_x0020_unit>
<Equipment_x0020_Used_x0020_to_x0020_Apply_x0020_Chemical />
<Humidity_x0020__x0028__x0025__x0029_>0</Humidity_x0020__x0028__x0025__x0029_>
<Name_x0020_of_x0020_Chemical_x0020_Applicator>hhh</Name_x0020_of_x0020_Chemical_x0020_Applicator>
<Residue_x0020_Cover_x0020__x0028__x0025__x0029_>0</Residue_x0020_Cover_x0020__x0028__x0025__x0029_>
<Soil_x0020_Condition />
<Weather_x0020_Conditions />
<Wind_x0020_Direction />
<Wind_x0020_Speed />
</evt_mast_chemical>
</DocumentElement>
Basically we can probe the webservice for the column names and datatypes that a the dataview should display but we cannot define a matching object in code since the activities and properties that can be defined are customized in our database.
Another way to look at this is to tell me how to bind the following XML(See below) to a GridView without the benefit of having an object that has the same column values. In the example below the <evt_mast_chemical> tag delineates a row and the child tags are the column values. Keep in mind that a new activity could be defined 5 minutes from now that would have a completely different column values. I do have schema information that delineates what each column value datatype is.
<?xml version="1.0" encoding="utf-8"?>
<DocumentElement>
<evt_mast_chemical>
<id>23168</id>
<eventtypeid>20</eventtypeid>
<userid>27</userid>
<parentid>27</parentid>
<objectid>84</objectid>
<objecttable>field</objecttable>
<datetime>2007-04-17T10:42:21-04:00</datetime>
<sparentid>0</sparentid>
<Farm_id>3</Farm_id>
<Farm>Branson Farms</Farm>
<Field_id>84</Field_id>
<Field>Field 5 of 10</Field>
<Active_x0020_Ingredient>N/R</Active_x0020_Ingredient>
<Air_x0020_Temperature />
<Air_x0020_Temperature_x0020_unit>C</Air_x0020_Temperature_x0020_unit>
<Applicator_x0020_Certification_x0020_Number>fddssd</Applicator_x0020_Certification_x0020_Number>
<Barcode />
<Chem_x0020_EPA_x0020_Reg>Exempt</Chem_x0020_EPA_x0020_Reg>
<Chem_x0020_Manufacturer>Helena</Chem_x0020_Manufacturer>
<Chem_x0020_Product>Joint Venture</Chem_x0020_Product>
<Chem_x0020_Type>Adjuvant</Chem_x0020_Type>
<Chemical_x0020_Application_x0020_Method>Drops</Chemical_x0020_Application_x0020_Method>
<Chemical_x0020_Application_x0020_Rate />
<Chemical_x0020_Application_x0020_Rate_x0020_unit>dry oz / acre</Chemical_x0020_Application_x0020_Rate_x0020_unit>
<Chemical_x0020_Applicator_x0020_Comments />
<Chemical_x0020_Applied_x0020_Area />
<Chemical_x0020_Applied_x0020_Area_x0020_unit>acres</Chemical_x0020_Applied_x0020_Area_x0020_unit>
<Chemical_x0020_Cost_x0020__x0028_Est._x0029_ />
<Chemical_x0020_Cost_x0020__x0028_Est._x0029__x0020_unit>$</Chemical_x0020_Cost_x0020__x0028_Est._x0029__x0020_unit>
<Crop_x0020_for_x0020_Chem_x0020_App>Soybeans</Crop_x0020_for_x0020_Chem_x0020_App>
<Date_x002F_Time_x0020_of_x0020_Chemical_x0020_Application>2007-04-19T10:30:07-04:00</Date_x002F_Time_x0020_of_x0020_Chemical_x0020_Application>
<Duration_x0020_Until_x0020_Re-Entry />
<Duration_x0020_Until_x0020_Re-Entry_x0020_unit>days</Duration_x0020_Until_x0020_Re-Entry_x0020_unit>
<Equipment_x0020_Used_x0020_to_x0020_Apply_x0020_Chemical>dafgd</Equipment_x0020_Used_x0020_to_x0020_Apply_x0020_Chemical>
<Humidity_x0020__x0028__x0025__x0029_ />
<Name_x0020_of_x0020_Chemical_x0020_Applicator>adl;jf;lak</Name_x0020_of_x0020_Chemical_x0020_Applicator>
<Residue_x0020_Cover_x0020__x0028__x0025__x0029_ />
<Soil_x0020_Condition />
<Weather_x0020_Conditions />
<Wind_x0020_Direction />
<Wind_x0020_Speed />
</evt_mast_chemical>
<evt_mast_chemical>
<id>31979</id>
<eventtypeid>20</eventtypeid>
<userid>27</userid>
<parentid>27</parentid>
<objectid>84</objectid>
<objecttable>field</objecttable>
<datetime>2007-06-08T09:34:16-04:00</datetime>
<sparentid>0</sparentid>
<Farm_id>3</Farm_id>
<Farm>Branson Farms</Farm>
<Field_id>84</Field_id>
<Field>Field 5 of 10</Field>
<Active_x0020_Ingredient>PCNB</Active_x0020_Ingredient>
<Air_x0020_Temperature />
<Air_x0020_Temperature_x0020_unit>C</Air_x0020_Temperature_x0020_unit>
<Applicator_x0020_Certification_x0020_Number />
<Barcode />
<Chem_x0020_EPA_x0020_Reg>400-453</Chem_x0020_EPA_x0020_Reg>
<Chem_x0020_Manufacturer>Crompton</Chem_x0020_Manufacturer>
<Chem_x0020_Product>Terraclor</Chem_x0020_Product>
<Chem_x0020_Type>Fungicide</Chem_x0020_Type>
<Chemical_x0020_Application_x0020_Method />
<Chemical_x0020_Application_x0020_Rate>56</Chemical_x0020_Application_x0020_Rate>
<Chemical_x0020_Application_x0020_Rate_x0020_unit>dry oz / acre</Chemical_x0020_Application_x0020_Rate_x0020_unit>
<Chemical_x0020_Applicator_x0020_Comments />
<Chemical_x0020_Applied_x0020_Area>0</Chemical_x0020_Applied_x0020_Area>
<Chemical_x0020_Applied_x0020_Area_x0020_unit>acres</Chemical_x0020_Applied_x0020_Area_x0020_unit>
<Chemical_x0020_Cost_x0020__x0028_Est._x0029_ />
<Chemical_x0020_Cost_x0020__x0028_Est._x0029__x0020_unit>$</Chemical_x0020_Cost_x0020__x0028_Est._x0029__x0020_unit>
<Crop_x0020_for_x0020_Chem_x0020_App>Soybeans</Crop_x0020_for_x0020_Chem_x0020_App>
<Date_x002F_Time_x0020_of_x0020_Chemical_x0020_Application>2007-06-13T00:00:00-04:00</Date_x002F_Time_x0020_of_x0020_Chemical_x0020_Application>
<Duration_x0020_Until_x0020_Re-Entry />
<Duration_x0020_Until_x0020_Re-Entry_x0020_unit>days</Duration_x0020_Until_x0020_Re-Entry_x0020_unit>
<Equipment_x0020_Used_x0020_to_x0020_Apply_x0020_Chemical />
<Humidity_x0020__x0028__x0025__x0029_ />
<Name_x0020_of_x0020_Chemical_x0020_Applicator />
<Residue_x0020_Cover_x0020__x0028__x0025__x0029_ />
<Soil_x0020_Condition />
<Weather_x0020_Conditions />
<Wind_x0020_Direction />
<Wind_x0020_Speed />
</evt_mast_chemical>
<evt_mast_chemical>
<id>93640</id>
<eventtypeid>20</eventtypeid>
<userid>27</userid>
<parentid>27</parentid>
<objectid>84</objectid>
<objecttable>field</objecttable>
<datetime>2009-06-19T11:34:44-04:00</datetime>
<sparentid>0</sparentid>
<Farm_id>3</Farm_id>
<Farm>Branson Farms</Farm>
<Field_id>84</Field_id>
<Field>Field 5 of 10</Field>
<Active_x0020_Ingredient />
<Air_x0020_Temperature>0</Air_x0020_Temperature>
<Air_x0020_Temperature_x0020_unit>C</Air_x0020_Temperature_x0020_unit>
<Applicator_x0020_Certification_x0020_Number />
<Barcode>0</Barcode>
<Chem_x0020_EPA_x0020_Reg />
<Chem_x0020_Manufacturer />
<Chem_x0020_Product />
<Chem_x0020_Type />
<Chemical_x0020_Application_x0020_Method>Banding</Chemical_x0020_Application_x0020_Method>
<Chemical_x0020_Application_x0020_Rate>0</Chemical_x0020_Application_x0020_Rate>
<Chemical_x0020_Application_x0020_Rate_x0020_unit>dry oz / acre</Chemical_x0020_Application_x0020_Rate_x0020_unit>
<Chemical_x0020_Applicator_x0020_Comments />
<Chemical_x0020_Applied_x0020_Area>0</Chemical_x0020_Applied_x0020_Area>
<Chemical_x0020_Applied_x0020_Area_x0020_unit>acres</Chemical_x0020_Applied_x0020_Area_x0020_unit>
<Chemical_x0020_Cost_x0020__x0028_Est._x0029_>0</Chemical_x0020_Cost_x0020__x0028_Est._x0029_>
<Chemical_x0020_Cost_x0020__x0028_Est._x0029__x0020_unit>$</Chemical_x0020_Cost_x0020__x0028_Est._x0029__x0020_unit>
<Crop_x0020_for_x0020_Chem_x0020_App />
<Date_x002F_Time_x0020_of_x0020_Chemical_x0020_Application>2009-06-19T11:34:41-04:00</Date_x002F_Time_x0020_of_x0020_Chemical_x0020_Application>
<Duration_x0020_Until_x0020_Re-Entry>0</Duration_x0020_Until_x0020_Re-Entry>
<Duration_x0020_Until_x0020_Re-Entry_x0020_unit>days</Duration_x0020_Until_x0020_Re-Entry_x0020_unit>
<Equipment_x0020_Used_x0020_to_x0020_Apply_x0020_Chemical />
<Humidity_x0020__x0028__x0025__x0029_>0</Humidity_x0020__x0028__x0025__x0029_>
<Name_x0020_of_x0020_Chemical_x0020_Applicator>hhh</Name_x0020_of_x0020_Chemical_x0020_Applicator>
<Residue_x0020_Cover_x0020__x0028__x0025__x0029_>0</Residue_x0020_Cover_x0020__x0028__x0025__x0029_>
<Soil_x0020_Condition />
<Weather_x0020_Conditions />
<Wind_x0020_Direction />
<Wind_x0020_Speed />
</evt_mast_chemical>
</DocumentElement>