Form Paging

Hello Webix Team,

I'm fairly new to Webix, and now trying to make simple web app. Currently, I've been struggling in making paging in form mode. I already succeed in making a paging in datatable mode. But, how can I supposed to make a paging in form mode? In my case, when cell in datatable mode is clicked, then it will be redirected to the form mode with the value from the row of the clicked cell. So what I want to make is, the paging that is also showed when in that form mode, with the value of the max item that equal with the total records in the datatable mode. For example, my datatable has 10 records. When I clicked the cells of the 5th row, it then enter the form mode, with paging like 'Page 5 of 10'. When I clicked next, it will show the 6th records in the form mode. And when I clicked previous, it will show the 4th records in the form mode. Is it really possible to make that kind of paging in Webix? Because as far as I read the paging documentation, all the sample is about paging in the datatable mode. If it is possible, would you mind giving me the example how to do that? Thanks and sorry if I am asking too much.



  • edited February 2018

    Hello @Christ ,
    As you want to work with form, so you can use ui.multiview inside of it
    Because form doesn't support such property as paging

  • Thank you for the reply.

    So you mean when going into the form mode, I have to add view as much as the total records in the datatable mode? In other words, if I have a total of 1000 records in datatable mode, I have to make 1000 view inside the multiview when go into the form mode? Sorry for asking again, thanks.

  • For the described use-case, multiview is suitable for switching between 'table' and 'form' modes.

    Paging is intended only for data components, but you can use data binding and manage selection in DataTable so that the corresponding record will be visible/available for editing in a single form.

    This is the most simple way to switch between records in form without extra logic, as in case of DataTable, data binding relies on selection.

    However, it does not provide the possibility to show the index of the record automatically, so you will need to add a custom counter, which can be implemented as a template. In the following example, it updates with the bound form via onBindApply event:

  • Hello, really really sorry for the late reply.

    By looking at the snippet, it's almost like the case that I'm talking about. Although, in my case the grid and the form is in separated view (in 1 multiview), so it looks like I still need to handle the data preview when transforming(change) into form mode. I'm gonna try it first using the method that you given. Will give an update here about the progress. Thank you very much for your kind reply and help. Really much appreciated.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!