|
You're going to have to code this from scratch or try and find a 3rd partyy DataGrid component that will allow you to do this. Excel will not export it's functionality to a datagrid, it only works with an Excel worksheet.
Basically, you're going to have to provide the user interface, drop down boxes to allow selections of the filters, and provide code to handle the filtering of data (using DataView objects) and binding the datagrid to the new dataviews you create.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello experts,
I'am trying to access TabPages in a TabControl via index and not with it's name
for example
TabControl.TabPages.Remove(Tab0); as
TabControl.TabPages.Remove(0);
Who knows the way to do that ?
Thanks in advance
fracalifa
|
|
|
|
|
fracalifa wrote:
TabControl.TabPages.Remove(Tab0); as
TabControl.TabPages.Remove(0);
Who knows the way to do that ?
Use the RemoveAt() method, instead of the Remove method. Actually, a lot of collections in .NET work this way.
Yes, even I am blogging now!
|
|
|
|
|
|
Hi every one....
I 've a DataGrid...
I need to control the ScrollBars ... some Times I need To Hold them in There Place ... so I get there old value then do some code & reset there values again....
the Values is set & the Scroll Bars is moved to their old position but the DataGrid didn't sence the change in scrolls even there values was changed
I tried
Refresh();<br />
Update();
but nothing happened...
so please I need Some Help
How to make the container respond to its control Changed
A.Mohsen
C# Developer
|
|
|
|
|
Create a new usercontrol inheriting from the DataGrid and use this:
public void ScrollH(int newScrollValue)
{
base.GridHScrolled(this,new ScrollEventArgs(ScrollEventType.LargeIncrement,newScrollValue));
}
public void ScrollV(int newScrollValue)
{
base.GridVScrolled(this,new ScrollEventArgs(ScrollEventType.LargeIncrement,newScrollValue));
}
|
|
|
|
|
Hi
Can i to change on a flew some variable value at debuging time.I.e in the debug mode i set break point and when stop here i would like to change some variable value from currently visible scope on other and after this continue execution with this new value.
Thank.
|
|
|
|
|
|
real_space_monkey wrote:
Hi
Can i to change on a flew some variable value at debuging time.I.e in the debug mode i set break point and when stop here i would like to change some variable value from currently visible scope on other and after this continue execution with this new value.
Thank.
On the debugger, press Shift-F9 on the variable and write the assignment statement (e.g, "x = null", without quotes). Alternatively, add a watch on the variable, double click its value and edit it.
Note that the expression evaluator have serious limitations and not all expressions are valid on the debugger.
Yes, even I am blogging now!
|
|
|
|
|
hi
there is an error in compile of my program.this error is :
"An unhandled exception of type 'System.ArithmeticException' occurred in system.drawing.dll
Additional information: Overflow or underflow in the arithmetic operation."
in my project there is a user control that use from a picture box into it .when arrive to property image of picture box this error appeared.
this.pictureBox1.AccessibleDescription = resources.GetString("pictureBox1.AccessibleDescription");
this.pictureBox1.AccessibleName = resources.GetString("pictureBox1.AccessibleName");
this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
this.pictureBox1.Font = ((System.Drawing.Font)(resources.GetObject("pictureBox1.Font")));
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));this.pictureBox1.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("pictureBox1.ImeMode")));
this.pictureBox1.Location = ((System.Drawing.Point)(resources.GetObject("pictureBox1.Location")));
after this line ,this error repeat for remain lines.please help me
thanks
bye
|
|
|
|
|
fatidarya wrote:
this.pictureBox1.Location = ((System.Drawing.Point)(resources.GetObject("pictureBox1.Location")));
Put a break point in there and see what the value of the Point is, I suspect something moved very offscreen and/or the designer is serializing it incorrectly (or the image is too big).
top secret Download xacc-ide 0.0.3 now! See some screenshots
|
|
|
|
|
thanks leppie
but when i delete picture box this error repeat in rows that defined remnant controls (buttons ,..) .
.
.
this.pictureBox1.Text = resources.GetStrin("pictureBox1.Text");
this.pictureBox1.Visible = ((bool)(resources.GetObject("pictureBox1.Visible")));
//
// button4
//
this.button4.AccessibleDescription = resources.GetString("button4.AccessibleDescription");
this.button4.AccessibleName = resources.GetString("button4.AccessibleName");
this.button4.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("button4.Anchor")));
this.button4.BackColor = System.Drawing.Color.White;
this.button4.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("button4.BackgroundImage")));
.
....
thanks
|
|
|
|
|
This seems to be related to this .NET bug:
http://support.microsoft.com/default.aspx?scid=KB;EN-US;q326219
|
|
|
|
|
Hi!
I have a winows form application. The torm is set to:
this.BackColor = Color.Gray;
this.TransparencyKey = BackColor;
This works great!
On the form i have a pictureBox and i am trying to set the application to:
this.Opacity = 0.78;
But this doesn´t work. The Applications background is showing (the TransparencyKey is lost) and the form has the opacity 0.78...
Any Ideas???
|
|
|
|
|
I found a trick to handle that. Note the Bitmap.MakeTransparent.
[edit] note my image has a white background that i make transparent [edit]
class AboutForm : Form
{
Timer timer = new Timer();
double STEP = 8 / 256.0;
public AboutForm()
{
Opacity = 0;
timer.Interval = (int)(1000 * STEP);
timer.Tick += new EventHandler(timer_Tick);
BackColor = Color.White;
Size = new Size(512, 420);
ShowInTaskbar = false;
FormBorderStyle = FormBorderStyle.None;
StartPosition = FormStartPosition.CenterParent;
TransparencyKey = Color.Black;
Image i = Image.FromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream("splash.png"));
Bitmap b = new Bitmap(i);
b.MakeTransparent(Color.White);
BackgroundImage = b;
SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
UpdateStyles();
}
protected override void OnHandleCreated(EventArgs e)
{
base.OnHandleCreated(e);
timer.Start();
}
private void timer_Tick(object sender, EventArgs e)
{
if (Opacity >= 1.0)
{
timer.Stop();
return;
}
Opacity += STEP;
STEP *= 1 / 1.01;
}
}
top secret Download xacc-ide 0.0.3 now! See some screenshots
|
|
|
|
|
How do you get the size of a file? I'm using the File class and it contains methods such us File.GetCreationTime(...) , File.GetLastAccessTime(...) , File.GetLastWriteTime(...) , File.GetAttributes(...) , etc. but there was no File.GetFileSize(...). How do I do this?
-Rafferty
|
|
|
|
|
Rafferty Uy wrote:
How do you get the size of a file?
You've got to use the Length Property[^] of the FileInfo Class[^]:
long FileSize = new FileInfo("C:\\boot.ini").Length;
Best regards
Dennis
|
|
|
|
|
You can use FileInfo Class.
FileInfo fi = new FileInfo(strFileName);
long fileSize = fi.Length;
Maqsood Ahmed
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
I have a service that collects information from a UDP port. I would like to have a program when a user is connect that display information when the service is collecting data.
So, how can a program can be notify by a service ?
(PS.English is not my first language...)
|
|
|
|
|
There are various ways to approach this.
For example you could establish a simple TCP connection, exchange UDP packets or use Remoting. It's up to you.
www.troschuetz.de
|
|
|
|
|
Hi all,
I would like to ask a question on software design.
In C#, we can directly bind the view control (e.g. text box) with
the data get from database by the dataset object. By doing so,
it would completely eliminate the middle object layer, i.e. the relational
data is directly put onto the UI. Is this a good approach ?
For me, I will add a middle object layer in between the database layer
and the view control, so first instantiate the object by the data from the
database, then bind the object to the view control. Is this method a good practice ? If yes, why there exist the dataset class in C# ?
Thanks
|
|
|
|
|
I’m fairly new at this so these are just my thoughts don’t take them as the gospel truth.
To directly bind something like a textbox to a Sql db field would mean that the Db connection would have to permanently open. I don’t think that is usually a good idea. However an idea to “loosely” bind it might me to on creation of the form open a connection to the Db and on the onChange event from the textbox (or a submit button) throw an insert string to the db using the DataSet object. Then retier the DataSet and get a new one.
It seems kinda sloppy though.
I’d be curious to here what you think.
Ronald Hahn, CNT - Computer Engineering Technologist
New Technologies Analyst
HahnTech Affiliated With Code Constructors
Edmonton, Alberta, Canada
Email: rhahn82@telus.net
|
|
|
|
|
Hi, does anyone know how i can launch a form: new FormName().Show();
without giving the form focus?
EDIT: Better yet, is there anyway to make it so that the form cant recieve focus? I get a readonly error when I try to do this.CanFocus = false;
Thanks
- Alex
|
|
|
|
|
Does anyone know how to do this?
Can it be done using [DllImport("user32")] ?
|
|
|
|
|
CanFocus is readOnly property, You can not assign any value to it. This is the main cause of the error.
You should do as below:
you can write the below code in Form1(say)
Form2 f2 = new Form2();
f2.Show();
this.Focus();
|
|
|
|