ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Grid Inline Editing, don't change cell when value null
Title:
B
I
{code}
?
Hi, I am implementing inline editing in grid, the requirements are if value of a cell is null, when you click on edit, the cell doesn't change into input element at all and it should stay null on postback. How can i achieve that?
Save Changes
Cancel
Sean
asked at 30 Sep 2015
I think you'll have to modify awem.js for this, find str = str.split('#Value').join(value); and add a check for if value != null for this line
at 30 Sep 2015
Omu
Hi, simply adding a check didn't work for me tho I managed to get what I want based on your hint, thanks.
at 30 Sep 2015
Sean
Answers
B
I
{code}
?
if (tag.Format) { var str = column.Tag.Format; //modified by Sean 2015-09-30 str = str.split('#Value').join(value); str = str.split('#Prefix').join(prefix); if (column.Hid) { hidden += str; } else { if (value != "" || tag.Format.indexOf("checkbox")>=0) { $row.children().eq(tdi).html(str + '<div class=" gvalidmsg ' + modelProp + '"></div>'); } } }
Save Changes
Cancel
Sean
answered at 30 Sep 2015
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