コード例 #1
0
        public void do_nothing_if_using_explicit_formatters_that_are_not_the_underscores()
        {
            theColumn.Editor(SlickGridEditor.Text);
            theColumn.Formatter(SlickGridFormatter.TypeFormatter);

            theColumn.As <IGridColumn>().WriteTemplates(theTemplates);
            theTemplates.AssertWasNotCalled(x => x.AddElement(theColumn.Accessor, ElementConstants.Display));
            theTemplates.AssertWasNotCalled(x => x.AddElement(theColumn.Accessor, ElementConstants.Editor));
        }
コード例 #2
0
        public void override_editor()
        {
            var column = new ColumnDefinition <ColumnDefTarget, string>(x => x.Name, theProjection);

            column.Editor(SlickGridEditor.Text);

            writeColumn(column).ShouldContain("editor: " + SlickGridEditor.Text.Name);
        }
コード例 #3
0
        public void read_only_sets_editable_off()
        {
            var builder = new StringBuilder();

            var column = new ColumnDefinition <ColumnDefTarget, string>(x => x.Name, theProjection);

            column.Editor(SlickGridEditor.Text);
            column.As <IGridColumn>().WriteColumn(builder, AccessRight.ReadOnly);

            builder.ToString().ShouldNotContain("editor:");
        }
コード例 #4
0
        public void override_editor_by_name()
        {
            var column = new ColumnDefinition<ColumnDefTarget, string>(x => x.Name, theProjection);
            column.Editor(SlickGridEditor.Text.Name);

            writeColumn(column).ShouldContain("editor: " + SlickGridEditor.Text.Name);
        }
コード例 #5
0
        public void read_only_sets_editable_off()
        {
            var builder = new StringBuilder();

            var column = new ColumnDefinition<ColumnDefTarget, string>(x => x.Name, theProjection);
            column.Editor(SlickGridEditor.Text);
            column.As<IGridColumn>().WriteColumn(builder, AccessRight.ReadOnly);

            builder.ToString().ShouldNotContain("editor:");
        }