CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > microsoft_downloads.css_friendly_control_adapters Tags:
Item Type: NewsGroup Date Entered: 6/11/2006 3:17:23 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 74 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
AltairCom
Asp.Net User
FormView bug + fix6/11/2006 3:17:23 AM

0/0

When using FormViewAdapter, it crashes when FormView is empty (query had no results) with

Error is in FormViewAdapter.cs, line 29:
if (IsFormView && (ControlAsFormView.ItemTemplate != null))

Solution is:
if (IsFormView && (ControlAsFormView.ItemTemplate != null) && (ControlAsFormView.Row != null))

Russ Helfand
Asp.Net User
Re: FormView bug + fix6/14/2006 4:14:17 PM

0/0

Thanks for bringing this up.  There are actually several problems with the original "if" statement's expression. Checking the ItemTemplate is arbitrary and wrong.  This was pointed out to me previously. It is perfectly OK to create a FormView that is always shown in edit mode. In such cases, the FormView has just the EditItemTemplate, not the ItemTemplate, defined.  So checking for the existance of the ItemTemplate is simply wrong.

Whoops.  My bad.

I like your solution but I'd like to modify just a little to be:

C#

if (IsFormView &&
    (ControlAsFormView.Row != null) &&
    (ControlAsFormView.Row.Cells.Count > 0) &&
    (ControlAsFormView.Row.Cells[0].Controls.Count > 0))


VB

If (IsFormView AndAlso _
    (Not IsNothing(ControlAsFormView.Row)) AndAlso _
    (ControlAsFormView.Row.Cells.Count > 0) AndAlso _
    (ControlAsFormView.Row.Cells.Item(0).Controls.Count > 0)) Then

This is a bit safer and drops the clause that wrongly checked ItemTemplate.

What do you think?


Russ Helfand
Groovybits.com
AltairCom
Asp.Net User
Re: FormView bug + fix6/15/2006 1:12:52 AM

0/0

Seems you are probably right. I was not performing any deeper analysis (no time), just fixed my immediate problem.
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Beginning ASP.NET 2.0 Databases: From Novice to Professional Authors: Damien Foggon, Pages: 625, Published: 2006

Web:
FormView bug + fix - ASP.NET Forums FormView bug + fix. Last post 06-14-2006 9:12 PM by AltairCom. 2 replies. Sort Posts:. Oldest to newest, Newest to oldest ...
Feedback: DetailsView throws ArgumentOutOfRangeExcpetion for ... Please either fix this bug, or explain why you consider it to be "By Design"! ... Instead of displaying the EmptyDataTemplate, the FormView throws an ...
CodeProject: Control Arrays on a Dialog box/FormView. Free source ... Mar 1, 2005 ... (August 2005) Bug fix, problems running the code on a FormView dealt with. EN_UPDATE is used as opposed to EN_CHANGE . ...
[#SDK-5938] changing FormView.direction at runtime does not update ... This bug was imported from another system and requires review from a project ... ID = 14337 Build = 116190_Flex Fix Build ID = 14420 Fix Build = 116996_Flex ...
ADO.NET how to use the DEtailsView and FormView controls How to fix the optimistic concurrency bug, 444. How to create template fields, 446 ... A Vendor Maintenance application that uses a FormView control, 462 ...
dbrenneman - CIA.vc bugfix. #. 19:23 on Aug 22, 2007, blackbird. Commit by dbrenneman :: r2084 / orgtree/trunk/src/orgtree/browser/formview.py: (link). bugfix ...
asp:Wizard inside of a asp:FormView breacks two-way databinding ... by the product bug, you will not be charged for the case. The Microsoft PSS will supply the workaround or hot fix for the current issue. ...
CodeProject: Control Arrays on a Dialog box/FormView. Free source ... Here's a modified version of the project to cater for FormView apps as well. ..... (August 2005) Bug fix, problems running the code on a FormView dealt with ...
Feedback: Using a wizard in a formview to update and insert ... Type, Bug, ID, 105464. Status, Closed (Won't Fix), Access Restriction, Public ... I'm using a wizard inside a formview to view, edit/update and insert ...
Update Fails on FormView (DigitalColony.com) After a miserable afternoon chasing down this bug, I thought it may be ... My fix was to add the primary key to DataKeyNames field on the asp:FormView. ...




Search This Site:










pre fill textbox then capture new value

aspdotnetstorefront

calling a method from dynamically added usercontrol

deploying pages with sql database

using .asp to set a background color accoridng to server connection

robots.txt sitemap

internal site search engine

could not load type 'microsoft.visualbasic.helpers.stringtype'

printing asp.net

best way to learn how to create .net web sites?

using personal web design starter kit -- need to insert images

synchronizing outlook

regular expression question on number

vs2008 - ugly sybmols instead of russian letters

tabbing through text boxes on a web form

create user wizard

tyro's question

session variable in class

mathematical formlua for verifying a date as a holiday?

using the query string to pass values

dynamically set smartnavigation

vb or c#

user control state management

distinguishing human visits from bots

blank screen

request.urlreferrer.originalstring is not working properly?

redirecting to specific frames

reload page

importing of css file doesn't work. need help please-

runtime error but customerrors is off

  Privacy | Contact Us
All Times Are GMT