ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
ClientFormatFunc How to pass parameters other than RowData? For example GridID
Title:
B
I
{code}
?
I'm using the `Column.ClientFormatFunc` like this: new Column { ClientFormatFunc = "faveropen", Width = 90 }.Mod(o => o.Nohide()) function faveropen(itm) { // I need another parameter here, like GridId var rval = ""; if (itm.FlavorCount > 0) { rval = "<button type=\"button\" class=\"awe-btn\" onclick=\"openPopupForm('Top','','','','" + itm.ProductName + "')\">??</button>"; } return rval; } Is there a way to add additional parameters ?
Save Changes
Cancel
RayBen
asked 2 months ago
Answers
B
I
{code}
?
You can use a function that returns a function: function myFunc(p1, p2){ return function(item, prop){ // use p1, p2, item return ...; } } and define in the grid declaration: new Column { ClientFormatFunc = "myFunc('myValue1', 123)", Width = 90 }
Save Changes
Cancel
Omu
answered 2 months ago
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