Hi, What is the Type of SchoolID? I am assuming it is "int" then you can try to write this line; List.Add((int)SchoolDT.Rows[cboSchool.SelectedIndex]["SchoolID"],cboSchool.Text.ToString());
Mert Kantarcıoğlu
Hi, What is the Type of SchoolID? I am assuming it is "int" then you can try to write this line; List.Add((int)SchoolDT.Rows[cboSchool.SelectedIndex]["SchoolID"],cboSchool.Text.ToString());
Mert Kantarcıoğlu
Hi, In my DataGridView component there are two columns that have to be transparent when they are selected. Becouse these cells are CheckBox cells and their backgorund colors are important, I want that background color will be visible when they are selected. The problem is while they are selected, if I minimize program to taskbar and maximize again, these cells background color remain same with the desktop. After changing selection they are repainted and become normal. Also at first run, the same problem occurs. Do you have any solution or idea? Thanks.
You can use TableAdapter.Fill() Method to update DataGridView, assuming that DataGridView is bound to dataset, and it has BindingSource and TableAdapter.
Thank you for your reply. ItemDataBound is a event of DataGrid and DataList, Since I am using DataGridView and developing windows application, this event is not useful.
Hi, I have a SQL database and I want to display some items in my application with datagridview. I created stored procedures and datatables in my dataset. In one of the columns of the datagridview I want to draw an blinking image, but this image is not stored in database. For this image I have custom DGWCell and DGWColumn classes. How can I manipulate data while dataTable is creating? Or How can I override inherited DGWCell functions to draw an blinking image in that cell?
Hello All, I want to show an animated gif in DataGridViewImageCell or DataGridViewCell. When I use DataGridViewImageCell, gif image is shown as static. I tried to use my custom class derived from DataGridViewCell, but I can not define any timer object in my custom class. My image is a simple circle colored red or yellow blinking on a white background. I tried to use Graphics class to draw the the image but I could not get any solution. Do you have any solution or comment about it? Thanks, Mert Kantarcioglu
Hello All, I want to show an animated gif one of the DataGridViewColoumns, but it shows like static image. Do you have any suggestion? Thanks...
It is possible to generate source code from the class diagrams drawn in visio. But you need .net enterprise architect and visio enterprise architect editions.
Should I put this code in my code? If it is so, "private m_NetworkStream = new NetworkStream();" it gives compile error. Can you give detailed information please?
Hi All, I want to use this property but in MSDN it says "This property is not currently supported and always throws a NotSupportedException.". When will it be supported? Can you suggest any other method or property?
The recommended way to do this with V2.0 of the framework is to use the System.Net.NetworkInformation namespace.. This sample should get you started: public class NetInfoTest { public static void Main() { try { DumpIPAddresses(); NetworkChange.NetworkAvailabilityChanged += OnNetworkAvailabilityChanged; NetworkChange.NetworkAddressChanged += OnNetworkAddressChanged; Console.ReadLine(); } catch (Exception e) { Console.WriteLine(e); } finally { Console.ForegroundColor = ConsoleColor.Green; Console.BackgroundColor = ConsoleColor.Black; } } public static void OnNetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e) { if (e.IsAvailable) { Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("Network Available"); } else { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Network *NOT* Available"); } } public static void OnNetworkAddressChanged(object sender, EventArgs e) { Console.ForegroundColor = ConsoleColor.Red; Console.BackgroundColor = ConsoleColor.Yellow; Console.WriteLine("Address change event at {0}", DateTime.Now.ToString()); Console.ForegroundColor = ConsoleColor.Green; Console.BackgroundColor = ConsoleColor.Black; DumpIPAddresses(); } public static void DumpIPAddresses() { //1. Get All Network Interfaces NetworkInterface[] NetworkInterfaces = NetworkInterface.GetAllNetworkInterfaces(); //2. Loop over the interfaces foreach (NetworkInterface NI in NetworkInterfaces) { //3. Select Ethernet Interface if (NI.NetworkInterfaceType == NetworkInterfaceType.Ethernet) { Console.WriteLine(Environment.NewLine); Console.WriteLine(En
Thank you for your reply, I dont need internet avaliability, but it is useful. I think I can use NetworkAvailabilityChangedEventHandler, as you wrote. Thanks again;)
Hi all, I want to check whether computer is connected to the network or not. I use a boolean method IsNetworkConnected() as shown below. I wonder if this method is OK, if not can you suggest any method? public bool IsNetworkConnected() { IPAddress IPAd; ipHostInfo = Dns.GetHostEntry(Dns.GetHostName()); IPAd = ipHostInfo.AddressList[0]; if (IPAd.ToString() == "127.0.0.1") { return false; } else { return true; } }
I dont have much time, so may be this http://msdn2.microsoft.com/en-us/library/system.net.networkinformation.aspx will be useful
You need a program uses "serial port" of the computer. I think yoru modem connected to PC trough serial port, if then you need to control serail port of the computer. After achiving control of the serial port, you need to read the "AT Commands" of the modem from its datasheet. Using these "AT commands" you can connect any modem and transfer any data you want. If you have no experience about these procedures, you have to spend time;) I gave the big picture, may be it will give a general opinion about the think you want.
it denotes but the delegates must return void, for example "public void delegate()"
May be the problem is using " Application.DoEvents()" in the delegate function. Using this method outside of the delegate function or DoWork method may be useful ;)
I think this link will be helpful to you ;) http://www.codeproject.com/cs/internet/ListNetworkComputers.asp
My BackgroundWorker experience is not so much but as I understood from MSDN, your code implemeantation is wrong. I think instead of "Application.DoEvents()" you can use "FormClosing.RunAsync()" method where you want your BW to start. For instance you can put this method in the other Form constructor. Calling "FormClosing.RunAsync()" starts your thread, thread will stop when it finishes its job or when you wants to stopped it. Since I dont know your whole code, I cant give exact code examples.
As I know there is no API for this purpose. It is used very common, may be someone has his own code and want to share;)