Click here to Skip to main content
15,906,645 members
Home / Discussions / C#
   

C#

 
Questionhow to use the same variable in c#, in HTML Pin
Jug-Head1-Nov-04 18:40
Jug-Head1-Nov-04 18:40 
QuestionWhat is the difference between the sorting methods of ArrayList Class? Pin
ting6681-Nov-04 17:17
ting6681-Nov-04 17:17 
AnswerRe: What is the difference between the sorting methods of ArrayList Class? Pin
Salil Khedkar1-Nov-04 18:52
Salil Khedkar1-Nov-04 18:52 
GeneralDataGrid Pin
Luis Alonso Ramos1-Nov-04 12:35
Luis Alonso Ramos1-Nov-04 12:35 
GeneralRe: DataGrid Pin
Heath Stewart1-Nov-04 14:09
protectorHeath Stewart1-Nov-04 14:09 
GeneralRe: DataGrid Pin
Luis Alonso Ramos1-Nov-04 14:43
Luis Alonso Ramos1-Nov-04 14:43 
GeneralRe: DataGrid Pin
Heath Stewart1-Nov-04 14:48
protectorHeath Stewart1-Nov-04 14:48 
GeneralRe: DataGrid Pin
Luis Alonso Ramos1-Nov-04 15:11
Luis Alonso Ramos1-Nov-04 15:11 
Thanks for your quick reply (as always!).

I'm going to add that PK you mention, but in the meantime, I'll give you some more facts:

* I can trap the exception if I derive my own DataGrid and override the OnLeave handler. When I get the exception, the Click event for the Button never arrives. If I give the focus again (after the exception) to the DataGrid (by clicking on it) and click again the Clear Sale button, the Click event for the Button doesn't arrive either, but this time I get no exception.

* If, before calling the base class, I remove set ReadOnly to false, I get no exception, but still the Click event for the Button is swallowed.

* When the user adds a record to the table, and then deletes it (or if he types an erroneous product code, the row is deleted programatically), the record is still somehow in the table with the status set to Deleted (or Detached, would you explain me the difference?). This was giving me trouble until I found that out, and when enumerating the records, I skip Deleted and Detached records.

* I still get the exception if there are Deleted or Detached rows only (if I type a wrong product code, and then leave the table empty.)

Heath Stewart wrote:
That's what views and stored procedures are for.

I know. I've learnt a lot about SQL Server and ADO.NET recently, but when I started this project, I hadn't read as many books! Smile | :)

Thanks again,

-- LuisR

EDIT: I added the primary key to my DataTable, I still get the exception.



Luis Alonso Ramos
Intelectix - Chihuahua, Mexico

Not much here: My CP Blog!

GeneralRe: DataGrid Pin
Heath Stewart1-Nov-04 15:31
protectorHeath Stewart1-Nov-04 15:31 
GeneralRe: DataGrid Pin
Luis Alonso Ramos1-Nov-04 15:59
Luis Alonso Ramos1-Nov-04 15:59 
GeneralRe: DataGrid Pin
Heath Stewart2-Nov-04 4:40
protectorHeath Stewart2-Nov-04 4:40 
GeneralRe: DataGrid Pin
Luis Alonso Ramos2-Nov-04 6:14
Luis Alonso Ramos2-Nov-04 6:14 
GeneralRe: DataGrid Pin
Heath Stewart2-Nov-04 6:46
protectorHeath Stewart2-Nov-04 6:46 
GeneralRe: DataGrid Pin
Luis Alonso Ramos2-Nov-04 8:51
Luis Alonso Ramos2-Nov-04 8:51 
GeneralLaunching an event with DateTime Pin
goldoche1-Nov-04 10:18
goldoche1-Nov-04 10:18 
GeneralRe: Launching an event with DateTime Pin
Dave Kreskowiak1-Nov-04 10:26
mveDave Kreskowiak1-Nov-04 10:26 
GeneralRe: Launching an event with DateTime Pin
Heath Stewart1-Nov-04 14:11
protectorHeath Stewart1-Nov-04 14:11 
GeneralRe: Launching an event with DateTime Pin
Dave Kreskowiak2-Nov-04 0:50
mveDave Kreskowiak2-Nov-04 0:50 
GeneralRe: Launching an event with DateTime Pin
goldoche2-Nov-04 1:47
goldoche2-Nov-04 1:47 
GeneralRe: Launching an event with DateTime Pin
goldoche2-Nov-04 1:37
goldoche2-Nov-04 1:37 
GeneralRe: WindowsPrincipal and Active Directory Pin
Heath Stewart1-Nov-04 8:37
protectorHeath Stewart1-Nov-04 8:37 
GeneralEnter or Arrow Key to replace Tab Key Pin
FredSP1-Nov-04 7:22
FredSP1-Nov-04 7:22 
GeneralRe: Enter or Arrow Key to replace Tab Key Pin
Alex Korchemniy1-Nov-04 8:53
Alex Korchemniy1-Nov-04 8:53 
GeneralRe: Enter or Arrow Key to replace Tab Key Pin
Heath Stewart1-Nov-04 9:26
protectorHeath Stewart1-Nov-04 9:26 
GeneralRe: Enter or Arrow Key to replace Tab Key Pin
Alex Korchemniy1-Nov-04 9:31
Alex Korchemniy1-Nov-04 9:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.