.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

EntityDataSource not showing all columns

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :ASP.Net

I have an EntityDataSource which when I configure the data source via the wizard, I do the following (and it is driving me NUTS):

Select the only option available for Named Connection: BTSModelContainer which then fills in DefaultContainerName.  When I click on Next, and change the EntitySetName to Jobs I'm missing a couple of the (fairly newly added) columns.  I went through the xml up and down and can't figure out why.  Everything seems to be mapped properly and when I access the properties of a single Job, I see those properties.  The visual map (edmx) shows them, the xml markup shows them, they appear in the strongly-typed entity instance but not in that wizard so I can't get those columns to show up.  Any ideas?

I know this is QUITE long but I'm just going to paste the xml from the model anyway below just so anyone looking at this has it.  I'm missing the Description and DDSId columns and have everything else. Also, just so you know, I've tried adding a new EntityDataSource (even on a completely new aspx page), closing and reopening Visual Studio (2010 / EF 4.0), and deleting that table from the model and readding it with "Update Model from database" and selecting that table.  None of them seemed to do the trick.  Any help would be appreciated.  Thank you in advance!!!

View Complete Post

More Related Resource Links

Hiding and showing the columns depends upon the filter condition

H,   We developed around 70 ssrs reports for our new application.Its like,all the report names are menrioned in the left hand side and if we click it,.Net calls the SSRS reports and shows the filters in the top of Right hand side.   We will select some filters there and then 'GO', it will fetch records. The issue now is, assume we have 6 columns in the report and depends upon the selection in the filter area, the columns should vanish.is it possible?

showing NULL under "Amount" and "Type" columns

When i run this code it brings back data for "Amount" and "Type" columns for 1st week only, and for rest of 14 weeks it shows NULL under "Amount" and "Type" columns.
I need to get the date for all 15 weeks under "Amount" and "Type" columns.
@parm_account Varchar(50),
@parm_currency Varchar(10),

@parm_location Varchar(50),

--@parm_month Int,

@parm_week Int,

@parm_year Int

--SET @parm_account = 'CITINETTING-417A'
--SET @parm_account = 'CPS-465-USD'
SET @parm_account = 'WAR-458-USD'

SET @parm_currency = 'USD'

--SET @parm_location = '(417A) - Cebu, Philippines Div. Office TM'
--SET @parm_location = '(465) - Juarez Div. Ofc. (368) - Juarez, Mexico'
SET @parm_location = '(458) - Tampa, FL'

--SET @parm_month = 1

SET @parm_week = 1

SET @parm_year = 2009

CREATE TABLE #date_fill( 

      date   DateTime,

      year   Int,

      week   Int


DECLARE @date_from DateTime

DECLARE @date_to DateTime
--SELECT @date_from = Min(beginday) FROM Lex_Reporting.lex.learfiscalcal WHERE year = @parm_year and month = @parm_month

SELECT @date_from = Min(beginday) FROM Reporting.fiscalcal WHERE year = @parm_year and week = @parm_week

