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

[Solved] hidden column shifts grid display when rebinding view after insert or update

1 Answer 63 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.
Stephan Kühn
Top achievements
Rank 1
Stephan Kühn asked on 24 Nov 2011, 08:39 PM
I have adapted the Grid / Editing / Ajax Editing sample to display a list of products.
I have implemented _InsertAjaxEditing() and _SaveAjaxEditing() as suggested.
When I define a hidden column (e.g. Id) on the grid, upon rebinding it will shift the
grid data contents one column to the left, i.e. ommitting the first displayed column
after returning from both function when rebinding the model to the grid
(i.e. return View(new GridModel(repository.GetAll()));)

Is this behaviour by intention and if yes, why?

Kind Regards
Stephan

1 Answer, 1 is accepted

Sort by
0
Stephan Kühn
Top achievements
Rank 1
answered on 24 Nov 2011, 10:55 PM
Hidden columns don't cause these problems if they are added last, i.e. after every visible column and after the command column!
Tags
Grid
Asked by
Stephan Kühn
Top achievements
Rank 1
Answers by
Stephan Kühn
Top achievements
Rank 1
Share this question
or