I am working with my software project now and i’m trying to create a search box that sort data in the tableview depending what user enter into the textfield. Can someone help me with my search box please? Thanks for the awesomeness of this community that I manage to got this far.
It always good to make specific questions in order to get more useful responses.
In any case, if you want the tableview to update itself while you enter each char in the textField, you will need to add an inputListener to your textField. On the editing phase of your input listener, you will need to loop in the table view data and remove the entries that do not match with the characters entered on the textField.
Thanks for the reply sir ! i am using sql and display it in table view here’s my code.
function fieldHandler(event)
if ( “began” == event.phase ) then
print(“begans”)
elseif ( “ended” == event.phase ) then
print(“ended”)
elseif ( “editing” == event.phase ) then
--I’m not sure what to put here…
elseif ( “submitted” == event.phase ) then
print(“submitted”)
end
end
end
It always good to make specific questions in order to get more useful responses.
In any case, if you want the tableview to update itself while you enter each char in the textField, you will need to add an inputListener to your textField. On the editing phase of your input listener, you will need to loop in the table view data and remove the entries that do not match with the characters entered on the textField.
Thanks for the reply sir ! i am using sql and display it in table view here’s my code.
function fieldHandler(event)
if ( “began” == event.phase ) then
print(“begans”)
elseif ( “ended” == event.phase ) then
print(“ended”)
elseif ( “editing” == event.phase ) then
--I’m not sure what to put here…
elseif ( “submitted” == event.phase ) then
print(“submitted”)
end
end
end