RadListView Created and Binding from Code Behind

2 posts, 0 answers
  1. Susi
    Susi avatar
    40 posts
    Member since:
    Jul 2012

    Posted 14 Nov 2012 Link to this post

    Dear ALL,

    How to create and bind RadListView from code behind like Pege_load event and  all my data's are available in DataTable.how to bind and implement fully by code behind page..

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 14 Nov 2012 Link to this post


    Try the following code to bind listview from code behind.
    protected void Page_Load(object sender, EventArgs e)
        RadListView listview = new RadListView();
        SqlConnection con1 = new SqlConnection(WebConfigurationManager.ConnectionStrings["NorthwindConnectionString3"].ConnectionString);
        SqlCommand cmd = new SqlCommand("SELECT top 5 * FROM [Employees]", con1);
        SqlDataAdapter ad = new SqlDataAdapter(cmd);
        DataSet ds = new DataSet();
        listview.DataSource = ds;

    Also check this documentation and demo for more.

  3. DevCraft R3 2016 release webinar banner
Back to Top