|
Hi,
Can anyone tell me if this is possible in a C# windows app.
I have a large gridview in C# but only a small amount of space to display this grid in.
What I want to do is change the background colour of a "header cell" to indicate any errors which may exist in the grid that may be out of view - this will help the user so they do not have to scroll up & down the grid to see any possible errors.
I have googled & googled & I still can't find out how to do this.
Any help would be great!
Thanks
Janet
Lady Programmers are a rare breed!
|
|
|
|
|
But_Im_a_Lady wrote: What I want to do is change the background colour of a "header cell" to indicate any errors which may exist in the grid that may be out of view - this will help the user so they do not have to scroll up & down the grid to see any possible errors.
The GridView doesn't support this action on its own. Popbably, you will need to write your own code to do this(If it is possible somehow)
Another thing what you can do is that you can programitically scroll to the row which has the error.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Well, like the topic says, is it possible to play a video (any format, e.g. .avi) directly from a stream (preferably FileStream)?
I was thinking there was somethink like Microsoft.DirectX.AudioVideoPlayback.Video.OpenStream(Stream str)
Because somewhere "down the road", some sort of stream must be opened anyway, so why not as an argument??
|
|
|
|
|
I don't think that's on offer, no.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
not with directshow.net or anything?
|
|
|
|
|
I believe it can be done with MCI (Media Control Interface).
MSDN says "MCI can open AVI files by using a file-interface pointer or a stream-interface pointer".
Sounds promising?
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
Hello,
I am not very well in ASP.
Do some one help me to create something in asp like a job in sql that run at 12:00PM
(Any link or any title)
Best regards
dghdfghdfghdfghdgh
|
|
|
|
|
Do you mean ASP or ASP.NET ? Either way, you're in the wrong forum. I know that even though I can't work out what you actually want here.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Christian Graus wrote: I can't work out what you actually want here
Somebody to think for her.
|
|
|
|
|
You can search a vb script code for the task scheduling.Put this vbs file in your task scheduling at specific time at every day.
|
|
|
|
|
First of all, you are in the wrong forum. For ASP.NET use the ASP.NET forum. For classic ASP use the web development forum.
Second, ASP is not suitable for running something at a specific time.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
In my application, client enters some data and submit them. As a result of this action, .html file is generated.
I need to fax this .html file (contains images), but without client knowledge.
Thanks in advance.
"...And then she'd say, it's Ok, I got lost on the way
but I'm a supergirl, and supergirls don't cry. ..."
Reamonn
|
|
|
|
|
How do you mean, without client knowledge ? They will notice when a fax arrives.
I am not sure if an fax api is built in, or if you need to buys a library. I imaging you'd need to render your web page in IE and do a screen shot to turn it into a bitmap.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Christian Graus wrote: if you need to buys a library
I hope you remember this[^].
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
"without client knowledge" - the whole process of sending faxes should be run on the server, without client even knowing that faxing was started. Fax will be sent to third party. Fax number is in database.
.html documents are saved on server.
I've found option to send fax via e-mail, but "this type of e-mail to fax will generate pages approximately 80 characters wide using 11 point courier font. Ascii graphics and special characters may or may not look correct when faxed. Keep your text simple."
"...And then she'd say, it's Ok, I got lost on the way
but I'm a supergirl, and supergirls don't cry. ..."
Reamonn
|
|
|
|
|
Hi,
I am working through a GOF design pattern, and I am not understanding a section of the code.
class Singleton
{
private static Singleton instance;
protected Singleton()
{
}
public static Singleton Instance()
{
if (instance == null)
{
instance = new Singleton();
}
return instance;
}
}
Here is the other piece of code:
class MainApp
{
static void Main()
{
Singleton s1 = Singleton.Instance();
Singleton s2 = Singleton.Instance();
}
}
Why is this possible in the Singleton class..
instance = new Singleton();
..but in the class MainApp I cannot instantiate a Singleton() instance?
Please can someone help me with my confusion?
Thanks
Brendan
|
|
|
|
|
.NET Enthusiast wrote: Why is this possible in the Singleton class..
instance = new Singleton();
..but in the class MainApp I cannot instantiate a Singleton() instance?
Because the constructor is protected, so it's only accessible in the class itself and classes that inherit from the singleton class.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Once you are inside the class you can create an object of that class, even the constructor is private, in your case its protected. In MainApp you are not deriving that class, so for MainApp Singelton class in not visibile, as its constructor is protected.
Hope this helps you.
Imran
[MCTS]
Few have audacity to speak truth
|
|
|
|
|
The purpose of having a constructor that is not public, is that the class itself gets full control over the instances that is created.
The singleton pattern is used when you only want a single instance of the class. The constructor is non-public, so that only the class itself can create instances. That way you have to call the Instance method to get an instance, and it will only create a new instance the first time it's called.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
I need to view DataReader results in WinForms application for quick debug.
I tried code below but DataGridView is empty.
How to fix ?
using System.Data;
using System.Windows.Forms;
using Npgsql;
class Form1 : Form
{
static void Main()
{
Application.Run(new Form1());
}
DataGridView dataGridView1 = new DataGridView();
Form1()
{
string s = "SERVER=localhost;USER=postgres";
string query = @"select * from pg_tables";
var con1 = new NpgsqlConnection(s);
IDbCommand cmd = con1.CreateCommand();
cmd.CommandText = query;
con1.Open();
var dr = cmd.ExecuteReader();
dataGridView1.DataSource = dr;
Controls.Add(this.dataGridView1);
}
}
Andrus
|
|
|
|
|
you missed DataBind method() ???
Imran
[MCTS]
Few have audacity to speak truth
|
|
|
|
|
This is Winforms. DataGridView does not have Databind method.
If I assign IList<> to DataSource, DataGridView shows data withtout Databind method.
So I think I havent missed it.
Andrus
|
|
|
|
|
I am using HttpWebRequest object for communicating with a Sun Java System Web Server. The behaviour of the Server is very random. For the same requests, sometimes I get the response and sometimes I get Internal Server Error 500.
This is a third party server which reportedly works fine with other client applications so it seems there is a problem with my code. The code is simply using HttpWebRequest and HttpWebResponse objects to massage requests and responses.
I am re-initializing the HttpWebRequest object for each new request, the reason being the fact that I cannot reassign request.ContentLength to a value once the request has begun.
Any clues?
|
|
|
|
|
You haven't supplied a lot to go on here. Without seeing the code, it's going to be difficult to diagnose what issues you are having.
|
|
|
|