This is a migrated thread and some comments may be shown as answers.

template under the grid

10 Answers 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 25 Feb 2013, 11:11 AM
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

10 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 27 Feb 2013, 07:09 AM
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!
0
Daniel
Top achievements
Rank 1
answered on 27 Feb 2013, 09:47 AM
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
0
Petur Subev
Telerik team
answered on 01 Mar 2013, 10:37 AM
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!
0
Daniel
Top achievements
Rank 1
answered on 04 Mar 2013, 08:28 AM
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.
0
Petur Subev
Telerik team
answered on 05 Mar 2013, 08:37 AM
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!
0
Daniel
Top achievements
Rank 1
answered on 05 Mar 2013, 10:14 AM
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
0
Petur Subev
Telerik team
answered on 06 Mar 2013, 02:53 PM
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!
0
Daniel
Top achievements
Rank 1
answered on 07 Mar 2013, 02:38 PM
What does "data-role" attribute ?and the value "windows" what doesn it mean?
is there any documentation on this attribute?
0
Accepted
Petur Subev
Telerik team
answered on 08 Mar 2013, 06:56 AM
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!
0
Daniel
Top achievements
Rank 1
answered on 08 Mar 2013, 07:48 AM
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
Tags
Grid
Asked by
Daniel
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Daniel
Top achievements
Rank 1
Share this question
or