Hi
I am trying to replicate a form and am wondering if I can use Card View to do it. The form I want to replicate is this:
I am not fussed about the different field widths, they can all be one size. Except when it is a checkbox, as I would like them to just show the check mark and not a big border around the field. An example is further down.
I have tried using card view and so far got this, i am not sure about how far to go with this hence asking here as i could be wasting my time
As you can see it is all one column in layout where as I want it in two, I would want to place my fields by layout column and layout row so for example for the Reference I would pass in a parameter (col = 0, row = 0) for Status (col = 1, row = 0)
I will need to remove the blue bit at the top and the group by which I think is allow groups and show row selectors so not a problem there.
Would be nice to change the border for he checkbox to none if possible and then I could have a play with formatting of headers.
What I am hoping to get to is something like the following, the thing with the following one is it is all separate controls which are then positioned in code, there is a lot of meta data for them but I do not have access to that for my forms/application and cannot do so.
If I can just change an existing grid into card view it means I can hopefully just inherit from my base grid and then send it to be turned into a card view.
Is this possible?
I also not there is something called a grid bag layout , maybe that would help speed things up if I have to go the route of a form with labels and controls for each field but I can't find much info on it.
Thanks very much,
paul
Hello Paul,
Thank you for contacting Infragistics Developer Support!
Looking at your images an descriptions it looks like you are trying to fill the grid with one row of data and edit that data. If that is the case I would recommend you use the editors to build the form for editing the data:
www.infragistics.com/.../wineditors-about-wineditor-controls
If you still want to use the grid, you will want to look into using Row Layouts instead of the CardView to achieve the behavior you want:
www.infragistics.com/.../wingrid-row-layouts
Hi Michael
Sounds like you don't have anything to help with the layout. I am looking at the standard flow layout table in dot net and can put editors in there.
Thanks anyway,
Paul
Hi Paul,
Just to clarify a little.
CardView is way of arranging the grid rows, not the columns within the row. So from the screen shots you have here, it looks like you will be displaying a single "row" of data and you want to arrange the fields in two columns. So I don't see CardView would help you there. If you are only showing a single row of data at a time, a grid would be a somewhat strange choice for that. Which is not to say that you can't do it, but a grid is typically used for showing multiple rows of data. If you wanted to achieve this sort of view in the grid, either with a single row or multiple rows, then the way to do that would be to use RowLayouts - which essentially uses a GridBagLayout (which you mentioned at the bottom of your original post). But like I said, using a grid for a single "row" of data is an unusual UI choiceand it carries with it some quirks you will need to work around. For example, since you would only be displaying a single row, sorting makes no sense, and you can't commit the changes by moving to another row. Not insurmountable, but just a little odd. If you really want to pursue that approach, we could probably whip up a quick sample to show you how to do it. But I think it makes more sense to use textboxes and combo boxes and such for this kind of layout. Of course, I don't know what the requirement of your application are, so I could be wrong.
Hi Mike
I was just hoping to use a single row grid to utilise the code already written and inherit from the grid I use for all multi-row editing therefore all of the before update events and places for validation would be the same. It was a means of hopefully speeding up migration from MS Access to Dot Net.
I will just the editors approach with a ComputeLayout script.
Thanks