|
karkster wrote: If I'm not mistaking the first tab has the index 1 (or 0).
index start from zero (0) for first item.
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
Hi,
How can we clear data from the datagridview, which is not bounded with any data source.
I am using this gridview on entry form, which get data from the user and send it to the database. After this it should be cleared along with other boxes, but how!
If any body have any idea, please let me to know!
Thanks.
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
hai.. i am in a need to write the listview items in to a xml file.. my list view collection has 2 columns(attribute name and attribute value) and the no. of items is not constant. later i have to write the xml contents in to the listview.
plz give me some ideas.... i am using c# and windows application it is....
Thanks in advance...Urgent help plz...
|
|
|
|
|
u can store the data of list view into dataset
and then write it into xml file by using
dataset's WriteXml method.
rahul
|
|
|
|
|
hi rahul thanks a million for ur immediate reply....
my prob is... i will capture all the input values from the user... controls in the form 3 textboxes and a list view item... user can enter as many items as he needs in tht listbox control....
i have to save these values in the xml file and then i will use the same file to repopulate the form...
guide me plz.......
sample code will be much useful for me....
|
|
|
|
|
According to ur reqirement i think u have to use two dataset's
one for storing 3 textbox values and another for populating listbox
becouse daset's writexml method writes data in xml file using table name tag,
column name and value tag,so for single entry u can not store multiple
values of listbox.
so u cn try
Dataset ds = new Dataset();
DataTable tbl1 = new DataTable();
tbl1.Columns.Add(new DataColumn("column name",typeof(String)));
tbl1.Columns.Add(new DataColumn("column name",typeof(String)));
tbl1.Columns.Add(new DataColumn("column name",typeof(String)));
DataRow dr = tbl1.NewRow();
dr["column name"] = textbox1.text;
dr["column name"] = textbox2.text;
dr["column name"] = textbox3.text;
tbl1.Rows.Add(dr);
Ds.Tables.Add(tbl1);
Ds.WriteXml("coplete path and name of xml file");
same way u can try to add data to second datasset which will store values
of listbox items.
and after that for reading u can use dataset's ReadXml method and populate
data into textbox and listbox from these datasets.
rahul
|
|
|
|
|
Hello!
I can´t make SendMessage work with TVM_GETITEM!
I returns garbage always =/
This program is supposed to read a item´s name from a TreeView!
Here is the code:
public const int TV_FIRST = 0x1100;
public enum TV_Messages
{
TVM_GETNEXTITEM = (TV_FIRST + 10),
TVM_GETITEM = (TV_FIRST + 12), //62
TVM_GETCOUNT = (TV_FIRST + 5),
TVM_SELECTITEM = (TV_FIRST + 11),
TVM_DELETEITEM = (TV_FIRST + 1),
TVM_EXPAND = (TV_FIRST + 2),
TVM_GETITEMRECT = (TV_FIRST + 4),
TVM_GETINDENT = (TV_FIRST + 6),
TVM_SETINDENT = (TV_FIRST + 7),
TVM_GETIMAGELIST = (TV_FIRST + 8),
TVM_SETIMAGELIST = (TV_FIRST + 9),
TVM_GETISEARCHSTRING = (TV_FIRST + 64),
TVM_HITTEST = (TV_FIRST + 17),
}
public const int TVIF_TEXT = 0x0001;
public const int TVIF_PARAM = 0x4;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
public struct TVITEM
{
public int mask;
public IntPtr hItem;
public int state;
public int stateMask;
public IntPtr pszText;
public int cchTextMax;
public int iImage;
public int iSelectedImage;
public int cChildren;
public IntPtr lParam;
}
private void button1_Click(object sender, EventArgs e)
{
TVITEM tvItem = new TVITEM();
tvItem.hItem = (IntPtr)Int32.Parse(textBox1.Text);
tvItem.cchTextMax = 512;
tvItem.mask = TVIF_TEXT;
tvItem.pszText = Marshal.AllocHGlobal(512);
IntPtr ptrTvi = Marshal.AllocHGlobal(Marshal.SizeOf(tvItem));
Marshal.StructureToPtr(tvItem, ptrTvi, false);
SendMessage(TreeHandle, (int)TV_Messages.TVM_GETITEM, IntPtr.Zero, ptrTvi); // TreeHandle got from FindWindow and FindWindowEx
string text = Marshal.PtrToStringAuto(tvItem.pszText);
MessageBox.Show(text);
Marshal.FreeHGlobal(tvItem.pszText);
Marshal.FreeHGlobal(ptrTvi);
}
}
If anyone got any idea, please help me!
Thanks!
|
|
|
|
|
Hi,
I have recetly moved from Java to .NET/C#.
I am trying to download a file from my test website and save it to disk on any client machine (this means getting access to each clients hard disk etc).
In java this required the use of applets etc...
I have so far not found the corresponding code in C#/.NET.
I am wanting to
(i) click a button in a web page on my website.
(ii) do some security checks before proceeding
(iii) stream the file(s) from the source directory on the website host machine
(iv) stream the file(s) to the client
(v) save the file(s) to the clients hard disk.
(vi) the original file may need to be zipped so the client side operation may require an automatic unzipping process
I know I could zip all the files and then add a link to my webpage that the user selects to download the file and then they manually unzip the relevant files but in some instances an automatic approach would be better.
Any help greatly appreciated.
I have also posted this to the .NET board if this is the wrong discussion board.
I will keep searching.
Regards Andrew Mercer
|
|
|
|
|
How can i convert the DataGridView.SelectedRows to DataTable in C#.
Thanks
|
|
|
|
|
Can I run the application that has crystal reports, without this error "
keycodev2.dll error ". If i install the crystal report support files dotnet cd in client machine then it is not showing any error. Can i add those crystal decision files with the project. where i can get the files?. Can we add the framework with the project?
Jey
|
|
|
|
|
my problem is that how can i display online status of a person in his profile against his email address if he is online????
dear friend plz help me out
-- modified at 8:24 Tuesday 13th June, 2006
|
|
|
|
|
Hai Friends
Can anyone know how to create a Email management program. That extract mails from Server and Display it.
Any sample code will be helpfull
Regards
|
|
|
|
|
Sounds like an email client program to me. ASP.NET or Native client?
Depends on the server, to be honest. Most support IMAP4 (which is described in RFC2060) or POP3 (which has many references). If you have the choice, go for IMAP4 - it's a more complex protocol, but has better support for things like search, sort, and multiple folders.
I believe I saw an IMAP4 component in the Articles for C#.
http://www.codeproject.com/cs/internet/imaplibrary.asp
There is also two different ones for POP3, and one specifically for Exchange. This gets the data from the server to your client. You can then use pretty much anything to display it.
The major problems you will come across are parsing MIME data (for attachments, HTML mail, etc.) and dealing with mail in some other language/character set that you don't know - for example, Thai, Chinese and Japanese all have multi-byte encodings that are a pain to deal with.
|
|
|
|
|
In MS-Office there is a feature under the Mail Merge toolbar that sends the dataset to the printer.
I would like to know is it possible to do the same in C#. Here is my senario XML file with 5 different nodes. I would like to be able to print all 5 nodes. In 5 different sheets with a specifit formats.
Is this possible?
-- modified at 3:15 Monday 12th June, 2006
|
|
|
|
|
How can i convert the DataGridView.SelectedRows to the either the DataRow[] or DataRowView[]. If you have some alternative technique plz tell me.
|
|
|
|
|
hi i want to use the same code (the same process) from one event like button click, and i need to do the same in onmouse over event for another button.any one face like this plz share with me....
Best Regards.,
ranandbe..........
|
|
|
|
|
private void button1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
button2_MouseMove(sender, e);
...
}
private void button2_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
...
}
|
|
|
|
|
private void button2_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)<br />
{<br />
button1.PerformClick();<br />
}
|
|
|
|
|
Put the process in a separate method, and call the method from the event methods.
---
b { font-weight: normal; }
|
|
|
|
|
hi,
Can anyone tell me how can i send mails without using SMTP Server provided by .NET (without using SMTPServer.Send())
I want to send mails in a large number so i dont want to use the relay server of the IIS, as it is slow.
Can anyone tell me how i can bypass the SMTP Server and directly send mail to the internet.
It will be a great help,
Thanks
Sushant Duggal.
|
|
|
|
|
Sushant Duggal wrote: Can anyone tell me how i can bypass the SMTP Server and directly send mail to the internet.
You have to write your own SMTP server then (well mostly). Search on SourceForge, I think there is such a component.
|
|
|
|
|
can you please send me the link (if you know that)????
Sushant Duggal.
|
|
|
|
|
Just go to : http://sourceforge.net
and search for "SMTP Server"
|
|
|
|
|
Thanks friend,
I'll check that.. currently the site is under maintenance.
Thanks again
Sushant Duggal.
|
|
|
|
|
stancrm wrote: http://sourceforge.net
and search for "SMTP Server"
hi
Sourceforge provides different type of softwares .. but i want to know the code.
Please Help
Thanks,
Sushant Duggal.
|
|
|
|