--SELECT @date_to = Max(endday) FROM Reporting.fiscalcal WHERE year = @parm_year and month = @parm_month
SELECT @date_to = (SELECT max(T.MaxEnddate

Not showing columns with SqlMetaData in a clr procedure


I have a class that has 10 properties that I am retrieving from db.  After I retrieve it and manipulate it (in visual studio using CLR procedure) I set up my SqlMetaData  to only display 9 of the ten columns.  When I deploy the solution and run from SQL, I get no results. 

If I go back and edit my SqlMetaData to show all 10 columns, then I do get the results in SQL. 

How do I set it up so only 9 columns are returned instead of 10?


MS SQL Server: Search All Tables, Columns & Rows For Data or Keyword Query

If you need to search your entire database for specific data, this query will come in handy.

So when a client needs a custom report or some sort of custom development using Great Plains, most of the time I will have to track down the data in the system by running this query and find the table(s) it is in.

Adding Multiple Columns and Rows in GridView without using a Database

This article describes on how to add multiple columns and rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in each TextBoxes on Button Click and retain the GridView data on post back.

add columns with textboxes in gridview using C#

'm working on a shopping cart in a website and I have my items(which have been added to the cart) in an arraylist. And using these values I've read the rest of the values from the db and and have populated on the gridview successfully.

Custom Editing Behavior for DataGridView TextBox Columns

For various reasons I'm using a DataGridView instead of a ListView, and while configuring the DataGridView to look like a ListView wasn't much of a problem, there's one thing that got on my nerves, which is the behavior of textbox cells in edit mode: It is much too easy to leave the edit mode accidentally, simply by pressing the cursor keys at the wrong time. For example when the text caret is positioned behind the last character of the textbox cell content, and you press the right arrow key

Sorting GridView Columns Manually

We all know that GridView columns can be sorted automatically when SQLDataSource is being used. But what if you are not using SqlDataSource to populate the GridView. Sorting the GridView manually is pretty straight forward task take a look at the code below

dynamically adding sql server columns based on number of files in fileuploader


I want to create a new table to sql database at runtime.  The column names would be "Name", "Date", "Event".  I would also like to have one more column name "Image" but the problem is that since the amount of images will vary, I want the application to count the amount of files in the Multiple fileuploader and then add a image column to the table for the respected amount of files. 

For example if i am uploading 3 files in the multiple fileuploader, the names should be "Name", "Date", "Event", "Image1", "image2", Image3"

I also would like that table name to be name dynamically from the textbox Name when the user enters the information.


I have the following code to make a new table, but I dont know how to name the fields at runtime like previously asked please help!!!


Dim objConn As New SqlConnection("Server=<servername>;uid=<userid>;pwd=<password>;database=master")


want to execute url without showing that page or url to client.


hello friends,

I need ur help,what i want to do is to execute a url ("To send a text message to client") on client registration but without showing that url page, in short executing url without displaying any page or url to the client.

please help and thanks in advance.

How to let user edit selected gridview columns, not entire row



I've got a gridview I would like to let the user edit a couple of columns.  Seems like everything I'm coming across so far makes the entire row editable.  

Hopefully the solution isn't too complicated.  Can someone point me in the right direction?


Trouble with UpdateProgress showing...


Recently I converted a project to VS.NET2010 and ASP.NET 4.0 (not convinced this is the problem, but regardless this is when the problem began) and now I am having an issue with an AJAX UpdateProgress showing. Here is the abrriviated code:

   <asp:UpdatePanel ID="UpdatePanelPostPageLoad" runat="server">
         <asp:Timer ID="tmrPostPageLoad" Enabled="false" Interval="100" OnTick="PostPageLoad_LoadData"
         <asp:Timer ID="tmrPostPageLoadPt2" Enabled="false" Interval="1" OnTick="PostPageLoad_LoadDataPt2"
         <%--Placing the UpdateProgress inside the UpdatePanel targeted--%>
         <asp:UpdateProgress ID="UpdateProgressPostPageLoad" runat="server" DisplayAfter="0" AssociatedUpdatePanelID="UpdatePanelPostPageLoad">
                       Updating blah blah....


DAL Dataset showing all the column


I follow the tutorial and create DAL with Dataset. I created a Table Adapter with many column, but when i Call a simple Get for 2 column only. The system display 2 column and the rest column with empty data.

My question is that will this affect the performance? because i only need 2 column.

example: Table with 40 column define in Dataset in DAL. I have GetMember from Dataset with 40 column, some request only 1 column (with 39 empty), some request 22 column (with 18 empty column). Will this affact the performance?

Should i create a seperate DatasetAllColumn, Dataset1Column, Dataset22Column ?? so system only return exact column i need. and hofully the performance is optimized to it best.

How to change text in columns in SSRS?


I need to create a complex report and export it to Excel. 

In the first column header, text is displayed as "Hide Daily Columns", but I need the text to change as "Unhide Daily columns" when I click on it and when the text changes the columns under "daily" header (I have 3 columns under this header) present in the report shud be hidden and only weekly columns shud be visible. Any ideas please. I am new to SSRS and tried out many ways but didn't get it.

Showing filtered Records in Crystal Report as per User Requirement


ReportDocument reportDocument = new ReportDocument();
    ParameterField paramField = new ParameterField();
    ParameterFields paramFields = new ParameterFields();
    ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
    protected void Page_Load(object sender, EventArgs e)
        if (!IsPostBack)
            paramField.Name = "@Ext";
            //*Remember to reconstruct the paramDiscreteValue and paramField objects
            paramDiscreteValue.Value = 44854
            CrystalReportViewer1.ParameterFieldInfo = paramFields;

Dynamic Data Entities Modal GridViewPager not showing


I am using the ModalEF template, converted to a web application.

The GridViewPager is not showing up, though everything else works fine (filters, updates, etc).

I have tried several things in the last two weeks, to no avail.

Any assistance would be greatly appreciated.

The GridViewPager.ascx.cs Page_Load fires, but the Page_PreRender does not.




<%@ Page Title="" Language="C#" MasterPageFile="~/DefaultMaster.master" AutoEventWireup="True" CodeBehind="ListDetailsModal.aspx.cs" Inherits="DATTWeb.DynamicData.PageTemplates.ListDetailsModal" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolKit" %>
<%@ Register Assembly="System.Web.Entity, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.Web.UI.WebControls" tagprefix="asp" %>

<%@ Register src="~/DynamicData/Content/GridViewPager.ascx" tagname="GridViewPager" tagprefix="asp" %>
<%@ Register src="~/DynamicData/Content/FilterUserControl.ascx" tagname="DynamicFilter" tagprefix="asp" %>

<asp:Content ID="Content2&quo

EntityDataSource Where Clause in ViewState?



I have ListView/DataPager on the page that I use together with an EntityDataSource, because I want to filter the results, I programmatically set the Where-property and the WhereParameters of the EntityDataSource.

But: After the Paging-Postback the Value for Where is gone (empty string) whereas the WhereParameters are still there. Isn't the where value saved in ViewState as well? Can I change this behaviour?

Thanx, S.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend