template under the grid

11 posts, 1 answers
  1. Daniel
    Daniel avatar
    192 posts
    Member since:
    Mar 2012

    Posted 25 Feb 2013 Link to this post

    Hello,
    If i want to use a complex template(with checkboxes,dropdownlists,datetimepickers) for adding or editing something like at this link
    http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/multicolumneditform/defaultcs.aspx
    not necesary under the line being edited,but under the grid how can i do that?
    when adding a new row,then the template should be empty otherwise fill with the values of that row.


    regards,
    Daniel
  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 27 Feb 2013 Link to this post

    Hello Daniel,

    Such editing mode is not supported, the supported ones are:
    • popup
    • inline
    • incell

    If you want to create similar to the one which you described I suggest you to use the MVVM part of the framework to help you for that.
    The idea is:
    1. Create a form with input elements which is designed to be bound to a model of yours
    2. Create template column with a button which on click retrieves the dataItem for that particular row - use the dataItem of the Grid.
    3. Bind the model to the view - this will automatically change the model used also for the Grid and vise-versa.

    Kind Regards,
    Petur Subev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Daniel
    Daniel avatar
    192 posts
    Member since:
    Mar 2012

    Posted 27 Feb 2013 Link to this post

    i'm new to MVVM programming,i had another ideea more server-side oriented,but in order to see which is the best,can you make a concret example with your ideea for Add/Update,with 2-3 fields from Product table of Northwind DB,and to use also a dropdown for CategoryID in the template?for update it would be nice if we select a row from the grid(not pressing an edit button), the values will be filled in the template.
    it would help me a lot,to understand also the MVVM programming model,more client-oriented.

    thanks in advance,
    Daniel
  4. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 01 Mar 2013 Link to this post

    Hello Daniel,

    I created a code-library project to demonstrate how to handle this. The external container is transformed into Window, however if you do not need this you can easily remove the data-role="window" attribute and put the container into a specific area on the page.

    I hope this helps.

    Kind regards,
    Petur Subev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Daniel
    Daniel avatar
    192 posts
    Member since:
    Mar 2012

    Posted 04 Mar 2013 Link to this post

    What does data-role attribute ?and this are specific to kendo observable?
    if i removed this from the div,i do not see anything on the screen when i change the selection.
  6. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 05 Mar 2013 Link to this post

    Hello Daniel,

    I assume that you do not see anything because there is style applied which says : display:none. Remove it and you should be able to see it.

    Kind regards,
    Petur Subev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  7. Daniel
    Daniel avatar
    192 posts
    Member since:
    Mar 2012

    Posted 05 Mar 2013 Link to this post

    Yes,indeed i left that attribute there.but i was asking also about
    What does data-role attribute ?and the value "windows" what doesn it mean?there are more possible values?and this are specific to kendo observable?

    Regards,
    Daniel
  8. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 06 Mar 2013 Link to this post

    Hello again Daniel,

    This is the so called declarative initialization of the widgets. More information about it can be found in our documentation.

    Kind regards,
    Petur Subev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  9. Daniel
    Daniel avatar
    192 posts
    Member since:
    Mar 2012

    Posted 07 Mar 2013 Link to this post

    What does "data-role" attribute ?and the value "windows" what doesn it mean?
    is there any documentation on this attribute?
  10. Answer
    Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 08 Mar 2013 Link to this post

    Hello again Daniel,

    The link I shared:

    http://docs.kendoui.com/howto/declarative_initialization

    contains the answers to your questions.

    Regards,
    Petur Subev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  11. Daniel
    Daniel avatar
    192 posts
    Member since:
    Mar 2012

    Posted 08 Mar 2013 Link to this post

    Thank you for opening my eyes,it was actually about new html5 features,with attributes that starts with data- not something specific to kendo,but i would have been appreciated a straight answer about this.

    Regards,
    Daniel
Back to Top