Exemple #1
0
        private bool BindGrid(Grid grid, DataView dataView)
        {
            var errors = new List <string>();

            grid.DataSource = dataView.BindGrid(grid, out errors, true);
            if (grid.DataSource != null)
            {
                if (errors.Any())
                {
                    nbEditModeMessage.Text = "INFO: There was a problem with one or more of the filters for this data view...<br/><br/> " + errors.AsDelimited("<br/>");
                }

                grid.DataBind();
                return(true);
            }

            return(false);
        }
        private bool BindGrid(Grid grid, DataView dataView)
        {
            var errors = new List <string>();

            grid.DataSource = dataView.BindGrid(grid, out errors, true);
            if (grid.DataSource != null)
            {
                if (errors.Any())
                {
                    nbEditModeMessage.Text = "INFO: There was a problem with one or more of the filters for this data view...<br/><br/> " + errors.AsDelimited("<br/>");
                }

                if (dataView.EntityTypeId.HasValue)
                {
                    grid.RowItemText = EntityTypeCache.Read(dataView.EntityTypeId.Value).FriendlyName;
                }

                grid.DataBind();
                return(true);
            }

            return(false);
        }
Exemple #3
0
        private bool BindGrid( Grid grid, DataView dataView )
        {
            var errors = new List<string>();
            grid.DataSource = dataView.BindGrid( grid, out errors, true );
            if ( grid.DataSource != null )
            {
                if ( errors.Any() )
                {
                    nbEditModeMessage.Text = "INFO: There was a problem with one or more of the filters for this data view...<br/><br/> " + errors.AsDelimited( "<br/>" );
                }

                if ( dataView.EntityTypeId.HasValue )
                {
                    grid.RowItemText = EntityTypeCache.Read( dataView.EntityTypeId.Value ).FriendlyName;
                }

                grid.DataBind();
                return true;
            }

            return false;
        }