Devexpress control usage Summary-version 9.3

Source: Internet
Author: User
  1. Xtrareport
  • Paper direction change: Landscape = true/false
  • Default paper output: paperkind = A4
  • Variation: margins = 100,100,100,100
  • Page number display: Select xrpageinfo in dx.9.3 report control in the toolbar. You can design the corresponding format using the format in the control attribute, for example, page {0} of {1}
  • Page display line control: Call xrpagebreak control, Detailed Help: http://documentation.devexpress.com/#XtraReports/CustomDocument5283

([Datasource. currentrowindex] % [parameters. parameter1] = 0) and ([datasource. currentrowindex]! = 0)

  • Passing parameters from a form to a report: Same as passing parameters between forms
  • When the report format is one paper but one page does not support multiple tables, or the same header or logo is required, you can use the inheritance table method for page design.
  • The same type of table data sources can also be designed in the inheritance mode, and various computing methods can be managed in a unified manner in the parent table, without the need to process in each table, increasing maintainability.

2. xtragrid

  • Row lock

No xtragrid is available, but similar functions may be implemented through control events:

Code:

Private void gridviewmain_showingeditor (Object sender, system. componentmodel. canceleventargs E)
{
Gridview view = sender as gridview;
If (convert. tostring (view. getrowcellvalue (view. focusedrowhandle, collock_if) = "yes ")
{
E. Cancel = true;
}
}

  • Data Update 1

Problem: the grid requires a full selection function, but after code implementation, it is found that the last one is always unavailable.

Solution: the final data can be submitted using the posteditor () method.

  • Data Update 2

Problem: The data is edited in the front-end grid, but the data of the last control that obtains the focus is lost when it is saved.

Solution: implement the posteditor () method when saving data, and implement the following method in the cellvaluechanged event (note that it varies depending on the name of the gridview)

Gridviewmain. closeeditor ();
Gridviewmain. updatecurrentrow ();

3. xtrabar

1. xtrabaredititem

Problem: Add lookupedit to the toolbar and use the code to automatically select a project in lookupedit.

Solution: Assume that gridlkdept has been bound to the data source, and the displaymember data in the data source contains text data such as "test ".

Lkitem: devexpress. xtrabars. baredititem

Gridlkdept: lookupedit (built in lkitem)

Implementation Code: lkitem. editvalue = gridlkdept. getkeyvaluebydisplaytext ("test ");

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.