New Posts New Posts RSS Feed: GridBuilder
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

GridBuilder

 Post Reply Post Reply
Author
vkh75 View Drop Down
Newbie
Newbie


Joined: 15-Jun-2007
Location: Ukraine
Posts: 14
Post Options Post Options   Quote vkh75 Quote  Post ReplyReply Direct Link To This Post Topic: GridBuilder
    Posted: 25-Dec-2007 at 8:12am
I've read the "Visual Grid Designer Dangers" tech tip and I liked the way of customizing a DataGridView discussed there. But I'm a bit confused of how I can involve the technic in my existing application (Windows application and DevForce Express). Any suggestions?
 
Thanks!


Edited by vkh75 - 25-Dec-2007 at 10:47pm
Back to Top
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Posted: 27-Dec-2007 at 11:09am
The author of that tech tip, Ward Bell, is on holiday vacation so I can't ask him directly if he has any examples. However, a good guess would be that the only examples he has at the ready are integrated into his Cabana application. That is a very complex app involving the integration of Microsof't Composite UI Application block with DevForce, and as such isn't a particularly good place to go hunting for sample code. Easy to get lost in the forest.
 
I would suggest an exploratory approach like the following:
 
1. Create a brand new (empty) Windows form
2. Make a copy of it in the same project, changing the name as necessary to prevent duplications.
3. On one of the two copies, use the DevForce DataGridViewBindingManager designer to wire up a grid of modest complexity.
4. Inspect the code generated into the .Designer.cs file by the DataGridViewBindingManager designer.
5. Extract all necessary code generated from the .Designer.cs file by the DataGridViewBindingManager designer into the main form file, thereby taking control of it.
6. Refactor and arrange the extracted code into convenient, nicely encapsulated methods.  Experiment with different kinds of parameters that permit you to pass in the columns to be displayed along with other settings (such as Editability, etc.)
 
You will need to be familiar with the DevForce DataBinding facilities, including DataConverters and possibly ViewDescriptors, to get very far with your experiments.  You can learn about these in the Developers Guide and in following Instructional Units:
 
100 series
 
UI Overview (powerpoints only - you'll need to download from the Learning Materials page on the web site)
 
 
200 series
 
DataConverters And ViewDescriptors
 
 
The PowerPoints for the latter may also be helpful. We don't ship the PowerPoints with the product because they make the installation executable too big, but you can download these from the Learning Materials page.  The code solutions for the DataConverters And ViewDescriptors unit are shipped with the product. See Tutorials on the Windows menu for IdeaBlade DevForce.
 
Greg Dunn
 
 
Back to Top
vkh75 View Drop Down
Newbie
Newbie


Joined: 15-Jun-2007
Location: Ukraine
Posts: 14
Post Options Post Options   Quote vkh75 Quote  Post ReplyReply Direct Link To This Post Posted: 27-Dec-2007 at 11:00pm
Thank you, Greg! I'll try what you suggest.
I thought I could just copy a couple of classes from Cabana to my project and that would be enough, but it seems not.
Back to Top
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Posted: 28-Dec-2007 at 9:18am
Welcome.
 
I forgot to mention: the point of copying the empty form is to make a base of comparison for the second form after you let the BindingManager designer generate code into it.  Makes it easier to see what the designer generated.
 
Cheers.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down