Skip to main content

Hi guys

 

Does anyone know of a custom control written by someone that allows you to have a multiline listview. For example;

 

Single Line List view:

 

User  | Date  | Something

 

value | value | value

 

Multiline List View

 

User : value

 

Date : value | Something: value

 

Is this possible by one means or another.

 

Thanks in advance

 

Well it sounds like your describing a List view and an Item view.  Both of these are capable of being built out of the box with standard views and controls within K2.

 

The List view would be something that would display a list out of SQL or SharePoint that a user can click on to (possibly) see more details.  In your scenario, it would be something like the screen shot I'm providing...and loading up the Item view controls with information provided from the List view.  

 

If you describe what you’re trying to accomplish, I might be able to assist.

 

13074i1D5C53DA1CD968B1.png


Hi daerne

 

Thanks for your reply. Maybe I didnt explain it properly. So you can see in your reply that the list view can only have one line. If i have a lot of items to show in list view it would get crowded very soon. I was hoping the one row in the list view can be made of multiple lines.

If we take your example of the list view row. Can you break it down as follows:

 

------------------------------------------------------------------------------------

RFID: 14

Calander 3/18/2014              |               Subject: Another test

Issue: x               |           ToPerson: x       | Email : x

------------------------------------------------------------------------------------

 

So this would be one row in the at list view instead of having everything in one line.

Is this possible?

 

Thanks

 

 

 


I understand what your looking for, however there are a lot of possibilities here.

 

If we take all of the text you want to show the user I.E. (Even if we have a ton of data):

------------------------------------------------------------------------------------

RFID: 14

Calander 3/18/2014              |               Subject: Another test

Issue: x               |           ToPerson: x       | Email : x

--------------------------------------------------

 

And convert it to a better looking item view (format it to high heaven):14049i5373F17C82585394.png

 

You can create a rule on your List View, when clicked it opens up a Subview then populates this "View" with the relevant data.

 

Subviews allow you to expand on your data, even if you don't see everything on the list view...when you go into your list method, you can then populate the subview with as much data as you can fit.

 

What I'll do is if the subview is an informational view, I will put a close button at the bottom to help the user get out of this view.


Hi 


Thanks for your reply. For me the subview option seems a bit unintuitive. Users might miss details, I would like to show all details in the list if possible. Is there an otpion for this.

 

Thanks


You might be able to create a view in SQL that would combine the multiple columns into a single column for display. I'm not sure though if you'll be able to get it to work so that newlines are displayed within the SmartForms list control. You might have to create your own SmartForms custom control in that case. See the Visual Studio templates here for getting started on creating your custom controls: http://community.k2.com/t5/K2-blackpearl/Visual-Studio-Project-Templates-for-K2-blackpearl-Extensions/ba-p/1081


I have another alternative although not very clean.

Where you need to have the multiline, don't drag a column into the list view, but a new Data Label.

Then create an expression for this data label and build up an HTML table using the String Concatenation function.

Drag each of the fields you would like to display and build the table, here is an example of the expression:

Concatenate ( <table><tr><td>, {Field1}, </td></tr><tr><td>, {Field2}, </td></tr></table> )

 

K2 will render the table during runtime and it will be displayed as a multiline.

Inline editing will however be a problem, but for that I suggest using a subview.

 

Hope this helps!

JohanL


Thats a very good idea. Thank you very much. Is there any restrictions that you know of. Ive tried a few HTML tags and inline stylings and they seem to render pretty well. Tryna think what would stop me from putting textboxes and drop down lists. Another idea I have had but not really tried it out, so not sure it will work or not. Create a ASP page with the data grid or similar to control the adding editing deleting and display of the list view and then use the content control to show the ASP page in there. The problem I can see is that the content control doesn't seem to be dynamic, meaning it does not expand or collapse according to the size of he age its rendering.

 

 

 

  


Hi,

 

I'm not sure what the limitations would be.

I know for a fact JavaScript would cause issues so don't try to include any.

I would assume input controls might be difficult as well, but you can test it.

 

I would suggest using this method only to display data, reverting to a subview for any edits.

I've used it like that and it works very well.

 

Regards,

JohanL


I tried putting html in and that did not work for data labels and only for label. I think it cant be hacked to take user input. 


Reply