In wdd text after get selected shows rather end of the text string. String is longer then the bos, how to make it display string from the beginning, i.e.
in the attached example the string 'Exhibit LR5: U.S. Foreign Tax Credit Data' shows as: 'oreign Tax Credit Data' and I would like to have it as 'Exhibit LR5: U.S. Foreig....' means showing text from the beginning.
Hello,
Thank you for posting in our forum.
Generally the Drop down will set the cursor position at the end of the string. You could set the it to the beginning if you’d like. For example you could handle the web drop down’s focus client side event and set the caret position in the beginning. For example:
<script type="text/javascript">
function setCaretPosition(elemId, caretPos) {
var elem = document.getElementById(elemId);
if (elem != null) {
if (elem.createTextRange) {
var range = elem.createTextRange();
range.move(
'character', caretPos);
range.select();
}
else {
if (elem.selectionStart) {
elem.focus();
elem.setSelectionRange(caretPos, caretPos);
else
function WebDropDown1_Focus(sender, eventArgs) {
var input = eventArgs.get_browserEvent().target;
setCaretPosition(input.id, 0);
</script>
Let me know if this is what you’re trying to achieve.
Best Regards,
Maya Kirova
Developer Support Engineer II
Infragistics, Inc.
http://ko.infragistics.com/support
Maya, I'm not sure how it would work on focus event... in other part of my pj this little problem was seems like resolved by setting StretchHeight property to true.. but it was wdd as grid editor provider and I do not see this property in stand alone wdd. Attached sample site, can you show how your code would work there. All I need id to see the text inside wdd start from the beginning after selection changed.