last day (16 days later) » 

5:32 AM
0
A: Display two different values from different columns of same row in autocoompleteextender

Jayakrishnan GounderYou need to add some client side functions and change in webmethod to accomplish your requirements Html: Hook up two events OnClientPopulated and OnClientItemSelected and set BehaviorID to control. <asp:AutoCompleteExtender ServiceMethod="SearchClientCode" ServicePath="~/myadmin/shipments-prof...

 
SUN
When user select any value then it should only take ID not entire string. That is what my main problem which still not solved
 
@SUN i have updated itemSelected function to select the ID value. Please check
 
SUN
When I am selecting any item it inserts this "[" Open square bracket
 
can you please share me your code, so that I can have the look?
 
SUN
My code looks exactly same as you given. And rest I have given on post. Do you want to see the output?
 
5:32 AM
@SUN yes please.
 
SUN
Please see this demo link I made orionexpresslogistics.com/auto.aspx
 
@SUN I have updated onClientPopulated function, JSON.parse is required to parse the value. Still let me know if you face the issue, we are almost close to solution :)
 
SUN
Hi Jay
 
Hi SUN (I hope it's your real name)
 
SUN
Suraj
 
5:34 AM
nice
you need to update the onClientPopulated function
 
SUN
So as you updated your code
see this
still little problem
 
after selection, it shows only first letter p right?
 
SUN
Suppose We see this in suggestion PARKMAA01(Park Industries Pvt. Ltd. )
So on selection it should shows only PARKMAA01
not entire string
 
on selection do you need entire string PARKMAA01(Park Industries Pvt. Ltd. ) or PARKMAA01
 
SUN
And I type P it shows all result with P. If I select first Value PARKMAA01(Park Industries Pvt. Ltd. ) then it shows entire string
but on second value so so on it shows only P
Yes I want only ID should be selected not entire name
 
5:38 AM
ok let me see
Hi
I have updated code of itemSelected function
please check and let me know if it works
 
SUN
ok
Almost done but still little tweak
 
5:56 AM
yes
say
 
SUN
check on that link
type PARKMAA01
only this value
first time it didn't selected
second time it does
there is some little problem of every record with first row
See what exactly happening. You select any value & it's previous value get selected
I just added css class to see what is highlighting
can you please check once
 
Hi dude, thanks for the css
it's working
if still there is an issue let me know
I will look into it later
leaving for now
and please accept it as answer, it might help others
 
SUN
do you see when move cusrsor & point to second value then it highlights first value
this is the only problem i am facing now
Ok.Thanks for your kind help. Just you get time please see the the issue I mentioned in above point
 

  last day (16 days later) »