Account Budget Project

What view?

On the period budget tab

What do you want to filter?

I want to filter it main and 2ndhalf

erm… what?.. LoL dude you are killing me hahaha Draw me a picture :slight_smile:

Talk to me like I don’t know what you want to do (cause I don’t)
What’s main and second half?

Again functionally what do you want to do? (in terms of filtering)

Search around for BAQ combo drop downs. You can make the BAQ’s (with parameters to filter) to link to the drop downs, then make a button to link the lines of code that Jose gave you to fill in the actual control.

Like it shows 12 rows because of 12 fiscal periods, when 2nd half is selected I only want it to show 6. I didn’t know if I could filter out epicors base control or if I would have to make my own essentially.

You can filter the dataview… but the question that immediatelly comes to mind…
Why?
There will only ever be 12 periods in this grid… what’s the benefit of filtering down to just 6? Btw you can do that directly on the grid by just turning on filters.

Making 6 ReadOnly is what I was meaning, which I figured out how I can do that. Is there a way to add a manual column onto a a ultragrid’s epibinding? I would like to calculate something and add that column at the end of it where it’s being generated by me and not the datasource if that makes sense.

this will show you how to add a header, then a column, then just leave it unbound and you can loop through the grid and set your values.

1 Like
 public DataTable MakeTableHeaders()
{

    DataTable GLTracker = new DataTable("Data");
    DataColumn GLTrackerData;

    GLTrackerData = new DataColumn();
    GLTrackerData.DataType = System.Type.GetType("System.String");
    GLTrackerData.ColumnName = "PreviousYear";
    GLTrackerData.Caption = String.Format("Previous FY Acutal ({0})", DateTime.Now.Year);
    GLTracker.Columns.Add(GLTrackerData);

    return GLTracker;
}

//Add data to table we created
public static Dataset LoadData() 
{
    DataTable GLTrackerData = MakeTableHeaders();

    //Add empty row
    DataRow dr = GLTrackerData.NewRow();

    //Add data to row
    dr[0] = 1;
    dr[1] = 2;
    dr[2] = 3;

    //Add the datarow to the table
    GLTrackerData.Rows.Add(dr);

    //Accept changes
    GLTrackerData.AcceptChanges();

    //Create new Dataset
    ds = new DataSet();

    //Add table to dataset
    ds.Tables.Add(GLTrackerData);

    //return dataset
    return GLTrackerData;
}

So for testing purposes I just tried to add a column with values 1,2,3. I am getting

Application Error

Exception caught in: System.Data

Error Detail 
============
Message: Cannot find column 1.
Program: System.Data.dll
Method: get_Item

Client Stack Trace 
==================
   at System.Data.DataColumnCollection.get_Item(Int32 index)
   at Script.LoadData()
   at Script.FillDataView()
   at Script.SetGLAccount()
   at Script.cmbChart_AfterCloseUp(Object sender, EventArgs args)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at Infragistics.Win.UltraWinGrid.UltraCombo.OnAfterCloseUp(EventArgs e)
   at Infragistics.Win.UltraWinGrid.UltraCombo.FireEvent(ComboEventIds id, EventArgs e)
   at Infragistics.Win.UltraWinGrid.UltraCombo.FireAfterCloseUp()
   at Infragistics.Win.UltraWinGrid.UltraDropDownBase.OnCloseUp(Object sender, EventArgs e)
   at Infragistics.Win.DropDownManager.Close()
   at Infragistics.Win.DropDownManager.InternalCloseDropDown(Control owner)
   at Infragistics.Win.DropDownManager.CloseDropDown(Control owner)
   at Infragistics.Win.UltraWinGrid.UltraDropDownBase.Infragistics.Win.IValueList.CloseUp()
   at Infragistics.Win.UltraWinGrid.UltraDropDownBase.Infragistics.Win.ISelectionManager.OnMouseUp(MouseMessageInfo& msginfo)
   at Infragistics.Win.SelectionStrategySingle.OnMouseMessage(ISelectableItem item, MouseMessageInfo& msginfo)
   at Infragistics.Win.ControlUIElementBase.ProcessMouseUpHelper(Object sender, MouseEventArgs e)
   at Infragistics.Win.ControlUIElementBase.ProcessMouseUp(Object sender, MouseEventArgs e)
   at System.Windows.Forms.Control.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

This error cannot find column 1? I wish it was as easy as a datagridview to do this.

You should be adding columns, not rows.

I do in MakeTableHeaders()

right, but you are adding data to the existing rows right? You don’t want more rows than already exist right? The example in the link is assuming a blank dataset, yours is already populated.

No at the moment it is just a blank dataset for testing purposes.

so you are only adding one row, so your data set only has row[0]. You have to add the same number or rows as you are adding adding data.

1 Like

Oh duh, i’m sorry the end goal here is to show previous years budget along side the data that it pulls from datasource, Will I have to make my own datagrid and add all that data to the dataset instead of using the dataset and adding a column that isn’t included in the dataset?I guess i’m not getting how this would add a column to a already binded datasource.

Are you actually making changes in here? It would probably be WAAY easier to just make a BAQ and a dashboard.

Yes, this is the end goal:

FYI, you can just copy/paste in an image, you don’t need to use that utility.