Hi,
I added a GridRowEditTemplete and it worked just fine. In one situation. i need to programmatically change the text value for the GridCellProxy control. For example:
I have the user select the OpenFileDialog. I want to store the directory path to the GridCellProxy control:
Me.ugcpImageLocation.Text = "c:\test\steve.txt"
This clearly does not work. Is there another way?
Best, Steve
Hi Steve,
I'm not sure I follow you. What exactly isn't working? I see no reason why you should not be able to set the Text property on one of the proxy controls.
Hi Mike,
This does not work. If you type into the control it works fine. But setting the .text property does nothing.
I'm using NetAdvantage 2010.2.
Hello Mike,
I have attached my sample application. It has a row edit template which is automatically generated.
I have a different version than yours so i was not able to compile your code.
Regards
It looks like you just attached an exe file here. That doesn't do any good, since I can't see the code. I was referring to a sample solution I could open up in Visual Studio and debug.
Sorry About that. Here you go.
In the sample you posted here, nothing is calculated at all, whether you use the RowEditTemplate or not, because there is no UltraCalcManager component on the form.
Once I added one, it works fine for me. When I click on the AddNewRow, the RowEditTemplate pops up. If I then type a number in the first field and tab out of that field, the proxy for Column 2 immediately updates with the number I entered.
Hello,
I did the calulation and it is working fine.
However if I add a Summary Row on it, It is not doing the Calculation on the Formula Column.
I am attaching the Sample Application.
In the Application, I have two Grids Grid1 and Grid2
Grid1 has 2 summary columns for Column0 and Column1
Grid2 has 3 Summary Columns For Column0, Column1 and Column2
In both the Grid Column2 is a Sum of Column1 and Column0.
However when I want to add a new row Grid1 shows the sum of columns 0 and 1
Whereas Grid2 doesnot.
Kindly can you explain why is this happening?
:)
I'm not sure I understand what you mean. I tried this out with the sample you attached here and everything appears to be working correctly for me when I set the FormulaRowSourceIndex to RowIndex.
I added the above code. Now it works fine on the template row. However it stops working on the existing rows...
SO now i add on the template row and it shows the running total. After adding and saving it to the database and next time when i open it shows the total correctly, however it does not do the running total on the existing row.
I've been looking into this issue and it turns out to be pretty complex.
To understand what's happening here, you have to understand some of the deep inner working for the grid and the CalcManager.
In simplest terms, the problem here is caused by the FormulaRowSourceIndex. This property on the grid's Override determines how the CalcManager deal with grid rows. It determines whether visible rows are included in a summary, for one thing, and also how relative references are handled.
By default, this property resolved to VisibleIndex, meaning that invisible rows don't count and are not calculated.
Obviously, the TemplateAddRow in this case is visible, but since it's a fixed add row, it has no meaningful VisibleIndex, so it is treated as not visible until it is committed and becomes a real row.
This begs the question of why the presence of a summary matters. The reason for this is also complicated, but basically, it's just a fluke of how the grid is implemented. In fact, the column in the Fixed AddRow probably should not be calculated when there is no summary, since it still has no meaningful VisibleIndex. It is getting calculated because when there is no summary, the calculations in the grid are deferred so that visible rows are calculated first and this goes directly to the UIElements on the screen.
So... if we were to "fix" this bug, the fix would be to stop the grid from calculating the column in the fixed addrow all the time.
That's obviously not what you want and such a fix would not benefit anyone, so we've decided not to do that unless there's a good reason.
In the mean time, you can very easily work around the issue by setting the FormulaRowSourceIndex to anything other than VisibleIndex.
ov.FormulaRowIndexSource = FormulaRowIndexSource.RowIndex
Hello kbamar83,
I will be happy to help you out with this issue.
I have created case # CAS-102917-N2Q5W9 for you to better assist you with this issue going forward. To access the case, simply log into your IG account and click on My Support Activity.
Please let me know if you have further questions in this matter utilizing the case created.
I'm not sure why it's not working. It looks like this might be a bug in the grid. I'll ask Infragistics Developer Support to create a case for you and write this up for developer review.