ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Hide Id column on grid
Title:
B
I
{code}
?
It appears that the grid crud via popup example depends on the presence of an Id column in the grid when refreshing after a crud action. Is there a way to have the id as an invisible column in the grid - without using a map ? Thanks
Save Changes
Cancel
Ratladi
asked at 12 Jan 2015
Answers
B
I
{code}
?
*it doesn't depend on the presence of the column, you can remove the Column { Name="Id"...} and it will still work,* the columns and the grid model don't have to be the same, and almost never are you can see the .Id being used in the ClientFormat for the edit and delete column (button), that's the grid model property not the column in case you need to hide columns for other reasons you can do that by setting Hidden = true or from the client side as shown here: http://demo.aspnetawesome.com/GridShowHideColumnsApiDemo
Save Changes
Cancel
Omu
answered at 12 Jan 2015
Found the reason for my problem. As I read the docs Key= Id etc was only needed for EF, however it is also needed for grid via popup
at 12 Jan 2015
Ratladi
indeed, since the latest release the Key is used also for nesting, tree and the api, api.select(key) and api.update(key) are used in the success functions of the PopupForm
at 12 Jan 2015
Omu
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK