|
Hi,
I'm using a Datagrid control, bound to a dataview, with several threads updating the dataview by adding rows to it. The datagrid updates fine until the scroll bar appears and then i get a situation where two scrollbars appear instead of one (two vertical and two horizontal scrollbars).
The scrollbar is not a part of any panel and stands independently in the form.
I used a code template found in this site to build the data grid. Updating it is done simply by adding rows to the table of the dataview object.
Here is the code to generate the scrollbar:
System.Windows.Forms.DataGridTableStyle DGStyle =
new DataGridTableStyle():
DataGridTextBoxColumn textColumn;
foreach (DataColumn dc in eventsTable.Columns)
{
textColumn = new DataGridTextBoxColumn();
textColumn.MappingName = dc.ColumnName;
textColumn.HeaderText = dc.Caption;
textColumn.Width = 200;
textColumn.Alignment = System.Windows.Forms.HorizontalAlignment.Left ;
textColumn.ReadOnly = true;
DGStyle.GridColumnStyles.Add(textColumn);
}
DGStyle.MappingName = eventsTable.TableName;
DGStyle.AlternatingBackColor = Color.Gainsboro;
DGStyle.AllowSorting = false;
DGStyle.ReadOnly = true;
LogGrid.TableStyles.Clear();
LogGrid.TableStyles.Add(DGStyle);
eventsView = new DataView(eventsTable);
LogGrid.DataSource = eventsView;
|
|
|
|
|
Hi All.
I need to make an application in c# which could be check updates of its next versions.1.
1. Is there any good article about this?
2. can I do it from the projects under 'setup and deployment' projects in VS.NET
3. any free tool to do this...
I want simply :
-->when the programs invokes check for new updates
-->if there promtp to user do update now
-->if user will give okey update program close all the open files about application and get new version dlls, resource so on...
--> and restart the application
karanba
|
|
|
|
|
|
hi,
I have a label control and a button in my form. On button click i am changing the height of the label control.
My problem is i want to change the height of the label control from bottom but it is changing from top.
Any idea
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
|
That's not the best solution. A better way is to change the Anchor property. It selects which sides of the control are not allowed to move on a resize.
|
|
|
|
|
hi,
thnaks for both answers. But it is not serving my purpose. Anchor , location etc are i already tried and failed to achive my need.
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
Hi...
Codeproject has code samples for Hotmail and Gmail client api's, but none for Yahoo! Mail.... Anyone know where such code is available?
Thanks!
Amberite
|
|
|
|
|
Doesn't Yahoo just use regular POP and SMTP protocols? Certainly, I download my Yahoo mail into a regular email client.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
Does it? Then what's up with the whole yPops project and several others that attempt to create a pop3 connection to Yahoo?
Amberite
|
|
|
|
|
Amberite00 wrote:
Then what's up with the whole yPops project and several others that attempt to create a pop3 connection to Yahoo?
I'm assuming they are external to Yahoo. For $19.99 per year you can get a POP connection (along with other benefits - like 2Gb mail account) - If you signed up before a certain date I think you can get a POP connection just for signing up to receive certain offers in your mail.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
I have made a pop3 conenction to yahoo many times.
/\ |_ E X E GG
|
|
|
|
|
Hi,
I am writing a Web Application in c#. Can someone tell me how can I put some code to fire whenever the close (X) button of the Internet Explorer Window is hit?
Thanx
.::YF::.
|
|
|
|
|
There was a discussion about this on the ASP.NET forum a couple of months back. IIRC the conculsion was that you cannot.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
Good Day everybody
Currently, i am developing a DLL (Class Library) that will be used by third party. I found that the user have difficulties to understand what is the purpose of the Functions that i write.
What i want to achieve is something like when we create an instance of string during development time, and when i select the function "GetType()", then the description "Get the System.Type of the current instance." will prompted.
Can anybody tell me how to do this?
Can i use Attributes?
Thanks
|
|
|
|
|
|
A small addition to the link Colin provided.
Give the xml documentation file the name of your class library plus the .xml extension (libraryname.xml) and distribute it with your class library.
Intellisense will use the information given by the documentation file to prompt descriptions.
www.troschuetz.de
|
|
|
|
|
Thanks you very much Colin and Stefan
I have been able to do what i want in C#.
However, i have one more question.....
Can i do it in VB.net too ??
|
|
|
|
|
As far as I know it's not possible, because VB.NET doesn't support the XML documentation.
But I'm sure there are other ways to accomplish the same, so try posting this in the VB forum.
www.troschuetz.de
|
|
|
|
|
Can somebody please show me an example of a foreach loop with a ListBox's SelectedItems collection ?
Here is what I have.
foreach (object item in listBoxPlaylist.SelectedItems)
{
this.listBoxPlaylist.Items.Remove(item);
}
object item is the problem I think, I also tried ListBox.SelectedObjectCollection item .... I'm not sure what to put there. I get an InvalidOpperationException.
What I want to do is remove the selected items from the list box.
/\ |_ E X E GG
|
|
|
|
|
Well, the first thing that comes to mind is that a foreach loop is special. Special in a way that the collection you are foreach-ing must not change during the foreach. So if items are removed, they probably also are not selected anymore and thus are removed from the selected items list. This might work, but should cause an error.
The error is probably because of the foreach. The SelectedItems list is really a list of objects - anything can be the "identifier" of an item.
Try this:
while (listBoxPlaylist.SelectedItems.Count != 0)<br />
{<br />
this.listBoxPlaylist.Items.Remove(listBoxPlaylist.SelectemItems[0]);<br />
}
|
|
|
|
|
Thanks dude, it works perfect.
/\ |_ E X E GG
|
|
|
|
|
The problem is that it is not allowed to change a collection while iterating with foreach through it.
A solution would be (but there are many more):
<br />
object[] tmp = new object[listBoxPlaylist.SelectedItems.Count];<br />
listBoxPlaylist.SelectedItems.CopyTo(tmp, 0);<br />
foreach (object item in tmp)<br />
listBoxPlaylist.Items.Remove(item);<br />
|
|
|
|
|
hi code guys!
I've come to serious problem. I have a page with multiple frames. I want to access particular frame contents.
One solution is to use (mshtml innertext) property. but I have no idea how to use it in my c# app.
I need the code.
thanks!
|
|
|
|
|
Greetings!! I have been working on a project of a windows service and now i have a big problem. But after installing my new service i discover that the framework lib's don't work when the service starts ( when Windows Starts). I read about this problem in .NET and they say that only windows MFC Library is capable of this. I wonder if there is a class in c# for making possible the framework work on startup. In another way of explaining this my service starts but when I click on the service icon I don't get any result or sometimes I get Error when it shoud show a window I make.
This is my problem:::::::::::::::::::::::::::::::
Windows Service applications run in a different window station than the interactive station of the logged-on user. A window station is a secure object that contains a clipboard, a set of global atoms, and a group of desktop objects. Because the station of the Windows Service is not an interactive station, dialog boxes raised from within a Windows Service application will not be seen and may cause your program to stop responding. Similarly, error messages should be logged in the Windows event log rather than raised in the user interface.
The Windows Service classes supported by the .NET Framework do not support interaction with interactive stations, that is, the logged-on user. The .NET Framework also does not include classes that represent stations and desktops. If your Windows Service must interact with other stations, you will need to access the unmanaged Windows API. For more information, see Window Stations and Desktops in the Platform SDK documentation.
::::::::::::::::::::::::::::::::::::::::::::::
How can i resolve this???????????????????????
Please help me and sorry my bad English.
|
|
|
|