.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

EF4 DD site, change the Display Name of a table?

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :ASP.Net

I'm using .net 4 with a link to entities web application, and I"ve got the data annotations starting to work, but I'm wondering if there is a way to display a friendly name for my tables?

this code gives me a compilation error that says:

Error 1 Attribute 'Display' is not valid on this declaration type. It is only valid on 'method, property, indexer, field, param' declarations. C:\Kens Files Oct 2010\Visual Studio 2008\Projects\ManagementAndDiagnosticsWeb\EFWebApp\EntityClasses\ScaffoldRules.cs 37 10 EFWebApp

public class ClientMachineMetaData

View Complete Post

More Related Resource Links

Display column from child table. Possible ?



I'am using dnamic entity with EF4. On a list page of a table, I would like to display a column containing information from a child table of the current element. Sample :

Order List :

Order Data | Required Date | Shipped Date | etc... | ... | Customer Name (foreign key with tostring() method override) | Customer Postal Code (Column that I want to add) |

I don't known how to do that. Is it possible ? Maybe I have to to create my own Metadata proxy that will add dynamicly a column on the MetaColumn list of the table.

Does someone have an easier or better idea ?

Thank you for any help.

Change grid view from table to other HTML layout



You'll have to excuse my ignorance, I'm coming at this from a front-end perspective, and don't really know how to deal with data views in ASP.NET.

Basically, I'm trying to change the layout of some repeated data from a straight table, to something more design-heavy.  It's the same data, just re-organised slightly.  The current ASP.NET code looks like this:

                    <asp:GridView ID="GVMoments" runat="server" AllowPaging="True" AllowSorting="True"
                        AutoGenerateColumns="False" PageSize="20" RowHeaderColumn="FirstName"
                        SkinID="GroupSkin" DataKeyNames="moment_id" 
                        <PagerSettings Mode="NumericFirstLast" PageButtonCount="20" Position="TopAndBottom" />
                        <RowStyle />
                                <asp:BoundField DataField="moment_id" HeaderText="moment_id" ReadOnly="True" SortExpression="moment_id"
                                    Visible="False" In

how to display bread-crumb always starting from the root-web of the site collection, not the current

Hello all, In sharepoint 2010, the breadcrumb shown in the title area starts from the site you are currently into. Suppose my root web is Home and I have a subsite called Child1 and under this subsite I have another subsite called GrandChild1 My requirement : when I am at Home site .. currently the bread crumb shows Home .. as expected it shows Home when I am at Child1 site .. currently the bread crumb shows Child1 .. expecting it to be Home > Child1 when I am at Child1 site .. currently the bread crumb shows GrandChild1 .. expecting it to be Home > Child1 > GrandChild1   How can I achieve this ? Thanks mano   Mano Mangaldas | Blog : http://howtosharepoint.blogspot.com 

Display specific table from the start vs selecting from a list.

Hello all, I'm using VS2010, EF 4.0. I want to display a list view from a specific table from the start -instead of the standard default page that list all the tables. Any ideas are welcome. 

How to change connection string of a pivot table pointing to SSAS 2005 cube using excel 2003?

Hi All,I am not sure if I should have posted this query to Excel 2003 forum. But posting it here as it applies to SSAS 2005 as well.Ok, let me give the background before I tell the actual problem.We have users on ABC domain and the SSAS server is also on ABC domain. Users on this domain can acess the excel pivots by connecting to cube to browse the data. They leave the Userid & password field blank while they setup the connection string and it works fine. Thanks to windows authentication that takes the credentials of user logged in. Let's say I have two users A and B, they login to ABC domain with their own windows ids.  Now when user A creates a excel file having a cube pivot and then sends this file to user B, user B can refresh and modify the same excel file (he can select new measures to pivot, new hierarchies in filters and so on).Now, let's say I have another user, user C. He has excel 2003 installed on his PC and cannot migrate to excel 2007. He is on different domain XYZ but have a valid windows userid on domain ABC. The domain ABC & XYZ can not be setup to have trusted relationship. Now, when user A sends the same excel file to user C. When user C opens the file and try to refresh it or try to modify the pivot by selecting/deselecting any elements, he gets below error prompt:" An error was encountered in the transport layer." and "Errors in the

Alternate languages - change on exisitng site

Hello. I need a help. When i choose in Site Actions -> Alternate languages and then on System account choose "Select Display Language". Work for RIBBON row and for all fields. But not work for a Quick Launch Menu. I have a .resx for Slovenian and English. I think i need some web update event receiver, but i do not find. If i use a template of SharePoint 2010 it's work also  Quick Launch Menu.

Display photo on MOSS site from external source

Hi, I am using Visual Studio 2008 and MOSS 2007. I want to develop one custom web part which will show photo of the day from one particular group of Flicker photo site.tant links. Can anyone suggest me best approach to achieve this? I would appreciate, if anyone can send me some related impor

Internet facing SharePoint site - user shouldn't have to log in to change the langague

