tag:blogger.com,1999:blog-6907873803403737979.post6812254327854472320..comments2023-10-16T12:48:46.251+01:00Comments on C# Bits: DynamicData Default Values in ForegnKey_Edit & other FieldTemplatesStephen J. Naughtonhttp://www.blogger.com/profile/17435527974910745156noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-6907873803403737979.post-43259867975639470702012-08-30T08:50:48.842+01:002012-08-30T08:50:48.842+01:00can you e-mail me direct my e-mail is in the top r...can you e-mail me direct my e-mail is in the top right of this site.<br /><br />SteveStephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-932635751447587952012-08-30T01:41:20.010+01:002012-08-30T01:41:20.010+01:00Thanks, Steve. Do you think I should intercept the...Thanks, Steve. Do you think I should intercept the NavigateURL property to have it to generate the Navigation property instead of the FK column?<br /><br />Do you have any suggestion on what's the correct way to solve this in order to have the Company auto-selected in the 'add new employee' page?<br /><br />Thanks.redevolvenoreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-61525026032877729332012-08-29T11:52:55.968+01:002012-08-29T11:52:55.968+01:00Hi redevolve, this is correct as the FK column in ...Hi redevolve, this is correct as the FK column in the DB would be CompanyId and the Navigation Property is Company.<br /><br />This is easy to see in Entity Framework but not so easy in Linq to SQL.<br /><br />SteveStephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-47539566454219628282012-08-29T11:06:44.795+01:002012-08-29T11:06:44.795+01:00Hi Steve, I have an issue with the DynamicHyperLin...Hi Steve, I have an issue with the DynamicHyperLink's URL that was generated using the wrong column name.<br />In my metadata, I have my Employee class plus, a property column [int CompanyId] and another [Company Company] property.<br />The DynamicHyperLink generates a URL with the Query Parameter, CompanyId=xx instead of Company=xx. However, the ForeignKey field template's Column.Name is 'Company'.redevolvenoreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-22334002099723955592010-07-13T11:01:05.838+01:002010-07-13T11:01:05.838+01:00Hi Tali, move the code to the pages Pre-Render eve...Hi Tali, move the code to the pages Pre-Render event.<br /><br />Steve :DStephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-62908355661343798992010-07-13T09:32:18.743+01:002010-07-13T09:32:18.743+01:00Hi,
page_init in VS10 looks different and I tried ...Hi,<br />page_init in VS10 looks different and I tried it in a different ways but or it is avoiding the change or I have an error:<br />"Exception Details: System.ArgumentNullException: Value cannot be null.<br />Parameter name: dictionary"<br /><br />Do you know What I should do ?talinoreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-31858464520119194562010-02-10T00:12:57.850+00:002010-02-10T00:12:57.850+00:00Hi Anon :) if you send me an e-mail direct (my add...Hi Anon :) if you send me an e-mail direct (my address is at the top right of the page) we can have a chat and see what is the best way to do what you want.<br /><br />Steve :DStephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-38825381122780842562010-02-09T22:39:06.396+00:002010-02-09T22:39:06.396+00:00This is fantastic and works great!
Now my issue is...This is fantastic and works great!<br />Now my issue is that I need to get this information passed back to the list page after the user clicks Insert or Cancel. It would be great if I could just carry the querystring forward, but that doesn't work. The list page expects query string keys of "Table.ID=X" or on lists with multiple filters "TableID=X". I wrote a very ugly hack to accomplish this but if you had any ideas to point me in a better direction that would be much appreciated. Thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-72584823359185801192010-01-14T20:15:59.240+00:002010-01-14T20:15:59.240+00:00nice, worked like a charmnice, worked like a charmAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-84733254758879790142009-02-16T12:36:00.000+00:002009-02-16T12:36:00.000+00:00Thank you so much for this brilliant listing. All...Thank you so much for this brilliant listing. Allowed me to do exactly what I needed. Ive used your blog for lots of dynamic data tid bits and it continues to be of great use! Keep up the good work!Anonymousnoreply@blogger.com