does not contain a definition for 'ValidateKeyFields'
Remove the s from Fields
Yup just tested it, this works perfectly
private void epiButtonC1_Click(object sender, System.EventArgs args)
{
// ** Place Event Handling Code Here **
oTrans.ValidateKeyField("1100|00|10");
oTrans.KeyField="1100|00|10";
}
So if you can get via your dropdowns a valid GL Account, then calling the above code will fill the box and make it do what you want.
Yes that works! Can you filter that view that it shows? or would I have to make my own view, and getRows?
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
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.
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.