Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
230
Multiple lines for data row display and section breaks
posted

Is the following possible using either the WebGrid or HierarchicalWebGrid?  I am currently using the WebGrid to convert a aged application.

I have two questions, refer to the attached imaged (heavily redacted) for the questions.

A in attached image - Is it possible to have sections (or perhaps groups) of rows split by a data element in the associated data set, but not displayed directly on the grid itself?  Ideally controlled programmatically.  (In the image, the All Searches drop down will list individual names or All Searches ... where All Searches displays the names separated by lines.  (This one isn't as critical if its not possible.  I may be able to convince the users to give up on the "All Searches" option if its not possible.)

 

B in the attached image - and more important for the rewrite - is it possible, on a record by record basis, to display additional information in the data set "spanning" the record, since it will normally be lengthy text?  Highlighting is more optional as long as there is a good way to display the data.  Notice that none of the other rows have this additional data, just the one to which there is data to display.

 

C (perhaps should be a separate topic/post, but related) - What displays in the grid is driven by the radio button selection and Reports Found drop down selection at the top of the image.  This works perfectly when editing is not allowed.  This also works perfectly when editing is allowed (last 3 columns), and the user moves between pages (when available) of the current selection the data saves correctly.

However, if a user edits a record, and then either changes the section (radio button change) or search (Reports Found change) which would be common practice for the user, a "MissingRecordException: Requested record cannot be found by key" error occurs.  I'm fairly certain the reason is the grid is being rebound to use the newly selected values ... before the actual update of the changed record occurs.  The data bind is necessary to get the grid to change on selection.  I don't see a way to "force" the update of the data.