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.
I tried this out in a very simple case and I get the same results. Setting the text of the proxy does not do anything.
I'm not sure why that is, but I found that setting the Value on the grid cell will work and it also updates the proxy control.
this.ultraGrid1.ActiveRow.Cells["ImageLocation"].Value = "c:\test\steve.txt";
Mike,
Thank you for the work around.
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.
Hello Mike,
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.
Regards
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.