hello.
please look at the Image. How to formula the column by part1 and part2? thanks!
Hello psky,
Looking at your table I can see that you are referring to string columns. You could hook to the 'InitializeRow' event of the 'UltraGrid' and assign the string values of the corresponding cells to the formula cell:
private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
{
e.Row.Cells[2].Value = e.Row.Cells[0].Value.ToString() + e.Row.Cells[1].Value.ToString();
}
Please feel free to let me know if a question about our tool set comes up on your mind.
psky,
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.
HOW TO FORMULA BY PART12? WHEN PART12 CHANGE???
Hello,
Could you please review the sample attached to this post and see if it meets your requirements. Please feel free to let me know if I misunderstood you or if you have any other questions.
This is not what I want, what I want is the last line by PART12 grouped totals. TKS
I can not upload the zip. please update your dataSource.
// // ultraDataSource1 // ultraDataColumn4.DataType = typeof(short); ultraDataColumn5.DataType = typeof(ushort); this.ultraDataSource1.Band.Columns.AddRange(new object[] { ultraDataColumn1, ultraDataColumn2, ultraDataColumn3, ultraDataColumn4, ultraDataColumn5}); this.ultraDataSource1.Rows.AddRange(new object[] { new Infragistics.Win.UltraWinDataSource.UltraDataRow(new object[] { ((object)("part1")), ((object)("A")), ((object)("part2")), ((object)("S")), ((object)("part4")), ((object)(((short)(5))))}), new Infragistics.Win.UltraWinDataSource.UltraDataRow(new object[] { ((object)("part1")), ((object)("B")), ((object)("part2")), ((object)("S")), ((object)("part4")), ((object)(((short)(10))))}), new Infragistics.Win.UltraWinDataSource.UltraDataRow(new object[] { ((object)("part1")), ((object)("C")), ((object)("part2")), ((object)("S")), ((object)("part4")), ((object)(((short)(5))))}), new Infragistics.Win.UltraWinDataSource.UltraDataRow(new object[] { ((object)("part1")), ((object)("A")), ((object)("part2")), ((object)("S")), ((object)("part4")), ((object)(((short)(5))))}), new Infragistics.Win.UltraWinDataSource.UltraDataRow(new object[] { ((object)("part1")), ((object)("A")), ((object)("part2")), ((object)("T")), ((object)("part4")), ((object)(((short)(35))))}), new Infragistics.Win.UltraWinDataSource.UltraDataRow(new object[] { ((object)("part1")), ((object)("B")), ((object)("part2")), ((object)("T")), ((object)("part4")), ((object)(((short)(20))))}), new Infragistics.Win.UltraWinDataSource.UltraDataRow(new object[] { ((object)("part1")), ((object)("B")), ((object)("part2")), ((object)("T")), ((object)("part4")), ((object)(((short)(25))))}), new Infragistics.Win.UltraWinDataSource.UltraDataRow(new object[] { ((object)("part1")), ((object)("C")), ((object)("part2")), ((object)("S")), ((object)("part4")), ((object)(((short)(15))))})});
I am not sure what you want exactly. If you want to sum by 'part12' in the last visible row, how would you want to achieve it? One of the columns is of type string and the other is of type integer as far as I can see.
Hi,
If you need any additional assistance don’t hesitate to ask.
Regards
Here is the sample
Hello Psky,
Sorry for the delay. You should make small modification in protected override Infragistics.Win.CalcEngine.UltraCalcValue Evaluate() method. I used our previous sample and I made changes in this method. Using a LINQ you could get desired results. For example:
var w = Rows.Where(z => z.Index <= gg && z.GetCellText(z.Band.Columns[0]) == FilterValue).Sum(s => Convert.ToDecimal(s.GetCellText(col)));
Please take a look at the attached sample for more details and let me know if you have any questions.
Hello,Georgi,
Where to go? Can you help me make a similar custom function?
Oh,I know.
can you help me to create a sample ?