Hi,
I am using WebDropDown in my application. Today i upgraded my infragistics version with new release(v 10.1.20101.1011). After this i can not set 'CurrentValue' for WebDropDown. In my older version i was using this same coding and it worked fine.
<ig:WebDropDown DisplayMode="DropDownList" DropDownAnimationType="Bounce" ID="uwlog" Height="23px" Width="65px" AutoPostBack="true" OnValueChanged="uwlog_MenuItemClicked" ToolTip="Log Info" CurrentValue="Log Info" DropDownContainerWidth="105px" EnableDropDownAsChild="false" DropDownContainerHeight="0px" DropDownContainerMaxHeight="150px" runat="server" Style="margin: 0px 0px 1px 20px; z-index: 9000;" StyleSetName="Office2007Blue">
<Items>
<ig:DropDownItem Text="Application Log" ToolTip="Application Log" >
</ig:DropDownItem>
<ig:DropDownItem Text="Error Log" ToolTip="Error Log" >
</Items>
<AutoPostBackFlags SelectionChanged="On" />
<ClientEvents />
</ig:WebDropDown>
- Here i have set CurrentValue as "Log Info" but in front it is taking the first list item as currentValue(ie;"Application Log").
Can anyone suggest a solution for me?
-Thank you.
Yes this is a known issue in this build, which has been resolved afterwards. as a workaround with this build you can set CurrentValue in PreRender, or wait for the next build (service release).
Thanks for your feedback,
Angel
I have applied the value for rendered control.The current value has changed but the first item in the list is not getting selected and no event occurs when selected.
The coding i applied is,
document.getElementById('x:1732883493.2:mkr:Input').value = 'Log Info';
Give me a solution. Its urgent??
Thank you.
Hi Sridhar,
If DisplayMode = DropDownList, you cannot haveany CurrentValue, it must always match an item's text. Is this the case with your issue?
Thanks,
I have the same issue. I have the latest release 10.2.20102.1009 and the CurrentValue does not work. It's very fustrating. I did downgrade to the previous version 9 and it worked and I was going to leave it at that. But I wanted to take advantage of the Documents feature for some reporting I was working on. Please give me a work around.
As i have specified in my previous post, when the DisplayMode=DropDownList, the DropDown control is behaving as the Microsoft DropDownList control, meaning that the current value must always match an item's text. You can still achieve the same functionality (not allowing free text entry) , and being able to set any current value, by just setting the DisplayMode to "DropDown" (default), and then cancelling the ValueChanging event all the time.
Hope it helps,
Actually, that's not what's happening. In the previous version I could, in code, set the CurrentValue to a value and when the control renders, the value would stay. In the 10.0.... version, you can't do that. You have to set the value using the PreRender function, which causes a problem. So I create my multiple dropdown controls on the fly, add a Prerender function to them on the fly, then I set values for each of them. That's a headache, but I worked it out. When I created the control, I set a generic Prerender function, then when I wanted to populate the drop down values, I set the ToolTip value to that value, and in the Prerender function set the CurrentValue to the Tooltip value then set the tooltip value to somethingl else. Thanks anyway.
protected void comboPrerender(object sender, EventArgs e)
{
//get the control
Infragistics.Web.UI.ListControls.
WebDropDown wd = sender as Infragistics.Web.UI.ListControls.WebDropDown;
if (wd.SelectedItemIndex == -1) // the value was not in the SelectedItems List.
//set the current value to the tooltip value
wd.CurrentValue = wd.ToolTip;
//set the tooltip value to blank.
wd.ToolTip =
"";
}
As I have already mentioned, this is related to the DisplayMode being set to DropDownList. Is your equal to DropDownList?
No. The display mode is set to Dropdown. I create the controls in the code behind.