|
|
Why use WMI when you can just use the normal file methods??
And you should really be asking this in the C++ forums, not Windows Forms.
|
|
|
|
|
I have a datagridview with hundreds of records.
I need the datagridview content be frozen when I'm scrolling vertically using vertical scroll bar. Like in Outlook. The problem occurred because I don't want to repaint the grid by my rules when the visible part is changed.
How can I freeze that?
|
|
|
|
|
Do you mean keep the cells static with just the scrollbar thumb tab moving?
If so, I don't believe it is possible. DataGridView doesn't have a BeginUpdate method, which anyway would freeze the scrollbar as well. It does have SuspendLayout()/ResumeLayout() but the same problem applies to them.
Of course, now that I have said that, someone will post an answer.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Yep, I want to keep the cells static as you said. Still spending much time on this problem and no good solution...
|
|
|
|
|
Do you want to:
- Keep the first column visible when scrolling to the right? (horizontal scroll)
- Keep the first 10 records visible when scrolling down? (vertical scroll)
If you pick the latter, then the question rises what you'd expect to display?
I are troll
|
|
|
|
|
Nothing regarding horizontal scroll now. Only vertical.
Say, I see 23 rows visible in a grid. On scroll down I want these rows been frozen and not moved until I released the mouse key. After that I'd like the grid to be repainted to show the new real amount of data that I've "virtually" scrolled down.
Does that make sense?
P.S. Look at the Outlook - the same way.
|
|
|
|
|
As Henry already stated, it's not something that comes out of the box. Using SuspendLayout as mentioned, perhaps Invalidate() -ing the scrollbar-region while dragging/moving the mouse. Or overriding the paint-handler, which might prove equally challenging.
I know that Outlook 'feels smoother', but that's probably not a .NET component in there. There may be some other third-party components that offer this functionality though.
I are troll
|
|
|
|
|
Does anybody have an example how to override the OnPaint event or use the Invalidate() in my case?
|
|
|
|
|
Takhir, did you find a solution for this? If so what have you done?
|
|
|
|
|
I did nothing special there, actually.
But I re-written the OnPaint event on grid Now it works MUCH better and faster.
|
|
|
|
|
Hi all,
In the current project I working on, on one form I'm using a datagridview control to display some rows from a strongly-typed dataset DataTable. In the application, there is the possibility that some rows displayed in the datagridview are deleted in background. under normal conditions, the rows should disappear from the datagridview (which happens), but I need to keep them in datagridview for display until the user decides to close the form.
Additionaly, for the datagridview I perform some custom painting of the row (in CellFormatting and RowPostPaint events)...
in order to "disconnect" my gridview from the bindingsource and keep my deleted rows for displayed I tried to use the following code:
myBindingSource.RaiseListChangedEvents = false;
myBindingSource.SuspendBinding();
But, this doesn't help: I keep getting an exception dialog message with the message:
Exception: System.Data.RowNotInTableException: This row has been removed from a table and does not have any data. BeginEdit() will allow creation of new data in this row.
How can I achieve what I need to do? Is it possible to keep the data in the gridview although the rows were deleted?
Thank you in advance!
Andrei
|
|
|
|
|
"Steve Ballmer will deliver the keynote at Microsoft Tech-ed India 2009 Conference in Hyderabad. There will be announcements related to Windows 7, Silverlight 3, Microsoft Surface Computer, Tata Nano, IPL, etc. and Microsoft will also provide free certification to all onsite attendees.
What: Microsoft Tech-ed India 2009
Where: Hyderabad
When: May 13-15, 2009
Register:http://www.microsoft.com/india/teched2009
There is also a ""Top Architect"" contest being organized. http://virtualtechdays.com/toparchitect/default.aspx
|
|
|
|
|
It's taken you 2 years to post your first message and then you cross post to six forums at once. Very rude. No cross posting!
|
|
|
|
|
Hello.
Is it possible to authenticate windows form using a cookie ?
An application provides cookie, that i wish to use in my forms project to authenticate and use the credentials, basically looking impersonate using cookie.
Really appreciate if someone can shed some light.
Harry
Before c# there was darkness
|
|
|
|
|
This sounds highly suspicious.
I'm not sure that I would appreciate somebody stealing my work, which is what your post sounds like you are doing.
Of course you might not be doing so. Without further explanation it is impossible to tell.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Which work of yours are you talking about. Have you published any such solution ?
Before c# there was darkness
|
|
|
|
|
No. You misunderstand.
Your OP was worded, to me at least, as though you were attempting to use the work of someone else (the cookie) for your own purposes.
This sounds, again to me, a bit suspicious. The sort of thing a virus program might try to do, for example.
I am probably totally wrong about that, but I was trying to suggest to you that a more detailed explanation of what you are trying to do, might get more responses.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Duh!
Our intranet webserver intentionally provides a cookie for internal purposes and i wish to use this as windows authentication token,
Wondering if this is possible.
Before c# there was darkness
|
|
|
|
|
Ah. I now understand.
I regret that I am unable to help you, but I hope that someone else will.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hmm seems like an IO issue - finding the cookie folder may be a challenge. I'm pretty sure you should be able to read and parse the cookie in a winforms app. Is there a namespace aspx uses for it's helper functions, you may need to reference that.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Hello.
I have a DataGrid with a DatagridBoolColumn and DatagridComboboxColumn. I need to hide the DatagridComboboxColumn when the value of DatagridBoolColumn is False. Is there a way to do this?
Please help me!
modified on Tuesday, April 28, 2009 2:22 AM
|
|
|
|
|
DatagridComboboxColumn.Visible = false;
try that
modified on Tuesday, April 28, 2009 7:14 AM
|
|
|
|
|
hopingToCode wrote: DatagridComboboxColumn.VisableVisible = false;
Fixed that for you.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|