Data bind checkbox status?

2 posts, 0 answers
  1. Dan
    Dan avatar
    202 posts
    Member since:
    May 2006

    Posted 11 Nov 2011 Link to this post

    Is there any way to bind the checked/unchecked status of the listbox checkboxes from the datasource?
    Thanks.
    Dan
  2. Dan
    Dan avatar
    202 posts
    Member since:
    May 2006

    Posted 11 Nov 2011 Link to this post

    I found the answer to this in the documentation, via using the OnItemDataBound event:
    protected void RadListBox1_ItemDataBound(object sender, RadListBoxItemEventArgs e)
    {
         System.Data.Common.DbDataRecord dataSourceRow = (System.Data.Common.DbDataRecord)e.Item.DataItem;
         e.Item.Checked = (bool)dataSourceRow["account_status_access"];
    }
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top