|
I cant believe that. I looked for a repeater at first what i found was only for webforms.
This is exactly what i was looking for.
Thank you very much.
You are the best.
Kind regards,
Berkdan
|
|
|
|
|
My pleasure.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
unfortunatelly since datarepeater control can be either horizontal or vertical, it is not the one that i wanted to.
i am working on my own control it's almost done but i stuck on something.
Everything works fine except i cant select a card at runtime. so when the user clicks on a card bindingsource will not change the record position.
Do you know how to select child control of a usercontrol at runtime.
Thanks again.
|
|
|
|
|
Handle the 'Card' Click event (possibly in your host control**) and use something like the following:
Dim itemFound As Integer = hostBindingSource.Find("aColumnName", "Something to find")
hostBindingSource.Position = itemFound
' or all in one line (rather obvious)
hostBindingSource.Position = hostBindingSource.Find("aColumnName", "Something to find")
** this will mean that in the code that creates the 'Card' you will have to hook up the Click event to the handler method in the host:
AddHandler newCard.Click AddressOf CardClickHandler ' or similar. Please excuse any syntax errors, I don't do a lot of VB
If your hostControl ever deletes a 'Card' use:
RemoveHandler deletedCard.Click AddressOf CardClickHandler ' before actually disposing deletedCard
Hope that helps. If not please come back and I'll answer tomorrow, as I'm logging off now.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
yes it works with handling click event but child controls does not handle gotfocus event i think.
so far it's going well.
Thank you Henry.
Have a good day.
|
|
|
|
|
Hi
Hi I am using System.Diagonostics.Process.Start for staring a new process.
If I want to pass mulitple marameters with different switches, how can I do it?
Thanks
Fadi
|
|
|
|
|
Hi,
Process.Start expects an EXE and an argument list, both as a string.
It is very similar to the command line you would enter in a DOS window or "command prompt"
so separate with spaces, use double quotes to keep arguments that need spaces together.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I had tried putting spaces. but it didn't work out.
W.r.t. ur reply, i tried putting quotes for the strings with spaces and it worked fine.....
Thank you very much Luc
|
|
|
|
|
you're welcome.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Sometimes app throws an exception when I try to update one particular table adapter, exception says that it's inner sql adapter is null!
That part of code is old at least three years and it work fine until last few days, to make it even stranger when I run through the with debugger it works fine, but when I or testers run it as .exe it crashes again.
Same code is used on several places (same data layer) and it crashes only for one controller during insertion.
Controller which calls that part of code has two options for saving data, Save and Save and close. Save and close runs into problems, but Save never! Difference is only in form closing.
I haven't copied any code because it is simple someAdapter.Update(myRowCollection); .
Please help.
|
|
|
|
|
Have you tried to put Try and Catch blocks around your code to see what the exception is?
|
|
|
|
|
Almost entire method is within try-catch block.
I've explained exception in other reply.
|
|
|
|
|
What Exception? I had a similar case, in one place in my app I was lazy and used Update and all was fine until I started getting reports of a Concurrency Exception. It turned out that the guy who was generating the data I was working on created some duplicate records; he wasn't supposed to, he said he didn't, and my code couldn't handle it when he did. I changed my code so it doesn't use Update and all is fine.
All in all -- don't use DataAdapters!
|
|
|
|
|
This is the exception message:
"Object reference not set to an instance of an object."
It has no inner exception; as I said SqlDataAdapter of TableAdapter component SOMETIMES is null! However it is NEVER null when I run it through debugger, when I remove breakpoints I can expect problems.
But everything is initialized and this very code is used for some years without problems.
|
|
|
|
|
Hi,
Is there any way to set Edit Mode to all cells in a DataGridView.
My Problem is i juz wanted to show an Custom Control in DataGridView cells.
If it's possible to set all cells in edit mode, i will make my custom control as editing control of the grid to show the custom control in all cells.
Or do i have any other way to show custom controls in a DataGridViewCell with out using Graphics.
Thanks
Anbu
|
|
|
|
|
Use EditMode Property in DataGridView to Edit the DataGridView Cells.
Regards,
Karthik K...
|
|
|
|
|
Hi,
Thanks for the reply. i can use edit mode property to edit cells.
But this allows only one cell to be edited at any time.
i juz wanted to set to edit mode for all cells so that my editing control will be visible in all cells.
Thanks
Anbu
|
|
|
|
|
The errors and warnings panel in visual studio looks really sharp. I would love to have something similar in my own app, what's a good control to use?
Did I post well? Rate it! Did I post badly? Rate that too!
|
|
|
|
|
It's just a simple grid with buttons to filter it for Errors, Warnings or Messages
only two letters away from being an asset
|
|
|
|
|
When you say grid you mean something like a data grid? Forgive me, I'm very new to UI.
JP
|
|
|
|
|
Yes, its a datagrid displayed in a dockable window
only two letters away from being an asset
|
|
|
|
|
Hi All,
My question is simple, but VERY important to me .. as far as I know, one managed wnd can be parent of any unmanaged wnd... no vicevesa... I'm not an expert and I'd like to suggest that someone could post one example to do this...could be VERY useful to everybody
One unmanaged window ( C++ ) can be parent of one Managed ( C#.NET ) window ?? if this is possible... please share with me the answer...
Thanks in advance,
Best regards.
|
|
|
|
|
richard072 wrote: could be VERY useful to everybody
Whehe, good argument
First, you add a using clause;
using System.Runtime.InteropServices; Next, copy this code into your class;
[DllImport("user32.dll", EntryPoint = "FindWindow", SetLastError = true)]
static extern IntPtr FindWindowByCaption(IntPtr ZeroOnly, string lpWindowName);
[DllImport("user32.dll", EntryPoint = "SetParent", SetLastError = true)]
static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent); Next, add this code to the place where you want to change the parent;
IntPtr window = FindWindowByCaption(IntPtr.Zero, "Calculator");
SetParent(window, this.Handle);
--edit--
I posted the reverse thing, but it's also possible from C++ using the same technique. A quick suggestion tho - why not make an ActiveX-control out of the C# window?
Enjoy
I are troll
|
|
|
|
|
Unfortunately, that didn't work... when the SetParent( .. , .. ); function is being executed, the Form window is not showing in the screen,..
is there another way ?
Thanks.
Best regards
|
|
|
|
|
Another way would be converting to COM. I'm curious to why it didn't work, as I used these API's from VB6 to embed a C# form. Did you get any error?
I are troll
|
|
|
|