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 mean in the Row Edit Template, I have four ultragridcellproxy which binds to the four columns. The Fourth Column is a Formula Field which is a sum of columns 2 and Column 3. It Updates the Column 4 when I Click OK on the Row Edit Template. But When I add a New Template I need the Fourth Column to Display the Value as soon as I type values in the Coulmn 2 and Column 3.
Regards
I tried this out in a simple sample project and it seems to work fine for me. There are a lot of variables here, though. In my case, I used a bound column and I let the RowEditTemplate auto-generate the proxies for me.
I imagine if you are using an unbound column or you added the proxy to the RowEditTemplate yourself, it might be tricky to get everything hooked up correctly. But without more information, I'm not sure why it's not working for you.
I have posted my sample project here just as a reference. Perhaps having a working sample might point you in the right direction.
If not, maybe you can post a small sample here demonstrating what's not working for you.
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.
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.
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.