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
Hi Mike,
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.
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.
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.
---------------- --------------- ---------------
Accountant GM Director
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.
Sohail Kazmi.
By the way, it looks like the forums mangled the text you put in here, so it's hard to see what you are actually trying to do.
I might be able to offer more specific advice if you posted a screen shot or a mockup of what you are trying to achieve. To attach a screen shot to your post, just go to the Options tab and attach an image file. It will show up at the bottom of your post.
There's no easy way to do this. What I would do is add a couple of extra summaries to the grid to create a couple of extra lines. Then I would use a CreationFilter to remove the extra summaries and use the same CreationFilter to place some TextUIElements into the space created by the extra summaries.
I don't have any samples of this, though, and it's really much too big a job to just whip something up quickly.
If you have not used a CreationFilter before, then I recommend that you search these forums and you will find lots of sample CreationFilters to help you learn how they work.
Also, I strongly recommend that you get the Infragistics UIElementViewer Utility. It will be invaluable.