Hi Ricardo!

See the same problem:
http://journalofasoftwaredev.wordpress.com/2008/04/19/nhibernate-exception-unexpected-row-count-0-expected-1/

How to define "unsaved-value=-1" on Castle?

Welkson



----- Original Message ----- 
From: "Ricardo Borges" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, November 18, 2008 4:30 PM
Subject: Re: AR + GridView + Delete Method



Welkson,

With gridview, I prefer to use TemplateFiels, you have more control...
without ObjectDataSource

Something like:

                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:ImageButton
OnClick="DeleteButton_Click" CommandArgument="<%#Bind("Id") %>"
ImageUrl="~/Images/delete.gif" runat="server" ID="DeleteButton"/>
                            </ItemTemplate>
                        </asp:TemplateField>


But in small applications ObjectDataSource can be an easy way...






2008/11/18 Tuna Toksöz <[EMAIL PROTECTED]>:
> You'll probably need to use the events on gridview.
>
> On Tue, Nov 18, 2008 at 8:05 PM, Welkson Renny de Medeiros
> <[EMAIL PROTECTED]> wrote:
>>
>> Hi Castle-Users =)
>>
>>
>> Sorry by my poor english.
>>
>> ActiveRecord Delete Method dont work with GridView + ObjectDataSource on
>> ButtonType is IMAGE (LINK and BUTTON work).
>>
>> See on demo:
>>
>> http://www.focusautomacao.com.br/activerecord/Database.zip  (SQL Server
>> backup)
>>
>> http://www.focusautomacao.com.br/activerecord/GridViewAR.zip  (VS 
>> Solution
>> -
>> Tested on Visual Web Developer 2008 - Express)
>>
>> Please help-me.
>>
>> Thanks in advance.
>>
>> Welkson
>>
>>
>>
>
>
>
> --
> Tuna Toksöz
>
> Typos included to enhance the readers attention!
>
> >
>



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to