iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I have a field with EditType of NoEdit to prevent the user from editing this field. However, I still need to set this field using JavaScript. This is possible using the Cell's SetChanges() Method but not the Cell's SetText() method. However, I noticed some weirdness with the SetChanges() Method where it would clear the field but leave the underlying textbox's tooltip showing previous data. This only seemed to occur when setting the text to "".
For example,
Cell.SetChanges("Hello World") = "Hello World" and tooltip of "Hello World"
Cell.SetChanges("") = "" and tooltip of "Hello World"
Cell.SetText("Hello World") = "" and tooltip of "" for field's with EditType=NoEdit
The Cell'sSetForceNoEdit() method generates an exception "this.CellElement" is null or not an object
Hello Shawn,
Do you mean for each cell? Because we don't have EditType for row. We only have EditType for WebGrid Column in cell level.You should not be able to do at row level. Besides, Row object does not have SetText() method.
In order to do this in No Edit type, you can use SetText(). Please see the code below.
function Button1_onclick() { var grid = ISGetObject("WebGrid1"); grid.GetSelectedObject().ToRowObject().GetCells()[1].SetText("Hello World", true,true); }
The last parameter is ignore edit type parameter. You can return true or false.
Regards,Handy
Hello Shawn,Do you mean for each cell? Because we don't have EditType for row. We only have EditType for WebGrid Column in cell level.You should not be able to do at row level. Besides, Row object does not have SetText() method.In order to do this in No Edit type, you can use SetText(). Please see the code below.function Button1_onclick() { var grid = ISGetObject("WebGrid1"); grid.GetSelectedObject().ToRowObject().GetCells()[1].SetText("Hello World", true,true); }The last parameter is ignore edit type parameter. You can return true or false.Regards,Handy
My apologies as I meant Cell when I typed Row. The last parameter sounds exactly like I need! It is not listed in the documentation anywhere so I was not aware it existed. Is there any other parameters?
I will test in the morning.
Fantastic! This allowed me to update the field regardless if the EditType was set to NoEdit.
However, the textbox's tooltip still has the previous data.
Cell.SetText("Hello World", true, true) = "Hello World" and tooltip of "Hello World"
Cell.SetText("", true, true) = "" and tooltip of "Hello World"
Can you confirm?
I did not face the issue in tooltip at all. Would you mind to send me a simple sample of yours? FYI, I also tested with your snippet code.
Hello Shawn,I did not face the issue in tooltip at all. Would you mind to send me a simple sample of yours? FYI, I also tested with your snippet code.Regards,Handy
Oddly. I can't seem to reproduce in another project. I can't get the tooltip to consistantly be displayed to even see what the tooltip is.
The tooltip only shows when the word length extends a cell width. Should you also see the same in your scenario?
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname