GridView doesn't refresh it's schema after the object data source's GetData() method returns additional fields .

Hi .

I am creating an ASP.NET web site and have the following problem :

 
  1. I have a GridView which bound to the object data source.
  2. This object data source is SQL Table adapter that I added to the data set via IDE .
  3. The method GetData of this table adapter uses existing stored procedure on my SQL 2005 server.
  4. Everything worked fine , until I made a changes to the stored procedure ( the new result records have additional fields )  .
 

The problem is :

 

The new fields don’t appear in the grid .

Note : When I right click to the GetData method inside the table adapter  and select “Preview Data” , it SHOWS the new fields retrieved by this sproc .

I tried to press “Refresh schema” in all possible places – it didn’t help .

The only way I was able to solve the issue is to create a NEW table adapter , to add AGAIN all methods , to bind AGAIN the gridview to th GetData() of this new table adapter  , to edit AGAIN all fields of the grid ….

It looks like a Microsoft bug, or (hopefully) I am missing something ….

Any suggestions ?  

Thanks in advance ,

Orit Chanukov .

 

0
Orit
6/26/2007 5:38:11 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

1 Replies
808 Views

Similar Articles

[PageSpeed] 1

Hi Orit,

This is a common asked question. As far as I can see, this is by design. The DataSet designer that creates the TableAdapter will create the DataTable according to the schema it gets the first time it sees the stored procedure.

However, if you have changed the schema of return data from the stored procedure, you have 2 options

1. Create a new TableAdapter.
2. Right click on the original TableAdapter and select Configure... Go through all the steps and after finish, the schema will be refreshed.

If this does not answer your question, please feel free to mark the post as Not Answered and reply. Thank you!


Sincerely,
Kevin Yu
Microsoft Online Community Support

Please remember to click “Mark as Answer” on the post that helps you, and to click “Mark as Not Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
0
Kevin
6/28/2007 5:16:33 AM
Reply:

Similar Artilces:

The value's length for key 'data source' exceeds it's limit of '128'.
Hii, When I tried to bind dropdownlist to database by declaring connection string in the code behind file I am getting this error: The value's length for key 'data source' exceeds it's limit of '128'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: The value's length for key 'data source' exceeds it's limit of '128'.Source Error: An...

First gridview's selected row doesn't update second gridview's objectdatasource
 HelloI got 2 gridviews on a page, each with its own ObjectDataSource. The first gridview fills itself just normally, no problem there. The second gridview needs to fill itself with other data, where the primary key is the primary key of the selected row of the first gridview.schematically:gridview1 row: IDfield, x, y, zrow: IDfield, x, y, z (-> this row is selected)row: IDfield, x, y, z gridview2 row:IDfield_of_selected_row_in_gridview1, a, b, c I tried to do this by configuring the ObjectDataSource behind gridview2 with a parameter pointing to gridview1.selectedValue. (by usin...

TabContainer's height doesn't respecting child GridView's height
Well, it's not that complex:I have a TabContainer with 4 tabs. In the first 2 I have different GridViews, but I'm actually only working with the first one.There's no UpdatePanel, no crazy situations, it's a simple GridView with an associated ObjectDataSource, wich will DataBind the GridView in every PostBack (yes, normal, simple, server-side PostBack) based on the value of a TextBox. And this value is only changed on the click of a ImageButton. All of this happens on the Server side.BUT, in the initial load of the page, the GridView is empty, as is the TabPanel. After the fir...

'Tab' control 's visible doesn't work.Why?
I use tab control in my applition. And I set visible=false, but it doesn't work. my code is: ----------------------------------------------- <asp:ScriptManager ID="ScriptManager1" runat="server" />  <div>   <ajaxToolkit:TabContainer runat="server" ID="Tabs" Height="138px" ActiveTabIndex="0"    Width="402px">    <ajaxToolkit:TabPanel runat="server" ID="Panel1" HeaderText="Tab1" Visible="f...

Replace 1's and 0's in a gridview column with Yes's and No's
Is it possible to change the display of a column in a gridview to show a Yes for all 1's and a No for 0's that display in a particular column of a gridview bound to a database?  If so, can someone share the way with me?  I am using ASP.NET 2.0 with VB Code Behind.  Thanks One way you can do is thrrough  CASE in your select statement: Select YesNoColumn= CASE yourColumn WHEN 1 THEN 'Yes' WHEN 0 THEN 'No' ELSE '' END FROM YourtableLimno <Columns>     <asp:TemplateField HeaderText="yourHeader" SortExpression="yourDataField"> ...

Label control's text doesn't appear to be set (in the page which has a user control )when trying to update the text property in the FormView's ItemUpdated event
Hi There,I have a user control which hosts a formview control, gridview control and a label control. The grid view is usedto show rows in the DB and when clicked to edit each row, a form view opens up in edit mode with that particular row info. So I have nothing in the item template.My first question is..is it mandatory to have smth in the itemtemplate of the form view.I have controls in edititemtemplate and insertitemtemplate.When a particular row is edited, I would like to show a status msg showing that the row has been updated.For this, I use the ItemUpdated event of the formview and try ...

how to control a RadioButtonList's Listitem's text show according database's field
Hi my page has a repeater control,in repeater has a RadioButtonList control now i want to let the RadioButtonList has four Listitem,every Listitem's text is a database's field so the listitem can show dynamic according every record how can i work out my problem thanks a lot  hello dearbound your RadioButtonList to database if i m not clear fell free 4 replySatyabrat SinghB.E.(C.Sc.)Web developer Livetek Solution Dont forget to click "Mark as Answer" on the post that helped you. yes.i bound the radiobuttonlist to a dataset but how to display the ...

Repost: FF won't show gif's nor jpg's Red X's
XP sp2 FF 2.0.0.4 extentions: Adblock Plus Copy plain text Fasterfox Firebug FireFTP McAfee SiteAdvisor NoScript Talkback Video Downloader Pic's show red x's. These pics show just fine in Internet Explorer and Netscape. Anyone have any ideas????? Fasterfox, I guess. See what happens if you disable it (or just disable its pipelining feature). -- �Q� =============== Thank you Q. I disabled all of them, one at a time (restarting each time) and the problem still exists :-( digimomma On 7/12/2007 5:26 PM digimom inquired: > Thank y...

What's wrong with DataBind() in GridView control? The data in GridView can't be updated when the datasource have changed!
What's wrong with DataBind() in GridView control? The data in GridView can't be updated when the datasource have changed! I bind the different datasource to the Gridview when I change the node of TreeView, the GridView control always display the same data when I click different the node of TreeView control,why?but I can get the different data in GridView when I click the Button1 or Button2. //-------------------Program Code (You may save it as a ASPX file and run it)--------------------------------<%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http:/...

It's Linux !? No, it's BSD ! No, no, it's...
kFreeBSD http://wiki.debian.org/Debian_GNU/kFreeBSD a Debian distro using the FreeBSD kernel ! ObiWan wrote: > kFreeBSD > > http://wiki.debian.org/Debian_GNU/kFreeBSD > > a Debian distro using the FreeBSD kernel ! Why use a BSD kernel? I hope the reason is more than, just because they can. http://wiki.debian.org/Debian_GNU/kFreeBSD_why It's easy to understand why the would want to use Debian packages. :) -- Jimmy Johnson Registered Linux User #380263 >> kFreeBSD >> >> http://wiki.debian.org/Debian_GNU/kFreeBSD >> ...

Cannot wrap 'Element''s 'addEventListener' method
On Firefox ( v2 and v3, and probably the earlier versions) it does not seem possible, at least under some circumstances, to extend the 'addEventListener' prototype of the 'Element' object in JS or to extend the prototype of its inheriting objects. This forces JavaScript frameworks that would like to leverage Element's prototype for this (or its inheriting objects) to treat Firefox like IE in this case -- they have to perform an extension operation on every single individual dom element that they need framework-style behavior from. That's a significant performan...

''''''''''''''''''''
Name: haznen Email: haznenatyahoodotcom Product: Gran Paradiso Alpha 8 Summary: '''''''''''''''''''' Comments: '''''''''''''''''''''''''''''''''''' Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061204 UGES/1.7.2.0 GranParadiso/3.0a1 From URL: http://www.mozilla.org/projects/granparadiso/ Note to readers: Hendrix gives...

How to bind GridView's DataSource to an object's List<T> property??
Hi all, I really hope someone has a solution for this. I'm using ObjectDataSource throughout my project. I have an Order class which has, among other properties, a List<Product> ProductList property and a GetProductList method. I use GridView template field to present a list of Orders. For each column, I can, for example, bind a textbox to the OrderID property of my underlying Order object. I can achieve this by simply clicking the textbox's datbindings and associate the Text property to the exposed OrderID field in the underlying Order object. This works fine. I now ...

One of the iManager's doesn't have 'Module Installation' under Configure?
Well, I'm a bit 'confused', one of the servers' imanager doesn't have the Module Installation showing under Configure. What to do? NW6.5SP5upd1 -- /fribse Please ask this in the iManager forum, thanks. -- Andrew C Taubman Novell Support Forums Volunteer SysOp http://support.novell.com/forums (Sorry, support is not provided via e-mail) Opinions expressed above are not necessarily those of Novell Inc. NetwareGuy wrote: >one of the servers' imanager doesn't have >the Module Installation showing under Configure. uninstall and r...

Web resources about - GridView doesn't refresh it's schema after the object data source's GetData() method returns additional fields . - asp.net.presentation-controls

Resources last updated: 1/5/2016 2:18:01 PM