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.
Unfortunately, activation email could not send to your email. Please try again.

DataGrid not showing up

Thread ID:

Created:

Platform:

Replies:

4353 May 8,2003 12:59 PM Windows Forms 0
loading
Tags: FAQ
Jim Donahue
Asked On May 8, 2003 12:59 PM

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!

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;