Working on a project, where I generate graphs dynamically using xtra reports of the dev express suit, and am not bidning the graph to a data source. When I use a datasource to produce labels to test them out, the
Detail.PageBreak = DevExpress.XtraReports.UI.PageBreak.AfterBand;
works. But if I am generating the labels without a data source, this doesn't work. Does anyone have a clue?
Source:forcing a conditional page break when a label text changes value
To accomplish this task you can either add a GroupFooter band and set the GroupFooter.PageBreak to AfterBand. or put a XRPageBreak control, handle the Detail.BeforePrint and adjust the visibility of the XRPageBreak as you need.
To get processing row you need to use the XtraReport.GetCurrentRow() method.
Please try this solution, and let us know the results.
You can force a page break on certain conditions. Reference link has an example at the bottom as attachment..
You can also use the Before_Print event to accomplish this task.
Hope this help..
Related
I need to find out what page a control is on after all the report data has been added. Depending on how much data has been added above (e.g. table rows), the control could be on page 1, 2 or even 3. The reason for needing the page number is to find out if that control straddles two pages. If it does then I want to nudge it down enough to make sure its not split over two pages
As the control in question is dynamically added during the ReportStart event I can't tell what page it will ultimately end up on as the report data hasn't been added yet.
I'm pretty sure i'll be able to do this in the Detail_BeforePrint event as it fires for each page of the report and this.PageNumber gives the current page.
Inside Detail_BeforePrint I can find the control using:
var myControl= this.Detail.Controls["MyControl"];
But myControl does not have any properties that might suggest what page its on. Can anyone help?
I'm using Active Reports 6 and Visual Studio 2010
What you're asking for is not possible to find out. You can retrieve the pageNumber from the report but that would tell you the last page the control will print to. The control does not have a page number because it is possible for it to print on more than one page.
However with that said, it is possible to get the effect you want using KeepTogether property. if you set it to true, AR will always try to keep the control on a single page and move it automatically for you. And it handles the case where the length of the control might more than a single page so it wouldn't need to be moved since that would have no effect. Hope this helps.
I need a search panel similar to the findpanel in devexpress. FindPanel is a bit slow: it searches all the visible columns and removes the not-fitting-the-description rows from the xtragrid. If you know a way to override these unwanted behaviors or another component that does the same job without the previous behaviors please do share. If not...
I need to create a panel, with one textedit, and two simplebuttons in it. And since I am going to use this same component with different xtragrids over and over again, I need to make it a standalone component, and be able to point towards the xtragrid from the properties window. As if its a standard component.
So how do I do that ? If you have an entire example project it would be perfect, but if not, I am just looking for some pointers.
Thank you...
There is a property to specify a list of columns for search by: ColumnViewOptionsFind.FindFilterColumns Property
You also can create a standalone user control with the public GridView property. This property allows you to select GridView instances in the designer. To apply the search expression programmatically, use the ColumnView.ApplyFindFilter Method
I have a listview in wpf and i am swapping two items index..
the swapping must be visible to the user.
i tried giving thread delay..
it didnt work
How to do that..
If I was going to do this I would delete the list view and lock it up where you can't use it again. Then code whatever your list view was outputting in C# using whatever you use to query your database(I think LINQ to SQL is the most robust solution right now) and then use a string builder to construct the html. This way you can assign a id to each div and append an incrementing number to the end of the id. Finally you could write your javascript and use the id's. Here is a link that shows how to build a gridview without using a gridview control.
See the first answer to the question in this link: How to show pop up menu from database in gridview on each gridview row items?
I am not sure whether it will work for your problem or not.
I think you need some kind of animation there. If it is web project, you can use jQuery animation to do that.
I have a form which has a Combo Box Control. I have selected the drop down style property to DropDown. I have also set the DropDown Width to 250.
I have set the auto complete mode to suggest and the auto complete source to listitems.
it works absolutely fine when i click on the drop down. but when i type in somethin, the auto complete mode activates a drop down which has a small width.
any help appreciate.
i wanna know how to increase the width of the auto complete drop down via code so that the list items are viewed properly.
I am using C#
Yes, this is by design. ComboBox uses the SHAutoComplete API function to implement the autocomplete feature. Note the declaration, the function takes a handle to the text box portion of the ComboBox. As such, it has no idea that it is actually providing autocomplete info for a ComboBox instead of a TextBox. Accordingly, there is nothing it can do to compensate for the non-standard dropdown width you use.
Well, that explains why it doesn't work. Fixing it is technically possible but quite ugly. You would have to run code in the KeyUp event and use EnumTheadWindows() to find the autocomplete window handle. Then you can use SetWindowPos() to make it larger. There is already code similar to this in ComboBox.cs (AutoCompleteDropDownFinder.FindDropDowns), use the Reference Source or Reflector to help you get this right. Good luck!
EDIT:
I removed my first suggestion to come up with a new link:
Actually its possible to control the width of the Autocomplete dropdown box, but its a little bit tricky and involves using win API extensively ...
Combobox too small when doing Suggest
Maybe this article that I wrote on Codeproject might help you in relation to the combo-dropdown boxes and a way that I hacked this...
I'm having problems with my project once again :(
The front end is C#
I need to support multiline querying like MS SQL server and when these queries are executed, naturally there are going to be multiple result sets.
Getting the datatables respective to the results is not a problem, but how do i make it appear like its done in MS SQL server. One result set below the other and with a scroll bar?
Should i bind it to a datagrid? If so how can i bind multiple tables to a datagrid ? and will it generate the scrollbars and the columns automatically?
If i am not clear, please let me know and i'll try to be more clearer.
ps: If anyone knows how this can be done with the XtraGridControl in devexpress that would be awesome ! :D
you can set a panel with scroll bars on your form and add programatically number of datagrid depend of number of data source. Just add datagrid control to the defined panel.
The control you probably want is System.Windows.Forms.FlowLayoutPanel (see FlowLayoutPanel#msdn)
It is available from .NET v2 and greater.
flowLayoutPanel1.FlowDirection = FlowDirection.TopDown;
....
// for each result...
flowLayoutPanel1.Controls.Add(newGrid);
I have used it before to achieve a similar effect. I have not however tried to re-size the items within it, they were fixed in height (re-sized width-wise to fit the parent).
You should be able to create each XtraGridControl instance with the required data and add it to the controls as above.
PK :-)
SQL Management studio doesn't display all the results in a single grid unless it's a UNION query. Appending multiple grids to a single scrollable pane is the right way to do it, unless you want to break them off into individual tabs.