Hi There!
I am working for a webapplication and using NetAdvantage WebClient 2009 controls....
I have disabled the WebDropDown control using javascript..... but this is throwing _onMouseUpHandler error from the infragistics Javascript.....
After disabling when i click on the dropdown button: this is the error i am getting
"htmlfile: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus."
How do i handle this????
Thanks in advance....
Hi Sree,
In that case there is an easiler solution - just to cancel the ValueChanging client-side event, and this won't allow any text to be persisted to the dropdown at all.
<ig:WebDropDown ID="WebDropDown1" runat="server" Width="200px" DropDownContainerHeight="200px">
<ClientEvents ValueChanging="valChanging" />
and then the actual event handler:
function valChanging(sender, eventArgs)
{
// depending on some condition, do:
eventArgs.set_cancel(true);
}
Hope it helps,
Angel
Hi Angel,
I have a grid in my page and other input controls..... grid is only for display purpose.... one can add new data by providing values in the input controls..... When any cell in the grid is clicked i show the row contents in disabled mode in the input controls...... its only non-editable mode... so i need to keep the webdropdown which is one of the input controls in dropdownlist or readonly list mode...... but when grid cell is clicked the user cant change the dropdown value so it is disabled...... i am able to disable it but when the dropdown button is clicked i am getting the above mentioned html error......
Thanks in advance,
Sree
Hi,
Yes, this is certainly possible, but then you will also need to handle all of the event handlers (add remove ,and so on).
What is your scenario exactly to do this from javascript? You can describe it to me, and i can make some code snippet for you.
Thanks,
HI Angel,
Thanks for the prompt reply.....
Is there a way this can be set using Javascript???
If u notice i have disabled it in Javascript.....
You shouldn't do this. Instead, you should just change the DropDownMode to DropDownList. It will do what's necessary.
Example:
<ig:WebDropDown DisplayMode="ReadOnlyList"
This will disallow selection and editing in the input
<ig:WebDropDown DisplayMode="DropDownList"
This will allow selection but will disallow editing.
<ig:WebDropDown DisplayMode="ReadOnly"
the above will disable editing, and opening of the dropdown. There is also a sample for this in the "Property Explorer" sample for the WebDropDown at samples.infragistics.com