Click here to Skip to main content
15,889,578 members
Home / Discussions / C#
   

C#

 
GeneralRe: emergence plz help quick Pin
hhani14-Apr-08 13:14
hhani14-Apr-08 13:14 
QuestionHow can I retrieve the table name Pin
Muammar©14-Apr-08 11:52
Muammar©14-Apr-08 11:52 
AnswerRe: How can I retrieve the table name Pin
jchalfant14-Apr-08 12:16
jchalfant14-Apr-08 12:16 
QuestionDetecting the RSS feeds a site has to offer ( like internet explorer ) Pin
sagedread14-Apr-08 11:02
sagedread14-Apr-08 11:02 
GeneralRe: Detecting the RSS feeds a site has to offer ( like internet explorer ) Pin
Razvan Dimescu14-Apr-08 12:48
Razvan Dimescu14-Apr-08 12:48 
GeneralRe: Detecting the RSS feeds a site has to offer ( like internet explorer ) Pin
sagedread14-Apr-08 14:12
sagedread14-Apr-08 14:12 
Questionany way to use the UAC "secure desktop" "black screen-ness" in vista? Pin
FocusedWolf14-Apr-08 10:51
FocusedWolf14-Apr-08 10:51 
GeneralSetting first row in a DataGridView visible = false does not hide row Pin
oracleConvert14-Apr-08 10:48
oracleConvert14-Apr-08 10:48 
I have a dataGridView and as I am processing its rows - with a foreach (dataGridViewRow row in this.dg) I may be setting the visible property to false (based on some processing logic). It works for all rows execept the first row. All appropriate rows disappear from my grid except the first row. I first thought it had something to do with it being the current row, but I physically navigated off the first row and then pressed my process button and the first row still was displayed.

Here is the code that I am using to hide/display the row:
private void HideShowRow(DataGridViewRow row, bool visible)
{
CurrencyManager cm = (CurrencyManager)BindingContext[dgSTSimport.DataSource];
cm.SuspendBinding();
row.Visible = visible;
cm.ResumeBinding();
}

I stepped through my code and at the end of the loop, the visible property for the first row was false. As I was processing the second row and setting values for some of its cells, for some reason the visible property of the first row got set back to true (I kept the first row in my watch window). The only code that sets the visible property is the method above, and the debugger never stepped into that code while I was processing the second row, so I am at a loss as to why this is happening.

I put an intermediary fix in place to loop through all the rows in the datagrid a second time and reset the visible property based on the status of the row. That worked fine, but I do not want to have to loop through all the rows a second time if I do not have to.

Any ideas as to what I am missing?
GeneralArray of bitmaps. Pin
AKXman14-Apr-08 10:39
AKXman14-Apr-08 10:39 
GeneralRe: Array of bitmaps. Pin
Christian Graus14-Apr-08 11:16
protectorChristian Graus14-Apr-08 11:16 
GeneralRe: Array of bitmaps. Pin
AKXman14-Apr-08 12:05
AKXman14-Apr-08 12:05 
GeneralRe: Array of bitmaps. Pin
Christian Graus14-Apr-08 12:10
protectorChristian Graus14-Apr-08 12:10 
GeneralRe: Array of bitmaps. Pin
Luc Pattyn14-Apr-08 12:38
sitebuilderLuc Pattyn14-Apr-08 12:38 
GeneralRe: Array of bitmaps. Pin
AKXman15-Apr-08 12:52
AKXman15-Apr-08 12:52 
GeneralRe: Array of bitmaps. Pin
Luc Pattyn15-Apr-08 13:12
sitebuilderLuc Pattyn15-Apr-08 13:12 
GeneralSerialize this OBJECT! Pin
zaboboa14-Apr-08 10:06
zaboboa14-Apr-08 10:06 
GeneralRe: Serialize this OBJECT! Pin
Zoltan Balazs14-Apr-08 10:37
Zoltan Balazs14-Apr-08 10:37 
QuestionHow to show a new record, and not the first (Windows Forms) Pin
Alessandra7714-Apr-08 9:56
Alessandra7714-Apr-08 9:56 
GeneralRe: How to show a new record, and not the first (Windows Forms) Pin
Expert Coming14-Apr-08 13:04
Expert Coming14-Apr-08 13:04 
GeneralFindNext on BindingSource Pin
jchalfant14-Apr-08 8:56
jchalfant14-Apr-08 8:56 
AnswerRe: FindNext on BindingSource Pin
jchalfant14-Apr-08 10:45
jchalfant14-Apr-08 10:45 
QuestionUnboxing Question Pin
jka34714-Apr-08 8:39
jka34714-Apr-08 8:39 
GeneralRe: Unboxing Question Pin
Pete O'Hanlon14-Apr-08 9:10
mvePete O'Hanlon14-Apr-08 9:10 
GeneralRe: Unboxing Question Pin
jka34714-Apr-08 9:23
jka34714-Apr-08 9:23 
GeneralRe: Unboxing Question Pin
PIEBALDconsult14-Apr-08 17:29
mvePIEBALDconsult14-Apr-08 17:29 

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.