Search

You searched for the word(s): userid:791561

Matching Posts

  • Re: drawing text on graphics

    I was having a similar issue - but I switched to GIF output format and it's fine now.
    Posted to System.Drawing/GDI+ (Forum) by aschaible on 6/29/2009
  • Re: JSON Error: "A circular reference was detected while serializing an object of type ..."

    This post really helped me... Consider the following class: 1 [Serializable] 2 public class Lookup 3 { 4 public virtual int ? Id { get ; set ; } 5 public virtual string Name { get ; set ; } 6 7 public override bool Equals( object obj) 8 { 9 if (obj is Lookup) 10 { 11 Lookup that = obj as Lookup; 12 return this .Id.Equals(that.Id) && this .GetType().Equals(that.GetType()); 13 } 14 else 15 { 16 return false ; 17 } 18 } 19 public override int GetHashCode() 20 { 21 return Id.GetHashCode(); 22
  • Re: Can't use FindControl at a ListView EditItem at index 0

    It's most definately a bug with the ListView class .. Here's the documentation on EditIndex, notice where it specifies that it's a 0 based index. If you look at ListView.items, you will see a collection of items starting with 0, and ending with your page size - 1. They simply screwed up their logic. http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.listview.editindex.aspx
    Posted to Web Forms (Forum) by aschaible on 3/19/2008
  • Re: Can't use FindControl at a ListView EditItem at index 0

    Just call this method when you want to get the edititem: 1 public ListViewItem GetEditItem(ListView listview) 2 { 3 if (listview.EditIndex >= 0 && listview.EditIndex < listview.Items.Count) 4 { 5 return listview.Items[listview.EditIndex]; 6 } 7 else 8 { 9 return null ; 10 } 11 }
    Posted to Web Forms (Forum) by aschaible on 3/19/2008
  • Re: Can't use FindControl at a ListView EditItem at index 0

    I found the following post: If you set the EditIndex of a listview to 0, and then try and get the EditItem, it is null. EditIndex is documented as being zero-based. Stepping into the code you can see: 1 public virtual ListViewItem get_EditItem() 2 { 3 if (( this ._editIndex > 0) && ( this ._editIndex < this .Items.Count)) 4 { 5 return this .Items[ this ._editIndex]; 6 } 7 return null ; 8 } 9 10 ListView.Items[ 0 ] returns the correct item.
    Posted to Web Forms (Forum) by aschaible on 3/19/2008
  • Re: Can't use FindControl at a ListView EditItem at index 0

    I'm having the same problem... I'm calling this code from an asp custom validator.. here's my method: 1 protected virtual void EditBANValid( object sender, ServerValidateEventArgs e) 2 { 3 TextBox BAN = BanListView.EditItem.FindControl( "EditBAN" ) as TextBox; 4 TextBox EditCustomer = BanListView.EditItem.FindControl( "EditCustomer" ) as TextBox; 5 BillingAccount billingAccount = PersistenceService.getBillingAccountByBAN(BAN.Text); 6 if (billingAccount == null || billingAccount
    Posted to Web Forms (Forum) by aschaible on 3/19/2008
Page 1 of 1 (6 items)