locked
Add a TextBox to a GridView (StyleSheet Behavior) RRS feed

  • Question

  • User1043796333 posted

     

     

     

    CategoryID CategoryName Description
    Select 1 Beverages Soft drinks, coffees, teas, beers, and ales
    Select 2 Condiments Sweet and savory sauces, relishes, spreads, and seasonings
    Select 3 Confections Desserts, candies, and sweet breads
    Select 4 Dairy Products Cheeses
    Select 5 Grains/Cereals Breads, crackers, pasta, and cereal
    Select 6 Meat/Poultry Prepared meats
    Select 7 Produce Dried fruit and bean curd
    Select 8 Seafood Seaweed and fish



     

      ProductID ProductName SupplierID CategoryID QuantityPerUnit UnitPrice UnitsInStock UnitsOnOrder ReorderLevel Discontinued
    Select 11 Queso Cabrales 5 4 1 kg pkg. 21.0000 22 30 30 <input id="ecxContentPlaceHolder1_GridView2_ctl01_0" disabled="disabled" value="on" type="checkbox" />
    Select 12 Queso Manchego La Pastora 5 4 10 - 500 g pkgs. 38.0000 86 0 0 <input id="ecxContentPlaceHolder1_GridView2_ctl01_1" disabled="disabled" value="on" type="checkbox" />
    Select 31 Gorgonzola Telino 14 4 12 - 100 g pkgs 12.5000 0 70 20 <input id="ecxContentPlaceHolder1_GridView2_ctl01_2" disabled="disabled" value="on" type="checkbox" />
    Select 32 Mascarpone Fabioli 14 4 24 - 200 g pkgs. 32.0000 9 40 25 <input id="ecxContentPlaceHolder1_GridView2_ctl01_3" disabled="disabled" value="on" type="checkbox" />
    Select 33 Geitost 15 4 500 g 2.5000 112 0 20 <input id="ecxContentPlaceHolder1_GridView2_ctl01_4" disabled="disabled" value="on" type="checkbox" />
    Select 59 Raclette Courdavault 28 4 5 kg pkg. 55.0000 79 0 0 <input id="ecxContentPlaceHolder1_GridView2_ctl01_5" disabled="disabled" value="on" type="checkbox" />
    Select 60 Camembert Pierrot 28 4 15 - 300 g rounds 34.0000 19 0 0 <input id="ecxContentPlaceHolder1_GridView2_ctl01_6" disabled="disabled" value="on" type="checkbox" />
    Select 69 Gudbrandsdalsost 15 4 10 kg pkg. 36.0000 26 0 15 <input id="ecxContentPlaceHolder1_GridView2_ctl01_7" disabled="disabled" value="on" type="checkbox" />
    Select 71 Flotemysost 15 4 10 - 500 g pkgs. 21.5000 26 0 0 <input id="ecxContentPlaceHolder1_GridView2_ctl01_8" disabled="disabled" value="on" type="checkbox" />
    Select 72 Mozzarella di Giovanni 14 4 24 - 200 g pkgs. 34.8000 14 0 0


     

     
    I need to add something else to "Queso Cabrales" (an extra children table not yet implemented in NorthWind) 
     
    Let's say I want to store additional data for each delivery of "Queso Cabrales" 
     
    e.g.:
     
    Order: Vinet

    "Queso Cabrales" + Feature 1 : "Queso Cabrales" + "Taste"            : Salty
    "Queso Cabrales" + Feature 2 : "Queso Cabrales" + "Smell"            : Rotten egg
    "Queso Cabrales" + Feature 3 : "Queso Cabrales" + "AgingTime"     : 1 week
    "Queso Cabrales" + Feature 4 : "Queso Cabrales" + "Bacteria Type" : Bacterias Ursuppulliesy
     

    Order: Lilas

    "Queso Cabrales" + Feature 1 : "Queso Cabrales" + "Taste"            : Sweet
    "Queso Cabrales" + Feature 2 : "Queso Cabrales" + "Smell"            : Mountain fungus
    "Queso Cabrales" + Feature 3 : "Queso Cabrales" + "AgingTime"     : 2 weeks
    "Queso Cabrales" + Feature 4 : "Queso Cabrales" + "Bacteria Type" : Mongonucleosys
     
    Order:: Folko

    "Queso Cabrales" + Feature 1 : "Queso Cabrales" + "Taste"            : Acid
    "Queso Cabrales" + Feature 2 : "Queso Cabrales" + "Smell"            : Onionish
    "Queso Cabrales" + Feature 3 : "Queso Cabrales" + "AgingTime"     : 6 week
    "Queso Cabrales" + Feature 4 : "Queso Cabrales" + "Bacteria Type" : Bacterias Repytlaiaceous
     
    So Taste, Smell, Aging Time and Bacteria Type is stored in a refrence Entity
     
    I'd like to have in a gridview all this items displayed at once so I can enter data (as in a spreadsheet) and save them all at once
     
    That means I have to show the third table plus an extra TexField to gather all data
     
    Can this be done? Anyone nows how to solve this situation?
    THE OBJECTIVE IS TO SHOW ALL THE DATA EDITABLE AT ONCE, NOT ROW BY ROW
    Monday, July 11, 2011 1:16 PM

All replies

  • User3866881 posted

    Hello:)

    You mean that you want to make a GridView "Excel-Like", which means you can do adding, deleting or modifications and just click one Submit button and all the changes behave?

    Tuesday, July 12, 2011 10:59 PM
  • User1043796333 posted

    Beautifully said, and yes that's the goal but just for the TextBox; even though, there must be a way of passing the data back to the entity to which they belong keeping track of course of the FKs and IDs for saving the data in the children table

    Is that ok?

    Wednesday, July 13, 2011 12:07 AM
  • User3866881 posted

    Hello again:)

    I've done a sample of a simple Excel-Like GridView, if you are interested in that, You can send me your private message and I'd like to share it with you. Your private message should be "Excel-GridView Wanted".

    thx

    Wednesday, July 13, 2011 12:42 AM