Adf.Web.Binding.DataGridBinder.Bind C# (CSharp) Method

Bind() public method

Binds the 'DataSource' property of the specified System.Web.UI.WebControls.DataGrid with the specified list.
The 'DataKeyField' property of the specified System.Web.UI.WebControls.DataGrid is set to 'ID'.
public Bind ( object control, IEnumerable values ) : void
control object The , the 'DataSource' /// property of which is to bind to.
values IEnumerable The list to bind.
return void
        public virtual void Bind(object control, IEnumerable values, params object[] p)
        {
            if (values == null) return;

            DataGrid grid = control as DataGrid;
            if (grid == null) return;

            grid.DataSource = values;
            grid.DataKeyField = "ID";
            grid.DataBind();

            SetPaging(grid, values.Count());
        }

Same methods

DataGridBinder::Bind ( object control, object values ) : void
DataGridBinder::Bind ( object control, object value, PropertyInfo pi ) : void
DataGridBinder