locked
I need to add a status field to a table and have that addition trickle down to the various webforms like list.aspx. RRS feed

  • Question

  • User1929428035 posted

    What do I need to do to have the field show in the list.aspx? The field is a lookup field. For example: The student table will have a statusid field, which references a status table. Please be reminded this is a dynamic data project.

    Saturday, September 14, 2013 6:57 AM

Answers

All replies

  • User-227760790 posted

    hi mr41971,

    you can use SQL statement below:

    select a.* ,b.status
    
    from student  a, status b
    
    where a.statusid =b.statusid 
    

    or

    create a temporary table and insert data into it dynamic .

    Monday, September 16, 2013 2:56 AM
  • User-227760790 posted

    hi mr41971,

    you can use SQL statement below:

    select a.* ,b.status
    
    from student  a, status b
    
    where a.statusid =b.statusid 
    

    or

    create a temporary table and insert data into it dynamic .

    Monday, September 16, 2013 2:56 AM
  • User1929428035 posted

    Thank you for your kind effort. What I need to do is to have the addition of the status field trickle down to the list.aspx webform.

    Monday, September 16, 2013 5:30 AM
  • User-933407369 posted

    hi  mr41971,

    According to your description,  you want to add a status field to a table.

    I would suggest you to try the following workaround: 

    private DataTable AlterDataTable(DataTable oldTable)
    
    {
    
        DataTable newTable = oldTable.Clone();
    
        foreach (DataRow row in oldTable.Rows)
        {
           //add columns newTable
    
           //add data
    
           // add rows  newTable
           //..........
        }
    
        return newTable;
    
    }
    

    Please read the reference below for more information:

    http://stackoverflow.com/questions/7161495/how-to-create-duplicate-rows-based-on-some-conditions

    http://stackoverflow.com/questions/11735003/club-data-in-a-data-table-into-a-single-row-based-on-a-condition-in-c-sharp

     If you need more assistance, please let me know.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 20, 2013 6:07 AM