I have a main form.
On main form I placed a user control.
I raise an event from the user control.
I catch the event on the form.
There, I fill a webgrid on the form.
The problem is the WebGrid doesnt show the data.
User control:using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class EditRecord : System.Web.UI.UserControl { public delegate void OptionChangedEventHandler(); public event OptionChangedEventHandler OptionChangedEvent; protected void Page_Load(object sender, EventArgs e) { } protected void ButtonConfirm_Click(object sender, EventArgs e) { OptionChangedEventHandler handler = OptionChangedEvent; handler(); } }
Main page:
using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using DealsRoomDAL; using System.Data; using DealingRoom.Utils.BuisnessDays; using DealingRoom.Utils.BasicManiputlations; using Infragistics.Web.UI.EditorControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { EditRecord1.OptionChangedEvent += new EditRecord.OptionChangedEventHandler(EditRecord1_OptionChangedEvent); } void PopulateGrid() { List<string> optionValuesLs = new List<string>(); string s = "x"; optionValuesLs.Add(s); WebDataGrid1.DataSource = optionValuesLs; WebDataGrid1.DataBind(); } void EditRecord1_OptionChangedEvent() { PopulateGrid(); } }
Hello Drpoalim,
Can you specify which version of our controls are you using? Also if you can provide a complete sample that reproduces this will be the easiest way for us to investigate this issue.
Looking forward to hear from you.
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Were you able to handle this?
If you need further assistance do not hesitate to contact me.
It happened when I raised event from a control inside an update panel.
For now I may not need it in an update panel, so there is no problem now.