Hi,
How can i add an extra row or two after the summaries row in the grid which is bounded to a data-source. The purpose is to print some text on that newly added rows.
Regards,
Sohail Kazmi
There's no built-in way to add rows to the grid after the summary row. But you can have multiple levels of summaries. So if you just need some extra space to put some text, you could add some extra summaries to the same column and they will show up stacked on top of each other.
You could control the text of these 'placeholder' summaries either by making them Custom summaries and using an ICustomSummaryCalculator or by using a CreationFilter to manipulate the UIElements. It depends what you need to display and how much room you need to display it.
Hi Mike,
Thanks for your prompt replies, which are always very helpful. Back to my question, i actually i want to print some text like the following, for signatures / counter signs.
------------------------ ----------------------------- -----------------------------
Accountant GM Director
Kindly with the solution also provide some helpful code for the same.
Sohail Kazmi.
Yes you are right, "the forums mangled the text", actually all the dotted lines are in one line and the text should be places underneath each line respectively. Hope the following would help to understand it better.
---------------- --------------- ---------------
As i have the background of VB6 and new to C#, i have achieved the same with FarPoint spread successfully, and i thing it was very easy doing with it, hare's the sample of the same.
And hare's the sample of ultraWinGrid on which i am working. The lines beneath the summaries are because i have enable to show Empty Row property, and i m not able to control the maxrows for the same, although i limit the no of rows to 15, but still they are many than that.
Kindly guide me for achieving the required task with some example code or the like.
Hi Sohail,
Okay, there are a number of ways you can approach this - but none of them are trivial. It will involve using a CreationFilter and maybe even creating your own derived UIElements type(s). And how you go about this depends a lot on what behavior you want.
For example, the screen shot you have here from FarPoint shows the "Manager" text aligned to the right edge of the grid. Do you always want that there on the right edge of the visible area of the grid? Or should it scroll? If it's scrollable - where does it get positioned? Is there a specific offset? Are you trying to line it up with a column?
It also looks like you need quite a large space for this. That might cause a problem because each summary you add will cause a small performance hit. The grid doesn't know that the summaries are not really needed, so it will try to calculate them, anyway. It looks like you only have a very small number of grid rows here, so that's probably not a big deal.
If you have only a few rows, then I would probably add a bunch of summaries to one column in the grid that doesn't really need any. Then I would use a CreationFilter to trap when the parent element creates those SummaryValueUIElements. Then i would remove all of the unneccessary summary elements and place my own derived UIElement class into the same parent element. My derived element would override PositionChildElements and create other child elements within itself to show the text.
Thanks, actually the screen shot from FarPoint Spread is of print-preview, all i want is just to print those lines of text at print-preview and print time, it doesn't matter if they doesn't show on the grid at form level, but at print-preview and print time they should get displayed just after summaries. If i add those at footer than they get displayed at the bottom of the page and all the space after summaries will be blank, that what i doesn't want.
The answer is still the same. The grid creates it's own print job, so there is no way to insert anything into the printout that isn't already in the grid. So you would still have to use a CreationFilter.
You would have to add the 'fake' summaries into the print layout, so that it does not affect the on-screen grid and then have the CreationFilter apply only to the print layout.
That's really sad to know, and i thing Infragistics team should do some think for it.
As you said
"It also looks like you need quite a large space for this. That might cause a problem because each summary you add will cause a small performance hit."
Most of the time the grid has more than 2 or 3 or even more pages at print time so what would be affect on the performance ?, and isn't that involve more complexity for the developer ?, to hear that in "Yes", that would be really even more sad.
I don't know that i should mention this, but to seek guidance from you i m, that a part from this, programming in .Net, writing more and more code, so whats the difference between .Net and VB6, I think i should switch back to VB6 and or to Delphi.
Hi Dave,
Thanks for your suggestion, and kindly pay my best regards to Mike for those helpful replies.
Hello Sohail,
From looking at what you're trying to do, I believe our Reporting product would be a better solution. I am not all that familiar with that product, though, so I would suggest posting a question in the NetAdvantage Reporting (http://forums.infragistics.com/forums/default.aspx?GroupID=78) forum.
With reference to my previous post i asked "actually i m trying to use the grid as a report source, and i think i m wrong, am i ?, instead i should use reporting tool for that. Kindly guide me."
Actually the generated print with FarPoint, I treat that as a report, the same i m trying with the UltraGrid, am i wrong in my thinking or should i use a reporting tool for that ?, that's what i want to know.
If you are interesting in the Reporting tools, I recommend that you post your question in the reporting forum here:
NetAdvantage Reporting - Infragistics Community
I'm not that familiar with those tools. :)
Hi Mike,With reference to your reply dated 12-09-2011 you mentioned "You are trying to do something here that the grid is simply not designed to do.", actually i m trying to use the grid as a report source, and i think i m wrong, am i ?, instead i should use reporting tool for that. Kindly guide me.