PreOpen event for Bubble edit check field name
PreOpen event for Bubble edit check field name
I am using the Bubble feature of the Editor. In the PreOpen event handler I am attempting to access the field name the Bubble event is called for, but I cannot seem to get the field name. I tried using the ".displayed()" function of the Editor, but it returned 0 entries. Is there something else I can try or am I missing something? Thank you.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi,
The issue with using
displayed()
inpreOpen
is that it is based on what fields are actually visible, and there aren't any at that point.Is using the
open
event valid for you?displayed()
will work there.Allan
For certain fields I do not want to display the Bubble editor, can I do that from the "open" event? That is why I thought PreOpen would be good. I don't have to use "displayed()", is there something else I can use in PreOpen to figure out what column is going to be edited?
I see. Could you just not call the
bubble()
method on the column cells that you don't want to be bubble editable? This example shows inline editing applied to specific examples only, but the same could be applied to bubble editing.Allan
I will try that. I could set up a className and assign it when creating the field? Then reference that className in the jQuery selector? And the setting of the 'click' event needs to happen after the table has been created, in the "document ready" area, correct? Thank you.
Yes - that is one way of doing it. Use
columns.className
to assign the classes you want the event selector to match - e.g.bubbleEdit
. Basically exactly the same as the example but callingbubble()
rather thaninline()
.Allan
When I look at the elements on the page it appears to me I have a Class set (“ZZZ”) on a table cell:
But when I look for it through jQuery selector it doesn’t seem to find it:
Based upon the example I believe I am doing everything properly, am I missing a step?
I think I have this working using the className with 1 problem: I am using "fixedColumns" for 2 columns and the bubble edit will not work for the fixed columns until I get into the "New" popup or the "all fields Edit" popup.
You need to use a delegated event and also a non-table specific (id) selector if you are using FixedColumns, otherwise the selector won't pick up the cells in the fixed column.
Allan
Thank you. I will test that now.