当前位置: 首页>>代码示例>>C#>>正文


C# GridItem类代码示例

本文整理汇总了C#中GridItem的典型用法代码示例。如果您正苦于以下问题:C# GridItem类的具体用法?C# GridItem怎么用?C# GridItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GridItem类属于命名空间,在下文中一共展示了GridItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ShouldDecorate

 public override bool ShouldDecorate(GridItem gridItem)
 {
     return gridItem.Type != GridItemType.EmptyRow &&
            gridItem.Type != GridItemType.GroupRow &&
            gridItem.Type != GridItemType.DetailRow &&
            (gridItem.State & GridItemStates.Master) == GridItemStates.Master;
 }
开发者ID:vialpando09,项目名称:RallyPortal2,代码行数:7,代码来源:GridMasterRowBuilderDecorator.cs

示例2: AsEditRow

 private void AsEditRow(GridItem item, bool current)
 {
     if (current && creatorData.Mode == GridItemMode.Edit)
     {
         item.Type = GridItemType.EditRow;
     }
 }
开发者ID:jstevenson81,项目名称:wodgeaux,代码行数:7,代码来源:GridItemCreator.cs

示例3: ShouldDecorate

 public override bool ShouldDecorate(GridItem gridItem)
 {
     return (gridItem.State & GridItemStates.Selected) == GridItemStates.Selected
             && gridItem.Type != GridItemType.DetailRow
            && gridItem.Type != GridItemType.EmptyRow &&
            gridItem.Type != GridItemType.GroupRow;
 }
开发者ID:hazzik,项目名称:telerikaspnetmvc,代码行数:7,代码来源:GridSelectedRowBuilderDecorator.cs

示例4: CreateItem

        public GridItem CreateItem(object dataItem)
        {
            var item = new GridItem
            {
                DataItem = dataItem,
                State = GridItemStates.Default,
                Type = GridItemType.DataRow
            };

            if (dataItem is IGroup)
            {
                AsGroupRow(item);
            }
            else
            {
                var current = comparer.KeysEqualTo(dataItem);

                AsEditRow(item, current);

                AsSelected(item, current);

                AsMaster(item);
            }

            return item;
        }
开发者ID:jstevenson81,项目名称:wodgeaux,代码行数:26,代码来源:GridItemCreator.cs

示例5: GridMenu

        public GridMenu(int xloc, int yloc, int cols, Texture2D texture, SoundBank soundbank)
        {
            m_xpos = xloc;
            m_ypos = yloc;
            m_columns = cols;
            m_texture = texture;
            m_soundbank = soundbank;

            Console.WriteLine("Starting Drawing at [" + xloc + ", " + yloc + "]");

            m_x = -1;
            m_y = 0;
            m_rows = 1;
            m_num_items = 0;
            m_selected_x = -1;
            m_selected_y = -1;

            m_list = new List<SelectionItem>();
            m_grid = new GridItem[m_rows, m_columns];

            for (int i = 0; i < m_columns; i++)
            {
                m_grid[m_rows-1, i] = new GridItem();
                m_grid[m_rows-1, i].m_selectable = false;
            }
        }
开发者ID:andressbarajas,项目名称:Pong,代码行数:26,代码来源:GridMenu.cs

示例6: FormatGridItem

        protected void FormatGridItem(GridItem item)
        {
            item.Style["color"] = "#000";

            if (item is GridDataItem)
            {
                item.Style["vertical-align"] = "middle";
                item.Style["text-align"] = "center";
            }

            switch (item.ItemType) //Mimic RadGrid appearance for the exported PDF file
            {
                /* case GridItemType.Item: item.Style["background-color"] = "#4F4F4F"; break;

                 case GridItemType.AlternatingItem: item.Style["background-color"] = "#494949"; break;

                 case GridItemType.Header: item.Style["background-color"] = "#2B2B2B"; break;

                 case GridItemType.CommandItem: item.Style["background-color"] = "#000000"; break;
                 */
            }

            if (item is GridCommandItem)
            {
                item.PrepareItemStyle();  //needed to span the image over the CommandItem cells
            }
        }
开发者ID:dennis-vl,项目名称:dennis-vl,代码行数:27,代码来源:UsageReport.aspx.cs

示例7: InitializeCell

 public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem)
 {
     base.InitializeCell(cell, columnIndex, inItem);
     if (inItem is GridHeaderItem && !String.IsNullOrEmpty(HeaderText))
     {
         cell.Text = Localization.GetString(string.Format("{0}.Header", HeaderText), LocalResourceFile);
     }
 }
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:8,代码来源:DnnGridDateTimeColumn.cs

示例8: SetGridEntity

        public void SetGridEntity(GridItem gridItem)
        {
            GridItem = gridItem;

            if (gridItem != null)
            {
                gridItem.Owner = this;
            }
        }
开发者ID:HungryAnt,项目名称:Game2048,代码行数:9,代码来源:GridHolder.cs

示例9: Should_insert_as_first_cell_if_not_groups

 public void Should_insert_as_first_cell_if_not_groups()
 {
     var gridItem = new GridItem { Type = GridItemType.DataRow };
     var builder = new Mock<IGridRowBuilder>();
     builder.Setup(b => b.CreateRow()).Returns(new HtmlElement("tr"));
     decorator.Decorate(builder.Object, gridItem, true);
     var node = decorator.CreateRow();
     node.Children.Count.ShouldEqual(1);
 }
