Problems with Drilldown Datagrid

Hi,

I have tried to reproduce the drilldown datagrid searching in asp.net in Visual Studio 9 using MS.Net 3.5 and I’m running into problems. I copied the code from the site but I’m getting an error that says “name MyDataGrid is not declared” I get the same error for subsrch, msg, count and all other text boxes. I tried to recreate the datagrid and text boxes by using the VS tools and renaming them but that didn’t work either. I still got the same errors with the new names. Any idea why this would happen?

thanks in advance for any help.

Are you referring to Site Point’s article? Anyways, in order to use an object, you need to declare it first… i.e.

DataGrid MyDataGrid = new DataGrid().

Then, you can use “MyDataGrid” object later in your code. But, VS should add it to your code-behind, when you drop it onto the form.