We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

DataGrid not showing up

I created a timed event handler to update a Windows DataGrid. After the event handler fires, only the first row of the datagrid shows up (the row with the *). My code is simple and straightforward but I'd appreciate any help on why my datagrid doesn't show my other columns: public MainForm() { // Required for Windows Form Designer InitializeComponent(); myTimer.Elapsed+= new ElapsedEventHandler(OnTimedEvent); myTimer.Interval= 2000; myTimer.Enabled=true; myTimer.Start(); } public void OnTimedEvent(object source, ElapsedEventArgs e) { myTimer.Stop(); DataSet myDS= GetActiveAlerts(); if( myDS!=null ) { this.MainGrid.SetDataBinding(myDS,"AM"); this.MainGrid.Expand(-1); this.MainGrid.Update(); this.MainGrid.Refresh(); } myTimer.Start(); } I know the dataset is returning the proper info. Again, all I see is the * column of the datagrid...it has the correct # of rows but no others columns appear. Thanks!

Loader.
Live Chat Icon For mobile
Up arrow icon