开发者ID:hazzik,项目名称:telerikaspnetmvc,代码行数:9,代码来源:GridDetailRowBuilderDecoratorTests.cs

示例10: GetChildItems

 public override IEnumerable<GridItem> GetChildItems(GridItem item)
 {
     using (CmsContext.Editing)
     {
         var id = new Id(item.Id);
         var entity = CmsService.Instance.GetItem<Entity>(id);
         return entity.GetChildren<Entity>().Select(GetGridItem);
     }
 }
开发者ID:Psolow,项目名称:Umbraco-Public,代码行数:9,代码来源:UmbracoGridModuleProvider.cs

示例11: CreateBuilder

        public IGridRowBuilder CreateBuilder(GridRenderingData renderingData, GridItem item)
        {
            var creator = BuilderRegistry[item.Type];

            ExecuteRowCallback(item, renderingData.Callback);

            var gridRowBuilder = creator(renderingData, item);

            return decoratorProvider.ApplyDecorators(gridRowBuilder, item, renderingData.HasDetailTemplate);
        }
开发者ID:akhuang,项目名称:Zing,代码行数:10,代码来源:GridRowBuilderFactory.cs

示例12: CreateFooterBuilder

        public virtual IGridRowBuilder CreateFooterBuilder(GridRenderingData renderingData)
        {
            var builder = new GridRowBuilder(renderingData.Columns.Select(column => cellBuilderFactory.CreateFooterCellBuilder(column, renderingData.AggregateResults )));

            var item = new GridItem
            {
                GroupLevel = renderingData.GroupMembers.Count(),
                Type = GridItemType.FooterRow
            };

            return decoratorProvider.ApplyDecorators(builder, item, renderingData.HasDetailTemplate);
        }
开发者ID:akhuang,项目名称:Zing,代码行数:12,代码来源:GridRowBuilderFactory.cs

示例13: InitializeCell

        public override void InitializeCell(System.Web.UI.WebControls.TableCell cell, int columnIndex, GridItem inItem)
        {
            if (Initializable(inItem.ItemType))
            {
                base.InitializeCell(cell, columnIndex, inItem);
                return;
            }

            object dataItem = inItem.DataItem;
            string value = null;
            if (null != dataItem)
            {
                DataRowView row = dataItem as DataRowView;
                if (null != row)
                {
                    value = row[base.DataField].ToString();
                }
                else
                {
                    PropertyInfo pi = dataItem.GetType().GetProperty(base.DataField);
                    if (null != pi)
                    {
                        object selectedValue = pi.GetValue(dataItem);
                        if (null != selectedValue)
                        {
                            TypeCode targetDataType = this.TargetDataType;
                            if (targetDataType != TypeCode.Empty)
                            {
                                selectedValue = Convert.ChangeType(selectedValue, targetDataType);
                            }
                            value = selectedValue.ToString();
                        }
                    }
                }
            }


            TextBox ctrl = new TextBox();
            ctrl.TextMode = this.TextMode;
            ctrl.ID = "txt" + base.UniqueName;
            ctrl.ReadOnly = base.ReadOnly;
            if (this.ControlWidth != Unit.Empty)
                ctrl.Width = this.ControlWidth;
            if (this.ControlHeight != Unit.Empty)
                ctrl.Height = this.ControlHeight;
            if (null != value)
            {
                ctrl.Text = String.Format("{0}", value);
            }

            cell.Controls.Add(ctrl);
        }
开发者ID:ionixNet,项目名称:ionix.UI,代码行数:52,代码来源:GridEditColumnText.Override.cs

示例14: Should_insert_cell_after_group_cell_if_grouped

        public void Should_insert_cell_after_group_cell_if_grouped()
        {
            var gridItem = new GridItem { Type = GridItemType.DataRow, GroupLevel = 1 };
            var builder = new Mock<IGridRowBuilder>();
            var container = new HtmlElement("tr");
            new HtmlElement("td").AppendTo(container);
            builder.Setup(b => b.CreateRow()).Returns(container);

            decorator.Decorate(builder.Object, gridItem, true);
            var node = decorator.CreateRow();
            node.Children.Count.ShouldEqual(2);
            node.Children[1].Attribute("class").ShouldEqual(UIPrimitives.Grid.HierarchyCell);
        }
开发者ID:hazzik,项目名称:telerikaspnetmvc,代码行数:13,代码来源:GridDetailRowBuilderDecoratorTests.cs

示例15: CreateGroupFooterItem

 public GridItem CreateGroupFooterItem(object dataItem)
 {
     if (creatorData.ShowGroupFooter)
     {
         var groupFooter = new GridItem
         {
             GroupLevel = creatorData.GroupsCount,
             DataItem = dataItem,
             Type = GridItemType.GroupFooterRow
         };
         return groupFooter;
     }
     return null;
 }
开发者ID:jstevenson81,项目名称:wodgeaux,代码行数:14,代码来源:GridItemCreator.cs


注:本文中的GridItem类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。