none
Select bit field in LINQ RRS feed

  • Question

  • hi

    I am new to LINQ .Please help me to fill my datagridview . 

    I am trying to bind one datadridview . I want to display my Datagridview as 

    sel                Item Name           Qty                  

    checkbox       TextBox              Textbox

    Sel,Item Name ,Qty these are column header . 

    How can i write this in LINQ

    select convert(bit,0) Sel,Item.ItemName,"Qty" from Item 

    Thanks 

    DeepuJose

    Wednesday, June 4, 2014 10:00 AM

Answers

  • Something like:

    var q = from i in db.Items
            select new { Sel = false, i.ItemName, i.Qty };
    

    David


    David http://blogs.msdn.com/b/dbrowne/

    Wednesday, June 4, 2014 4:20 PM