|
Thanks!
I just wonder, if this could be achieved automatically? Just like getting info from database into DataGridView is..
|
|
|
|
|
Yoyosch wrote: I just wonder, if this could be achieved automatically? Just like getting info from database into DataGridView is..
Why did you think so easily ?
It seem to be a solution or an answer.
|
|
|
|
|
update the database with the values from the datagrid, as soon as a new row is added to the datagrid.
Keshav Kamat
India
|
|
|
|
|
Hi All,
I'm trying to get the exit time of a process which has been initiated using the process class. An event has been written which will be triggered when the process is being closed. But the problem here is, the event is not getting triggered. Here is the code:
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "notepad.exe";
startInfo.Arguments = @"E:\shared\perdata.txt";
startInfo.WorkingDirectory = @"C:\Temp";
startInfo.WindowStyle = ProcessWindowStyle.Maximized;
oProcess.EnableRaisingEvents = true;
oProcess.Exited += new EventHandler(ProcessExited);
oProcess = Process.Start(startInfo);
Event to be called:
public void ProcessExited(object sender,System.EventArgs e)
{
MessageBox.Show(oProcess.ExitTime.ToString());
}
Any help would do. Thanks in advance
Parimala
|
|
|
|
|
|
The event is getting triggered. I've found what is wrong with this.
Instead of using startInfo.filename & startInfo.arguments, I should use oProcess.StartInfo.filename.
Anyway, thanks for the suggestion.
Parimala
|
|
|
|
|
|
hi,
does anyone knows how to call MS Access, import data from external source form (window) programmatically?
please help.
asanka.
Asanka
|
|
|
|
|
My problem is that i do not really know how to create a user on the aspnet_user tables because it is link together with multiple tables and the userId is a unique identifier that is encrypted in 32 hexidecimal format. i would appreciate if there is anyone able to help me?
|
|
|
|
|
Hi,
Are you trying to implement a log on web service ? I think, you can use the SqlMembershipProvider for this, but I am not sure about it.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
i think should be cause my work i am doing is that i am a administrator and i am supposed to create a new user in the aspnet_users database. but i do not know how to write the source codes for it on my web service.May I know how to do it?
|
|
|
|
|
You can just execute the aspnet_Membership_CreateUser stored procedure from the database with appropriate parameters. Even if you want to add some user to a particular role then you can use aspnet_UsersInRoles table.
hope this helps. Just go through the procedure first to see whether it solves your problem and you are able to understand what it is doing. If you are going to create user on live site, TAKE BACKUP FIRST !!!!!!
For you reference here is a link from MSDN :-
http://msdn2.microsoft.com/en-us/library/aa478949.aspx[^]
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
I have managed to do create user using membership and Role provider for my web service now i need to add a new table to my aspnet_users table using membership, but i am encountering problems in that i am don't know how to use the sqlparameter having uniqueidentifier to store the info in my new table linking to aspnet_users table, may i know how?
|
|
|
|
|
|
What will you do with this service ? I mean, by logging all the keyboard strokes, for what you will use them.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
I know how to write that in C-Language
using TSR(Terminate But stay Resident).
Achieving this is very easy in c-Language.
Juts 10 lines of Code that uses
getvect()
setvect()
keep()
functions.
If U have enough time
try to learn these functions,
how to create C dll(Using MS Compiler)
and how to import them in .NET using
DllImport method.
Regards,
Arun Kumar.A
|
|
|
|
|
Hi Arun,
Thanks for your reply.
Can you refer me any online documentation to learn all of these!
Best Regards,
Emran
-- modified at 9:02 Saturday 21st April, 2007
|
|
|
|
|
My code is here
private void copyToolStripMenuItem_Click(object sender, EventArgs e)
{
DataObject obj = dataGridView1.GetClipboardContent();
str = obj.GetText(TextDataFormat.CommaSeparatedValue).Substring(1).Split(',');
}
private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
DataGridViewRow dgvRow = dataGridView1.Rows[0];
for (int i = 0; i < str.GetLength(0); i++)
dgvRow.Cells[i].Value = str[i];
dataGridView1.Rows.Add(dgvRow);
}
catch (Exception ex)
{
}
}
But it throws an exception "Rows cannot be programmatically added to the DataGridView's rows collection when the control is data-bound"
I am very confused. Kindly help me. Thanks
It seem to be a solution or an answer.
|
|
|
|
|
try setting
editmode to EditProgrammatically in datagridview properties.
|
|
|
|
|
Does anyone know if get/set methods update continuously and therefore cause extra overhead?
I have a "Vector" struct that has x,y,x values and a Magnitude "Get" method and I noticed that when I step through the code in the VS debugger that if I hover the mouse over a Vector object whose coordinates are changing, the magnitude filed keeps updating. Is this just because it is running in debug and I have reqquested evaluation by hovering the mouse over the object, or is it really running these methods whenever a coordinate value changes?
thanks.
cb
|
|
|
|
|
cbin wrote: Is this just because it is running in debug and I have reqquested evaluation by hovering the mouse over the object
Yes.
cbin wrote: or is it really running these methods whenever a coordinate value changes?
No. A method (or property in this case) is only run when called.
|
|
|
|
|
I have a hiden datagrid and i use:
dataGridView2.CurrentCell = this.dataGridView2[0, 0];
dataGridView2.CurrentCell.Value = richTextBox1.Text;
To update the dataset and datagrid, now the problem is becuase i dont click the next line in the datagrid the data doesnt get commited or something (altough the dataset does get changed) when updating to try and save the changes in the database nothing happens.
If i unhide the datagrid and set the text in richtextbox hit save, click the second line in the datagrid and hit save again the data does get commited.
So how would i simulate clicking the next line or how do i properly set the text in the datagrid or dataset so that it does update.
Thanks.
|
|
|
|
|
How can i use the "Extraction rule" for extracting the data in a navigation control of the interface in Visual Studio Test suite?
|
|
|
|
|
I created RDL TextBoxes in code.
I used the following code to find TextBox <width> tag value.
However textbox width is too large.
How to find exact width for given string ?
float MeasureString(string stringToPaint, string fontName, int fontSize) {<br />
<br />
Font font = new Font(fontName, fontSize, FontStyle.Regular);<br />
<br />
TextFormatFlags flags = TextFormatFlags.NoPadding | <br />
TextFormatFlags.NoPrefix;<br />
<br />
value.<br />
Size proposedSize = new Size(int.MaxValue, int.MaxValue);<br />
<br />
Size size = TextRenderer.MeasureText( stringToPaint,<br />
font, proposedSize, flags);<br />
return size.Width;<br />
}
Andrus
|
|
|
|
|