|
Hello,
1.
Is there a way of making a column in datagrid as a combobox.
So when the user wants to modifiy the fields in the datagrid, and
clicks in particular cell, the dropdown list will appear, and he can only choose the values from the list as a value for the cell.
2. How can you format row in datagrid, so that the row spans the whole
lenght of the datagrid, and does not stop in the middle, etc..
Thank you.
|
|
|
|
|
try
http://www.codeproject.com/cs/miscctrl/datagridcomboboxcolumn.asp
To do custom formatting use
DataGridTableStyle and DataGridTextBoxColumn etc.
http://www.syncfusion.com/FAQ/WindowsForms/Default.aspx#44
has bunch of information
Alomgir Miah
Live Life King Size
|
|
|
|
|
Hi,
I was hoping someone might help me with a with a serialization problem. I am trying to serialize multiple objects to the same disk file. Below is the code I am using to save and restore an individual object, however I really need to save many objects to disk.
Any thoughts and help would be very much appreciated.
<br />
static void saveFile()<br />
{<br />
IFormatter formatter = new BinaryFormatter();<br />
Stream stream = new FileStream("2005.pp1", FileMode.Create, FileAccess.Write, FileShare.None);<br />
formatter.Serialize(stream, PPeriod);<br />
stream.Close();<br />
}<br />
static void restoreFile()<br />
{<br />
IFormatter formatter = new BinaryFormatter();<br />
Stream stream = new FileStream("2005.pp1", FileMode.Open, FileAccess.Read, FileShare.Read);<br />
PayPeriodSerial = (PayPeriods) formatter.Deserialize(stream);<br />
stream.Close();<br />
}<br />
cab3
|
|
|
|
|
Hi!
You can simply serialize more than one object to the same stream:
IFormatter formatter = new BinaryFormatter();<br />
Stream stream = new FileStream("2005.pp1", FileMode.Create, FileAccess.Write, FileShare.None);<br />
formatter.Serialize(stream, PPeriod1);<br />
formatter.Serialize(stream, PPeriod2);<br />
formatter.Serialize(stream, PPeriod3);<br />
stream.Close();
You'll get all the objects when deserializing in exactly the same way.
Regards,
mav
|
|
|
|
|
Hi,
Thanks for the quick response, it worked just fine.
Thanks again,
cab3
|
|
|
|
|
Hi. I have a GUI-Service remoting relationship set up with 2 remotable objects (1 used for sending messages from the service to the GUI to be displayed and 1 for user requests to be sent from the GUI to the service). The remoting is working well...except that for I receive multiple calls on the receiving end of the remoting. As I debug, I only encounter my call one time, but on the receiving end, there will be 2 occurrences. I must have something set up not quite right here - has anyone experienced this or have any tips that may help?
Thank you,
Dusty
|
|
|
|
|
I figured it out. Had the eventhandler wired up twice - figured it must be something like that!
Have a great day!
|
|
|
|
|
I'm using a custom bi-directional TCP channel to do my remoting. Using this channel, the client can receive messages back from the server once the client connects to the server.
My problem is that over a WAN/Internet environment, my custom channel is getting disconnected for no apparent reason. I have 2 questions: should I expect unstable connections over WAN/Internet? And also, to re-establish a connection, is it better to reconnect to the server objects, or go into the disconnected channel and try to re-establish the socket connection?
If anyone can answer either of these questions, or point me in the right direction, I'd appreciate it.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Homosexuality in Christianity
Judah Himango
|
|
|
|
|
Networks by their very nature can be disconnected. It is just like file permissions, memory allocation, and other limited resources. Any networked system should be designed in such a way that it will deal if one side can not contact the other.
Another thing to keep in mind is that with .Net Remoting, objects are kept alive by leases so it is not dependent on the client side to constantly make "pings". You may want to twiddle the settings found in the LifetimeServices class, especially the RenewOnCallTime . It may very well be the reason why the system is failing is because the server got rid of its representation of the object because it has exceed its lifetime. This should be an obvious exception though and only applicable to client activated objects.
|
|
|
|
|
Hi friends,
I have a doubt about a new feature, custom events in VB.NET. Do anybody know the exact equivalent in c#. If someone, please help me.
Regards,
Rathish P S
|
|
|
|
|
Yes. Create a delegate defining how your function will look like (or alternatively, use an existing delegate like System.EventHandler):
public delegate void MyDelegate(int number, string text);
Then define an event in your class:
public event MyDelegate MyEvent;
And to raise the event in your class:
if(MyEvent != null)
{
MyEvent(5, "hello!");
}
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Homosexuality in Christianity
Judah Himango
|
|
|
|
|
What is the best way (class?) to operate on single pixels (refering to them by for example absolute position in x,y coordinates), which will allow to set their colors in hex or maybe even move them?
thanks for help in advance
Martinez
|
|
|
|
|
You can get and set pixels of a bitmap using Bitmap.GetPixel(x, y) and Bitmap.SetPixel(x, y, Color). Unfortunately, the GetPixel & SetPixel methods are extremely slow, you might want to use the Fast Bitmap[^] class which gives fast access to pixels by using pointers and unsafe code.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Homosexuality in Christianity
Judah Himango
|
|
|
|
|
Hi All
I want to access a file from remote machine on my LAN. When i execute \\MyServer\C$ in my RUN Window, It asks for the username & password of remote machine. After that i can access the file through my .NET code. But after logging of from my machine and then again logging in, that code does not work.
Can anyone please tell me how can i pass user credentials through my .NET code to access remote machine file.
Thanks to all,
Sumit
|
|
|
|
|
How to control html page containing frame object by AxWebBrowser?
I wrote the code as following.
-----
HTMLDocument doc = (HTMLDocument)this.WebBrowser.Document;
object index = 1;
IHTMLWindow2 window = (IHTMLWindow2)doc.frames.item(ref index);
doc = (HTMLDocument)window.document;
-----
The error message was like this (I'm sorry for Japanese):
-----
'System.InvalidCastException' のハンドルされていない例外が mscorlib.dll で発生しました。
追加情報: インターフェイスがサポートされていません
-----
I tried translate above message.
-----
non-handled exception 'System.InvalidCastException' was occurred in mscorlib.dll.
additional information: interface is not supported
-----
the same problem occurred when I tried this code
-----
HTMLDocument doc = (HTMLDocument);
MessageBox.Show(doc.frames.length.ToString());
-----
So, what is the problem?
Please help me ...
|
|
|
|
|
Perhaps doc.frames.item(ref index) isn't returning an IHTMLWindow2 interface? I'd check that in the debugger, see the actual type that is being returned before assuming it is an IHTMLWindow2.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Homosexuality in Christianity
Judah Himango
|
|
|
|
|
No, that misses the mark.
Because this error occurs even if the code doesn't use the cast.
|
|
|
|
|
|
Error that I wrote in the first message occurs.
I.e, the situation is same when go
IHTMLWindow2 window = (IHTMLWindow2)doc.frames.item(ref index);
|
|
|
|
|
Here's what I want.
1. I have remote ftp server(with ip, user, pwd).
I want to make virtual ftp folder using shell extension which directs me to ftp server after asking about the user, pwd.
Can anyone tell me about the detailed descriptive article on this issue.
Any hint will also be welcome.
|
|
|
|
|
Hi
how can I prepare a crystal report in .net using C# & sqlserver.
Thanks in Advance
Alok
Alok
|
|
|
|
|
can you be more specific?
What would you like to do?
No hurries, no worries.
|
|
|
|
|
Crystal reports for .net has its own wizard where you can build the report, you have to link the project to view it, search for the examples in the code project
Carlos Sánchez Pérez
Mathesis Consultores
Cd. Obregon Sonora
carlos@mathesis.com.mx
|
|
|
|
|
Hi all
Can anyone help me.
I do have Table Employee in SQL Server 2000
Fields in Employee Table - Empno,Ename,Esal
I want to display these details in DataGridView.
and my column headings in DataGridView like Employee No, Name,Salary.
How to bind values to DATAGRIDVIEW using DATASET.
Thanks in advance
with thanks
Rema
|
|
|
|
|
just search with the keyword DataGridView in codeproject or google.
hope you'll find dozens of articles.
|
|
|
|