|
Hi all
I'm using datagridview with vb.net, I have a CHECKBOX COLUMN
then I fill it
I use CellContentClick event that when the user change the CHECKBOX COLUMN vlue then do ......... something
what is happened, when the user change CHECKBOX COLUMN value the CellContentClick is firing ,
for eg:
CHECKBOX COLUMN value before click = true
after click will be = false
when I go to get it's value
Dim chk As Boolean
chk = MyDataGridView.CurrentRow.Cells("Col_Check").Value)
it's still keeping its orginal value (True)
it's saving the new value after you change the row
if any one can help
thank you
jooooo
|
|
|
|
|
From what I vaguely remember, EditedFormattedValue will have the updated cell value.
Finally is not executed always. As told by Sir Pete and PiebaldConsult. Go figure.
|
|
|
|
|
I'll have a look at my code over the week end or Monday.
I think I have a working example.
GER
Ger
|
|
|
|
|
Here is how I use the checkbox column in a DataGridView using C++/CLI.
I load my datagrid launching my forms. In my RowEntered function I dislay the value of the checkbox from the grid in a static region of the screen. I am currently using a try/catch construct.
try
{
chkRegistered->Checked = (bool)gridPerson->Rows[e->RowIndex]->Cells[dgRegistered->Index]->Value;
}
catch(Exception ^e)
{
chkRegistered->Checked = false;
}
I have also used (but since stopped) an if statement for this purpose.
if (gridPerson->Rows[e->RowIndex]->Cells[9]->Value == true)
chkRegistered->Checked = true;
else
chkRegistered->Checked = false;
This is an extract from the CellValueChanged Event where I capture the checkbox value for storage:
case 9:
{
chkRegistered->Checked = safe_cast<bool>(gridPerson->Rows[e->RowIndex]->Cells[9]->Value);
m_ElementList = m_ElementList | m_FlagBits::REGISTERED;
break;
}
One last thing, have a look at the code converters from www.tangiblesoftwaresolutions.com - I use them to convert snippets from VB and C# to C++ for my use.
Regards
Ger
|
|
|
|
|
Hi,
I am opening a spreadsheet, then opening 10 others to extract information from them to update the 1st spreadsheet. I then want to kill them in the reverse order that they were opened. I know I can get an array of processes (See code below) but what order is the array? Do I walk the array in the reverse order to kill the last one first?
Process[] pProcess;
pProcess = System.Diagnostics.Process.GetProcessesByName("Excel");
Thank you,
Glenn
|
|
|
|
|
Would it not be better to use the Office Object Model and open the workbooks from Excel? You would have more control over the process that way.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Only problem is, even if you make sure and call System.InteropServics.Runtime.Marshal.ReleaseComObject() on each and every little object you access with the object model, and call all the cleanup functions of the object correctly, one still finds little EXCEL.EXE's hiding around when you open up Task Manager.
I think it's maybe a COM Subsystem thing, where the system likes to leave the server EXE hanging around when you use COM objects from it -- even if they're properly released -- so that there's less latency the next time you make COM method calls from that same EXE. However, if you're cleaning up Excel every time your application is run and you don't want to have these little orphan instances of EXCEL.EXE hanging around, well, then you want to add this little piece of code back in to your cleanup method:
foreach(System.Diagnostics.Process proc in System.Diagnostics.Process.GetProcessesByName("excel.exe"))
proc.Kill();
It's not immediately obvious what order the processes come out in. I guess you'll just have to think of a way you can inspect each entry. In the meantime, though, foreach does in a pinch.
Sincerely Yours,
Brian Hart
|
|
|
|
|
I suspect that Mark isn't going to have to think too hard on this, but the OP might instead.
|
|
|
|
|
Push your processes into a Stack and kill them when you're done in the same order you pop them from the Stack.
|
|
|
|
|
Actually a better method is to use the COM Excel application Quit method. You can also set the DisplayAlerts property to true or false depending if you want to get prompted for unsaved files.
Thank you for your input.
Glenn
|
|
|
|
|
Hi guys, i try to send data directly to host MAC address(without using IPAdress). I am not a expert in network programming am just a beginner.
In my search i found some ideas, that is we can use
"SocketType.Raw" in socket to achieve this. But i cant understand it.
Another thing is i need to acheive this without NDIS Protocol Driver.
somebody pls explain me how to do it...is there any class or utility is avilable in .NET.
Thanks in advance
ganesh_IT
modified on Monday, December 13, 2010 4:53 AM
|
|
|
|
|
I think you should Google send raw Ethernet packet
|
|
|
|
|
Why are you trying to do this? Perhaps if you explained the problem you are trying to solve, we could offer alternatives.
|
|
|
|
|
You can't use the MAC address for application level comm. There are no application-level protocols that work with the data link layer.
So you're trying to do this with a protocol driver? Forget it - not possible.
What are you attempting to do with this?
|
|
|
|
|
I am trying to do this for a academic project.
Why we cant access the link layer.
What i need to do for done this project explain me i can achieve this....
Thanks in advance
ganesh_IT
|
|
|
|
|
I didn't say you couldn't get at it. I said there are no application level protocols that can.
You'd have to talk directly to the device driver through any interface it supports, but probably using DeviceIo calls. Without documentation on the driver itself, you'll get absolutely nowhere very fast.
ganesh_IT wrote: What i need to do for done this project explain me i can achieve this....
Achieve what? You haven't said anything about your project is about at all or why you think you need Link layer access to the NIC.
|
|
|
|
|
Hi,
I am using the App.Config in my windows form application.. I want to to ask if it will be complied within the EXE or I have to copy it in my my setup project?
|
|
|
|
|
It's a separate file.
In your Debug/Release folder it's named "<yourapp>.exe.config".
Cheers
I don't like my signature at all
|
|
|
|
|
This is a absolute basic question on the foundations of .NET applications. As has been noted before you have asked a considerable amount of basic questions and you have been given the advice to read some books or take a class and learn the basics properly, not stumbling around. Please take this advice.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi
I have a VS 2008 solution with two projects inside and I am want to deploy it... both will be deployed in a folder called C:\Program Files\My Projecr in Project-1 and Project-2 folders..
Both projects use shared assemblies like the MySQL DLLs.
Do I have to copy the same assemblies twice? once in Project-1 and again in Project-2?
|
|
|
|
|
Typically, shared assemblies are placed in the GAC, only a single copy. You can also create a common folder to place the shared assemblies for your applications but you will need to direct the .NET framework as to where to find them.
You may want to read through this
How the Runtime Locates Assemblies[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
so how can I place all in Common folder in my application folder and redirect the .NEt framework? can you please guide..
hanksT
|
|
|
|
|
Did you even read my response? Did you follow the link?
Stop asking questions here and go learn
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Put these dll's in the GAC.
You can share them across both projects.
You dont need to copy these DLL's if they are already available in the GAC.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Hello Experts,
I would like to ask a few guidelines in making an internet cafe software, I am kinda confuse if where should I start first.
Do I need to start from the client part or the server part. I am planning to use vb.net and sql server/ms access for the database
since I have use it in my previous project. I have created a project using vb.net and sql server in my past project and I wanted to try higher steps by doing network software. Any suggestions to help are kindly appreciated.
Thanks in advance,
DAN
|
|
|
|