In this
post I’ll cover the basic usage of dialogs in NRapid, how do they work and what
kinds of controls do we have available.
As we already
saw, to create a dialog we have to add a nested class named "Dialog" inside a
report. In order to add controls, we need to define properties in that class, and
based on the properties type, the report engine will create and add the controls
to the dialog.
This
mechanism is pretty much based on conventions, but we have some attributes to
annotate the properties and modify the default behavior.
This post
is on basic usage of dialogs, so combos and autocompletes are off the table,
because they requires a bit more of configuration.
And then when we
run the report we get this
As you can
see in the output dialog, one of the engine conventions is “first defined,
first served”, but sometimes this is not the desired behavior or you maybe want
to add columns or change the text on the labels or stuff like that. To do that
you can use annotations:
And when
you run the report, you will see that the output has been modified:
This is
just a sneak peek of how to work with dialogs, will be upcoming post covering
combos, autocompletes, validations, calculated props., and many more. Stay
tuned!
You can get the source code of NRapid from here
You can get the source code of NRapid from here
And the sample app from here
The Northwind database is available from download at http://www.microsoft.com/en-us/download/details.aspx?id=23654
Comments
Post a Comment