Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Odd glitch with datagrids...

Status
Not open for further replies.

mattbold

Programmer
Oct 5, 2001
45
0
0
GB
Hello,

On my site I have a selection of datagrids, but on the majority of them this peculiar thing happens...

1. The datagrid works nicely
2. I Edit the columns in any way, eg add a new one
3. Datagrid doesn't show up anymore
4. Remove the new column so it is how it was in stage 1, and try again
5. Datagrid still doesn't show up

however if i create the datagrid on a different page, or copy it into another page and make the alterations there, then copy it back to the original page it was on, it works fine...

Does anyone know why this would be happening? perhaps i've inadvertently clicked something or changed a setting that is causing this to happen?

any help would be greatly appreciated!
- matt
 
The most common thing that makes a datagrid not appear is the omission of databinding the grid...

MyDataGrid.DataBind();

Is it possible that you've forgotten to do this?

-paul

penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
no i don't think so - because it works fine, then when i alter something in the properties it goes wrong, without touching the code behind at all...
 
Is your datagrid in a panel that has its visible property set to false? If so, each time you access the panel, it can reset its visible property to false. Then, when you run your code and set the panel's visible property to true, the datagrid is still hidden.

I may be assuming too much, but I have seen this happen!



Kevin B.
.Net Programmer [thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top