예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        NavBarItemTemplateContainer container = this.NamingContainer as NavBarItemTemplateContainer;
        string groupIndex = container.Item.Group.Index.ToString();

        ASPxButton1.ClientSideEvents.Click = "function(s, e){OnButtonClick(s, e, true, " + groupIndex + ")}";
        ASPxButton2.ClientSideEvents.Click = "function(s, e){OnButtonClick(s, e, false, " + groupIndex + ")}";
    }
    public void InstantiateIn(Control container)
    {
        NavBarItemTemplateContainer c = (NavBarItemTemplateContainer)container;
        PivotGridField field          = (PivotGridField)c.Item.DataItem;

        if (field == null)
        {
            return;
        }
        Table        table  = new Table();
        ScriptHelper helper = new ScriptHelper(pivotGrid);

        table.ID           = helper.GetHeaderID(pivotGrid.Data.GetFieldItem(field));
        table.ClientIDMode = ClientIDMode.AutoID;
        table.Attributes.Add("onmousedown", helper.GetHeaderMouseDown());
        TableRow row = new TableRow();

        table.Rows.Add(row);
        TableCell cell = new TableCell();

        row.Cells.Add(cell);
        cell.Text = field.ToString();
        c.Controls.Add(table);
    }
예제 #3
0
    protected string GetGroupIndex(NavBarItemTemplateContainer container)
    {
        string index = container.Item.Group.Index.ToString();

        return(index);
    }
예제 #4
0
    protected string GetItemClientName(NavBarItemTemplateContainer container)
    {
        string name = "Item_" + container.Item.Group.Index.ToString() + "_" + container.Item.Index.ToString();

        return(name);
    }