private void BindData()
    {
        CmsDeviceConfigurationCriteria criteria = new CmsDeviceConfigurationCriteria();
        List<CmsDeviceConfigurationData> cDeviceList;

        criteria.AddFilter(Ektron.Cms.Device.CmsDeviceConfigurationProperty.Id, CriteriaFilterOperator.GreaterThan, "1");
        criteria.OrderByField = Ektron.Cms.Device.CmsDeviceConfigurationProperty.Order;
        criteria.OrderByDirection = EkEnumeration.OrderByDirection.Ascending;

        cDeviceList = cDevice.GetList(criteria);

        if (cDeviceList.Count > 0)
        {
            OrderList.Size = (cDeviceList.Count < 20 ? cDeviceList.Count : 20);

            foreach (CmsDeviceConfigurationData cItem in cDeviceList)
            {
                OrderList.Items.Add(new ListItem(cItem.Name, cItem.Id.ToString() + "|" + cItem.Order));
            }
            OrderList.SelectedIndex = 0;
        }
    }
    private void BindData()
    {
        CmsDeviceConfiguration cDevice = new CmsDeviceConfiguration(_ContentApi.RequestInformationRef);
        CmsDeviceConfigurationCriteria criteria = new CmsDeviceConfigurationCriteria();
        List<CmsDeviceConfigurationData> cDeviceList;
        StringBuilder sBuilder = new StringBuilder();

        criteria.AddFilter(Ektron.Cms.Device.CmsDeviceConfigurationProperty.Id, CriteriaFilterOperator.GreaterThan, 1);
        criteria.OrderByField = Ektron.Cms.Device.CmsDeviceConfigurationProperty.Order;
        criteria.OrderByDirection = EkEnumeration.OrderByDirection.Ascending;
        cDeviceList = cDevice.GetList(criteria);

        System.Web.UI.WebControls.BoundColumn colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "Delete";
        colBound.ItemStyle.Width = Unit.Percentage(3);
        colBound.HeaderStyle.CssClass = "left";
        colBound.ItemStyle.CssClass = "left";
        colBound.HeaderText = _MessageHelper.GetMessage("lbl Delete");
        DeviceListGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "Device";
        colBound.HeaderStyle.CssClass = "left";
        colBound.ItemStyle.CssClass = "left";
        colBound.HeaderText = _MessageHelper.GetMessage("lbl Device");
        DeviceListGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "Models";
        colBound.HeaderStyle.CssClass = "center";
        colBound.ItemStyle.CssClass = "center";
        colBound.HeaderText = _MessageHelper.GetMessage("lbl Device Models");
        DeviceListGrid.Columns.Add(colBound);

        DataTable dt = new DataTable();
        DataRow dr;

        dt.Columns.Add(new DataColumn("Delete", typeof(string)));
        dt.Columns.Add(new DataColumn("Device", typeof(string)));
        dt.Columns.Add(new DataColumn("Models", typeof(string)));

        for (int i = 0; i <= cDeviceList.Count - 1; i++)
        {
            sBuilder = new StringBuilder();
            dr = dt.NewRow();
            dr[0] = "<input type=\"checkbox\" name=\"deleteConfigurationId\" value=\"" + cDeviceList[i].Id + "\">";
            dr[1] = "<a href=\'settings.aspx?action=viewdeviceconfiguration&id=" + cDeviceList[i].Id + "\' title=\'" + EkFunctions.HtmlEncode(cDeviceList[i].Name) + "\'>" + EkFunctions.HtmlEncode(cDeviceList[i].Name) + "</a>";

            foreach (string cModel in cDeviceList[i].Models)
            {
                sBuilder.Append(cModel).Append(",");
            }
            dr[2] = sBuilder.ToString().TrimEnd(new char[] { ',' });

            dt.Rows.Add(dr);
        }
        DataView dv = new DataView(dt);
        DeviceListGrid.DataSource = dv;
        DeviceListGrid.DataBind();
    }