Refresh Schema doesn't work

S

Steve Elliott

When you link an ObjectDataSource to a business object, it appears that the
Refresh Schema button does nothing. Here's the scenario:

I have two class libraries, one is a Data Access Layer and the other is a
List class. The former implements all of the CRUD logic, and the latter
implements a number of interfaces for the purpose of aggregate
functionality. For example, the following is the method I select when I
configure the object datasource for a class I call "Template" (No relation
to <Template>):

public static List<TemplateInfo> GetTemplates()
{
List<TemplateInfo> templates = new List<TemplateInfo>();

TemplateInfo[] templatelist =
TemplateData.GetTemplate();

foreach (TemplateInfo info in templatelist)
{
templates.Add(info);
}

return templates;
}

Now, all works fine, once I do that and link a GridView to the
ObjectDataSource, I see my columns and can manipulate them in design mode.
The problem occurs when I modify the underlying database object, perhaps
adding a column. In this case the TemplateInfo class is modified to store
the new fields. However nothing I do will cause those columns to appear in
the "Edit Columns" wizard. I tried "Refresh Schema" to no avail. I even ran
SQL Server Profiler to see what happens when Refresh Schema is selected -
Nada.

So, how do I get those columns to appear?

Thanks
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top