|
Hi all,
I have 3 columns being read and displayed in a dataGrid. I want to trap the event when the 2nd column comes to focus.
How do I do this?
Thanks
|
|
|
|
|
I usually get chastised for missing an important detail or simpler method everytime I give advice, but I still like to try.
I would imagine your columns are just DataGridTextBoxColumns, since you didn't specify. Is there an event for when the grid gets focus, which you can simply see which cell has focus and determine if it's in the correct row? I'm too lazy to look myself.
If not, you could try making a new class which inherits the DataGridTextBoxColumn. In this class, you can have control of the textbox control which shows when a cell in the grid is activated. You can handle any events you want with the textbox. So, you can set the style of the grid so that the second column uses this new class, and the others just use the regular DataGridTextBoxColumn class.
Good luck, hope I helped.
|
|
|
|
|
Application Tools :Pocket PC 2003 , WINCE.NET , .NET CF , VC#
My startup form has 6 buttons ..each allowing user to jump to next screen.
Also every other screen returns to startup screen.
When I execute the application & navigate thru.
Every time i see a new instance of my startup form created at background.
i.e, when i leave my startup screen that particular instance doen't get closed/disposed.
My project requirements doesn't allow me to do FindWindow and DestroyWindow.
Could anyone suggest me why it is happenning and how to control it.
Thanks,
Ratna
|
|
|
|
|
Anonymous wrote:
i.e, when i leave my startup screen that particular instance doen't get closed/disposed.
It better not get closed, otherwise your app will quit.
Anonymous wrote:
When I execute the application & navigate thru.
Every time i see a new instance of my startup form created at background.
Is this new instance being created by the new form you .Show()? Your new form show NOT be creating a new instance of your main form. Your new form show just close gracefully and control will return to the main form.
This is all speculation, of course, because we haven't seen any code that show's what your forms are doing when they get created and closed.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
........................................
Application.Exit will quit my application.
Form.Close/Dispose will close all child windows and then close itself.
But why is it creating multiple instance.
When you are running application ... go to memory-running programs ..u will see all the instances of form running.
Thats were i detected this problem.
................................
|
|
|
|
|
Anonymous wrote:
Application.Exit will quit my application.
Form.Close/Dispose will close all child windows and then close itself.
The end result is the same...
Anonymous wrote:
When you are running application ... go to memory-running programs ..u will see all the instances of form running.
I don't have a Pocket PC, or the development environment...
Like I said, we haven't seen any code, so we can't tell you wants going wrong. Also, questions related to Pocket PC are better handled in the Embedded/Mobile Forum.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi!
It is hard to tell by the information you have provided, but if i understand correct you run the first form as the main thread. Then you try to open several other forms from that form, and then close the first form.
But if you have made the first form the main thread, this will not close untill you end he program.
To avoyd the problem, try to not call the forms from the other form, have a background main thread that handles all forms.
Hope this make sence
regards
|
|
|
|
|
Hi there!
I'm doing a network application which send and receive files. Here's a quick description of the app:
1. It can receive files from multiple user at the same time.
2. A) When I want to receive from a different user I have to open another port.
B) I'm using sockets, that's reason for point "2. A)" :P
Now, I want to be able to receive multiple files from multiple users at the same time but with only one port. Like file sharing apps (Kazaa, eMule ,etc.) How can I do this?
Thanks a lot
Gimpy1983
----------------------
Be proud. Be yourself.
|
|
|
|
|
I added a new project of type 'setup wizard' for 'a windows application'. All the files in the resulting setup install into the same directory. How can I get the install to distribute files in the same directory structure as the 'Source Path'?
There is a folder property for each item to be installed, but it does not let me set and explicit path.
thansk
|
|
|
|
|
|
Tell you how what? I don't see anything - It just redirects to the home page.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
My Blog
|
|
|
|
|
Oh.. cm'on.. It is there.. refresh the page..
ok It's the left colum in a datagrid I want to remove it.
_____________________________________________________
Believe! Every thing has a purpose
|
|
|
|
|
Everything you wanted to know about DataGrid but were too afraid (ok you weren't) to ask.
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp
Gary
|
|
|
|
|
thanx.. and I have asked a few questions on datagrid.. I will ask more..
That link is big!! It's sturday tomorrow.. I plan to watch spiderman2.
so.. push the FAQ onto monday!
_____________________________________________________
Believe! Every thing has a purpose
|
|
|
|
|
I have created two forms:
One for the details, in which you can search on a particular field. If you right-click the field and click search, you get a form with a grid displaying the search results.
The second form uses the same dataset, with a dataview in front of it. So the forms are linked to the same datasource. But I want to synchronize them, so If I double-click a record in the grid I get the details of the record in the detail form.
How can I do this?
"Every rule in a world of bits and bytes can be bend or eventually be broken"
|
|
|
|
|
I wouldn't recommend sharing the CurrencyManager , which wouldn't work anyway since your binding contexts are technically different (one form binds to a DataSet while the other binds to a DataView , even though it is over a DataTable within the same DataSet - binding contexts must be exactly the same).
I would recommend using the event model. Define an event on one or both of the forms (depending on whether or not you want one-way or two-way synchronization) that when a button is clicked (or whatever you use for navigation), an event is also raised that the other form handles and increments it's CurrencyManager.Position as well. This also gives you a little more flexibility with future development.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thanks for the info
"Every rule in a world of bits and bytes can be bend or eventually be broken"
|
|
|
|
|
public class Test
{ private int num1; private int num2;
private int num3
[CategoryAttribute("BlackGround")]
public int Num1
{get{return num1;} set{num1=value;}}
[CategoryAttribute("BlackGround")]
public int Num2
{get{return num2;} set{num2=value;}}
[CategoryAttribute("ForeGround")]
public int Num3
{ get{return num3;} set{num3=value;} }}
How get the Serialization result as below?
<Test>
<BlackGround>
<Num1>..</Num1>
<Num2>..</Num2>
</BlackGround>
<ForeGround>
<Num3>..</Num3>
</ForeGround>
</Test>
ok
|
|
|
|
|
You want to post this every two hours? Show a bit patience!
If you just wanted to change your posting use the modify link instead of starting a new thread.
|
|
|
|
|
i know ,but i didn't know why this xml tag do disappear?
ok
|
|
|
|
|
Try to set the "Do not treat <'s as HTML tags" option which can be found below the text-control or use the HTML extended character codes.
|
|
|
|
|
Or escape the tags themselves using < for < and > for > .
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
i kown,bu i don't know why the xml tag became disappeared!
ok
|
|
|
|
|
Hello, i wanted to know if anybody knows of a good reference to study the TCP/IP protocol programming with C#, the way you structure packets, compression/decompression etc.
|
|
|
|
|