Hello, I am using SharePoint 2010 for Internet sites.  Anonymous access has been enabled.  Language packs have been installed so that users can switch to different languages as required.  However, the only way for a different language to be selected other than the default is for the user to log into the site and then the option would be displayed.....This is an internet facing site with anonymous access therefore users shouldn't have to log in to change the language.  Can someone guide/advise on switching the lanuguage of the site without loggin in. Thanks, Shelley

How to change WSS 3.0 Home site language?

Hi there, I have WSS 3.0 + internal database + Latvian language instaled, but home site is still in English, how to change home site language ?

SharePoint 2010 new site collection display blank page

I'm using Windows Vista SP2 and trying to learn Sharepoint 2010. I'm new to Sharepoint and I'm sorry if I'm asking something very simple. I've successfully installed Sharepoint foundation 2010 and VS 2010. According to the installation instruction if the installation is successful I should see the new sharepoint website home page or ask for login info which will take to the home page. But for me it displayed a blank web page. I was able to get to Sharepoint Central administration page by clicking the browse option from IIS, it asked me login info and when I provided that I was able to see the Sharepoint central administration page. Now I am trying to create a new site collection, it is succesfully creating the new site collection and showing the link, but when I access the link I see a blank webpage. I think it is some permission issue and if the program prompts login, it should work, but how can I get to the login window or how can I see the home page and not a blank page? Thanks

Alternate languages - change on existing site

Hello. I need a help. In my template, when i choose in Site Actions -> Alternate languages and then on System account choose "Select Display Language". Work for RIBBON row and for all fields. But not work for a Quick Launch Menu. I have a .resx for Slovenian and English. I think i need some web update event receiver, but i do not find. If i use a template of SharePoint 2010 it's work also  Quick Launch Menu.

How do I change the top menu navigation for layouts like Site Settings?

I used something similiar to what Kalik posted on this thread, however, I'm not seeing the same results in layouts like Site Settings.  Any answers would be appreciated. Thank you, Mike ADD TO TOP LINE! <%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> ADD IN HEADER AREA! <PublishingNavigation:PortalSiteMapDataSource ID="siteMapDataSource1" runat="server" SiteMapProvider="CombinedNavSiteMapProvider" EnableViewState="true" StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="false" TreatStartingNodeAsCurrent="true" TrimNonCurrentTypes="Heading"/> </HEAD> REPLACE STANDARD TOP NAV CODE! <!--- Modified Top Nav ---->    <SharePoint:aspmenu    ID="GlobalNav"    Runat="server"    DataSourceID="siteMapDataSource1"    Orientation="Horizontal"     MaximumDynamicDisplayLevels="1"     StaticPopoutImageUrl="/_layouts/images/menudark.gif"    StaticSubMenuIndent="0px"  &nb

Change the Icon from Internet Explorer to SharePoint site logo

Hi, I want to Change the Icon from Internet Explorer icon to SharePoint site logo when they open the page. please any one can help me Thanks  

How do I change the top site?

Hi, I have setup a sharepoint site for my work but they want to change the top site to another type. Currently it is a publishing page but they want to switch it to something else like a document center. They are still deciding... But I can't see how to do this without deleting all the subsites. Which I don't want to do as I have put in a lot of work. Is this possible? Could someone please point me in the right direction? Much thanks. Tony

IDragSource bug over a hidden (display:none) table row with IE browser

I'm currently trying to create an Extender to move Gridview row order. Some of they are hidden by setting their property display to 'none'.Because the gridview act like a treeview with node that can be expanded or collapsed.From there all is well working, except with Internet explorer !Here is the problem :    When hiding a row, the drag operation works properly until the mouse reach a row having one or more preceding row hiddens.I create a some code to reproduce the bug.    1 - Open the sample in Internet Explorer and try dragging rows. You will then notice that all is well working.    2 - Now, click on the button "Toggle rows display" and retry dragging row 1 over the row 10. You will notice that when the mouse reach the row 5,          the drag operation stuck on the header of the table.    Now open the sample in FireFox, Google Chrome, Safari and repeat the same operation. You will notice that all is well working.ASPX Page :<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test3.aspx.cs" Inherits="Test3" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml&

Managing TypedDataSets when there is a change in backend Table / Stored Procedure / Database schema

Hi All, I am just curious to know if there is any easier way to synchronize the TypedDataSets with the chages made to backend Table / Stored Procedure schema.  I use Typed DataSets in my project extensively and I found them very useful and easier to code, but difficult to maintain  The difficuly I have always faced is whenever there is a change in a backend database table structure or stored procedure that is linked to any of the Typed DataSet in our project requires to recreate whole DataSet again by scrapping the old one. The backend changes will not be reflected unless and untill you recreate the whole stuff again. Is there any easier way to synchronize those typed datasets with the changes made to backend database schema or any other workaround that will not required to recreate the whole DataSet again.Hope above question makes sense. Any ideas.

web part to display recent changes on all items in site

Hi, Is there any web part like content Query to list all the changes made to the site say document uploaded, deleted, users added on the home page in SharePoint 2010 sites? If there is any third party web part also, please let me know.   Regards, Garima
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