Exemple #1
0
    ///
    /// <summary>
    /// 添加cell到这一行
    /// </summary>
    /// <param name="source">cell的数据</param>
    /// <param name="index">数据列表的下标</param>
    /// <param name="viewWidth">视口宽度</param>
    /// <param name="lineHeightDelta">行高度</param>
    /// <returns></returns>
    public bool AddCell(GridDataSource source, int index, RecycleGrid grid, ref float lineHeightDelta)
    {
        float ft = posx + source.wllt.width;

        if (list.Count == 0)
        {
            ft = ft + grid.padding.left;
        }
        else
        {
            ft = ft + grid.padding.spacex;
        }
        if (ft > grid.ViewWidth)
        {
            return(false);
        }
        else
        {
            posx = ft;
            ShowCellData scd = obtainShowCellData(posx - source.wllt.width, childLineY, index);
            scd.nType       = source.templateId;
            lineHeightDelta = Mathf.Max(lineHeight, source.wllt.height);
            lineHeight      = lineHeightDelta;
            endIndex        = index;
            list.Add(scd);
            return(true);
        }
    }
Exemple #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     // Get the table entity.
     _table = GridDataSource.GetTable();
     // Assign title dinamically.
     Title = string.Concat("Applying the DisplayFormatAttribute to ",
                           _table.DisplayName, " Table");
 }
Exemple #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     // Get the table entity.
     _table = GridDataSource.GetTable();
     // Assign title dynamically.
     Title = string.Concat("Applying the DataTypeAttribute to ",
                           _table.Columns[9].DisplayName, " Data Field");
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        // Get the table entities.
        _table1 = GridDataSource.GetTable();
        _table2 = GridDataSource2.GetTable();

        // Assign title dynamically.
        Title = string.Concat("Customize Validation of the ",
                              _table1.Name, " and ", _table2.Name, " Tables");
    }
 public JsonResult GetOrderList()
 {
     using (var _Entity = new GamesEntities())
     {
         var            lst  = _Entity.OrderVs.OrderByDescending(o => o.Date).ToList();
         GridDataSource gobj = new GridDataSource
         {
             data   = lst.ToList(),
             length = lst.Count
         };
         return(Json(gobj, JsonRequestBehavior.AllowGet));
     }
 }
Exemple #6
0
        public void render(GridDataSource gds)
        {
            Debug.Log("render " + dataIndex);

#if UNITY_EDITOR
            Transform tmp = rect.transform.Find("num");
            if (tmp != null)
            {
                Text tx = tmp.GetComponent <Text>();
                tx.text = dataIndex.ToString();
            }
#endif
        }
Exemple #7
0
    public void renderCell(LineData.ShowCellData showData)
    {
        LineData.ShowCellData scd = showData;
        if (scd.Item == null)
        {
            scd.Item = itemTemplate.findItem(scd.nType);
            scd.Item.transform.SetParent(content);
            scd.Item.SetActive(true);
        }
        scd.renderPos();
        GridDataSource gds = dataLocator.source[scd.dataIndex];

        scd.render(gds);
    }