Hi.
I've developed a page with a RadGrid, sourced by a List of POCO's, using an EditFormType of WebUserControl. My user control handles the DataBinding event (attaching to it in the control's Page_Load(), if that's important). I click my edit button in the grid... the control pops up, mostly with populated data. I seem to at least be doing something right...
The one input in the user control I can't seem to get populated is the drop-down, which I've tried implementing as both a plain old ASP.NET DropDownList or a RadComboBox. If I debug and step through my DataBinding handler. I can see that it's been properly selected. But sometime between the end of the DataBinding() call and rendering, the list has lost its selection, and renders showing the first item in the dropdown.
The grid itself is inside a RadAjaxPanel, but I it doesn't appear to be an ajax issue because the problem persists when I set the panel's EnableAjax=false.
All I'm doing to select an item is:
The function that databinds the list itself checks the item-count of the list, and skips the data binding if there are already items. So it's not losing the selection due to an extra bind.
If I just throw this control on a blank page and call SelectBU() from the .aspx codebehind, it works fine.
I'm on 2014.1.225.40 in ASP.NET 4.0, and I'm targeting IE9 primarily. (I've seen this same behavior in the versions of Chrome and Firefox I have installed on my box.)
Thanks for any guidance anyone can provide.
I've developed a page with a RadGrid, sourced by a List of POCO's, using an EditFormType of WebUserControl. My user control handles the DataBinding event (attaching to it in the control's Page_Load(), if that's important). I click my edit button in the grid... the control pops up, mostly with populated data. I seem to at least be doing something right...
The one input in the user control I can't seem to get populated is the drop-down, which I've tried implementing as both a plain old ASP.NET DropDownList or a RadComboBox. If I debug and step through my DataBinding handler. I can see that it's been properly selected. But sometime between the end of the DataBinding() call and rendering, the list has lost its selection, and renders showing the first item in the dropdown.
The grid itself is inside a RadAjaxPanel, but I it doesn't appear to be an ajax issue because the problem persists when I set the panel's EnableAjax=false.
All I'm doing to select an item is:
public
void
SelectBU(
string
s)
{
lstBU.ClearSelection();
lstBU.FindItemByValue(s).Selected =
true
;
}
The function that databinds the list itself checks the item-count of the list, and skips the data binding if there are already items. So it's not losing the selection due to an extra bind.
If I just throw this control on a blank page and call SelectBU() from the .aspx codebehind, it works fine.
I'm on 2014.1.225.40 in ASP.NET 4.0, and I'm targeting IE9 primarily. (I've seen this same behavior in the versions of Chrome and Firefox I have installed on my box.)
Thanks for any guidance anyone can provide.