Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3550
Grid does not get filled on custom event
posted

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();      
    }
   
   
}




Parents
  • 7566
    posted

    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://es.infragistics.com/support

Reply Children