Hi,
sometimes when I set the ActiveRecord of the Grid, the Grid selects the wrong record... It seems that the error occures after I selected the last record and then go up the list, step by step...
Sample:I have 50 records and select the last, then I go back by setting the ActiveRecord Property, at the 20th record it doesn't go to record no. 19! Instead it goes to the 50 one...
The RecordActivating Event triggers 4 to 5 times for this step!
BTW: the position of the record where the error occures seems to depend on the height of the grid.
Kind RegardsFlorian Sundermann
Version 7.2 solved the problem for me ;)
Thx
Florian
Hmm, I'm running out of ideas
Regarding 7.2: I'm referring to the beta: http://es.infragistics.com/hot/wpf-beta.aspx
If you have a sample that demonstrates the issue, I could check whether the issue is the same with the Beta. I'll send you a private message with my email address in case you want to send me something...
Philipp
No this also don't work...I also tried to set "record.IsActive = true;" but after this line the IsActive Property is false!!!7.2? Am I missing something? At the moment I use 7.1
BTW: record.DataPresenter.Focus() == grid.Focus()
That is quite strange... Is it possible that you're setting ActiveRecord in a grid-related event? However: I've seen in the log file of my helper class that my method once also had another, quite ugly line of code at the end of the method which I removed in the meantime as it's working for me now without it:
public static void SelectRecord(XamDataGrid grid, Record record) { //remove current selections grid.SelectedItems.Records.Clear(); grid.ActiveRecord = null; grid.ActiveRecord = record; record.IsSelected = true; //HACK This is plain horrible record.DataPresenter.Focus(); }
If that does the trick: what version of NA are you using? If it's 7.2 Beta, I'd be very interested in a feedback from the Infragistics staff, as explicitly setting focus might produce side effects with other controls...
Kepp me posted
That doesn't work ;-(
If I remove the line "ActiveRecord = record" the selection moves right (so I've got the right records) but no chance to move the active record as I want to.