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

[Solved] Grid editing using [UIHint("???")]

1 Answer 263 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Marco
Top achievements
Rank 1
Marco asked on 09 Mar 2010, 07:46 PM
Hello, i'm trying to use a dropdown list to edit inline on grid.

i'm trying to several approaches but until now none of them have worked in ajax binding.

let me start by some explanation about what i need, and i think everyone who needs crud grids in ORM Repository.

image that you have a table for country's and you are creating a new customer on grid. 

one of the properties of customer is country, and country class is composed by id(int) and name(string) properties.

what i need to do is on customers grid add a a column that shows the name of the country and a uint editor template that shows a drop-down populated whit all countrys.

this second part is working... i just added a uint to my property idcountry on customer metadata class , and create a template whit a drop-down.

but the problem resides on the bound column because i can't use template columns in ajax binding... and so i need to bound the column to idcountry that shows me an int number.

i have tried to use the property country instead of  id Country  but if i use that one all i see is a namespace of class + nameOfClass

if i use country.Name i see the correct name in read mode but on edit mode i can't call the editor template.

please can someone help me whit this?

Best Regards
 

1 Answer, 1 is accepted

Sort by
0
Marco
Top achievements
Rank 1
answered on 11 Mar 2010, 05:57 PM
hello I'm currently achieving the expected behavior using the display and editor templates, but i think that an error exist.

when i render the grid the display editor is called and the column is converted as it is expected.

When i press update or insert the editor template is applied, than if i save or cancel the display template will not be applied... instead of, it is presented a string saying [object Object]...

I'm using ajax binding, i see a sample where this is working but unfortunately the sample uses server binding.

Someone knows if this is a limitation of Ajax binding? or is this o know issue?

have someone see this happening? please if so share your knowledge...

plies see the attached images.

Hope Someone can help

Best Regards
 

Tags
Grid
Asked by
Marco
Top achievements
Rank 1
Answers by
Marco
Top achievements
Rank 1
Share this question
or