RadGrid and Linq - How To Get Code Behind Working

Thread is closed for posting
2 posts, 0 answers
  1. Alan Scott
    Alan Scott avatar
    1 posts
    Member since:
    Jul 2009

    Posted 21 Jul 2009 Link to this post

    I have a nice presentation form that displays all the data within a table automatically (easily done with the component). However, now I want to be able for users to query the database table and click the query button and have the table updated.

    Below is the code I am using:

    EAIDataClassesDataContext db = new EAIDataClassesDataContext();
                var hl7dTypes = from p in db.REF_HL7_DATATYPEs where p.DATATYPE.Contains(RadTextBox1.Text.Trim()) select p;
                //LinqDataSource.Equals == hl7dTypes;
                //RadGrid1.DataSource = hl7dTypes;

    As you can tell I have tried the commented out options and all either do not work or cause a page rendering error. How can I get this to work?
  2. Sebastian
    Sebastian avatar
    9934 posts

    Posted 22 Jul 2009 Link to this post

    Hello Alan,

    I think that the information from the following online resources will help you use LINQ queries from the code-behind to bind your grid instance to data:


    Best regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top