|
Where to pass column name and data type..?
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
DataColumn col = table.Columns.Add();
col.ColumnName = "name";
col.DataType = type;
DataRow row = datatablename.NewRow();
row["columnname"] = value;
|
|
|
|
|
|
hi all
i build activex control by using C#.Net but i wount to preview any KeyDown on any control in new control .
the new control is 2 control is the label and textbox ,
i wount to preview any key down on textbox or on label i means any way key is down on any control on my new control .
how i can have any key is down on this control
thank for any body hellp me
Thaer
|
|
|
|
|
Hello together,
is it possible to display into a DataGridViewImageColumn different pictures, for different rows?
I tried it already this way:
looping on each row, getting the DataGridViewImageCell and set the Value-Property to a
new System.Drawing.Bitmap
But it don't work
Thanks for help
|
|
|
|
|
yes you can add columns by datatype image
go to edit columns to thr datagridview and add new column by type DataGridViewImageColumn
welcom mr
Thaer
|
|
|
|
|
Sorry, i think you missunderstand my question.
i need an ImageColumn and in this column, the rows have different images.
For example
Row 1 has a "doc.jpg"
Row 2 has a "mail.jpg"
Row 3 has a "fax.jpg"
Row 4 has a "mail.jpg"
But thanks for help
|
|
|
|
|
Use this
Icon treeIcon = new Icon(Path + "Images\\History.ico");
DataGridViewImageColumn iconColumn = new DataGridViewImageColumn();
iconColumn.Image = treeIcon.ToBitmap();
iconColumn.Name = "ColHistory";
iconColumn.HeaderText = "History";
DataGridView1.Columns.Insert(12, iconColumn);
//Where 12 is location of column number
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
Hello Everyone,
Can anybody let me know how to run the CSharp program in Dos window of .NET Framework
|
|
|
|
|
what do you mean by CSharp Program?????
Nothing is Impossible. Even impossible spells "i m possible"
|
|
|
|
|
Do you mean a Console Project?
|
|
|
|
|
Helloooooooooooooooooooo
Yes i mean a console app.
|
|
|
|
|
Hi
In the properties of your project there's an option called "output type" (or something like that..) set it to console application and it will open in a console window.
|
|
|
|
|
If u are using IDE to develop application then, while selecting a new project you can choose the project type. Select a console project type.
If the post/article served your purpose then, please assist me in keeping it up by donating a small amount of money to my Paypal account. Email: sreejithssnair@hotmail.com
|
|
|
|
|
Open a DOS box and run it.
|
|
|
|
|
Hi I've created a Custom Control "YoLabel" with
<br />
SetStyle(ControlStyles.DoubleBuffer | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor, true);<br />
and drawing it inside OnPaint(...) method. The Control draws itself fine.
Now I need to paint something more from outside the label such as
<br />
YoLabel lbl = new YoLabel();<br />
lbl.Paint += delegate(object s, PaintEventArgs)<br />
{<br />
};<br />
Now the above Event Handler is not firing. Inside YoLabel Control I'm using invalidate whenever Text, Color, etc properties are changed to repaint it.
So what is missing. Please Advice.
Thanks...
|
|
|
|
|
do you call base.OnPaint in your override of OnPaint? the Paint - Event is fired from there.
|
|
|
|
|
Thanks m@u it worked fine...
|
|
|
|
|
Hi,
Sukhjinder_K wrote: YoLabel lbl = new YoLabel();
lbl.Paint += delegate(object s, PaintEventArgs
it seems like you have two YoLabels now, one got added to Form.Controls and paints fine
thru OnPaint, the second one is not part of any Control collection, hence will never
become visible or get its Paint event fired.
You should not create a second YoLabel, you should add your painting delegate to the
Paint event of the existing YoLabel.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Thanks for the interest codeproject. I'm creating a YoLabel as
<br />
MyForm : Form<br />
{<br />
MyForm()<br />
{<br />
YoLabel lbl = new YoLabel();<br />
lbl.Paint += delegate(...);<br />
lbl.MouseUp += delegate(...)<br />
<br />
this.Controls.Add(lbl);<br />
this.lbl.BringToFront();
}<br />
}<br />
So I have only one YoLabel...
|
|
|
|
|
then all is fine, as long as you call base.OnPaint() as the other reply mentioned.
some people by mistake create a new instance to invoke a method or add a delegate,
which obviously does not produce the result they are after.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
How to setup WebBrower Control's encoding, with code?
|
|
|
|
|
jason_mf wrote: How to setup WebBrower Control's encoding, with code?
AFAIK, you will need to specify the encoding in the HTML that you would load in the WebBrowser.
|
|
|
|
|
I have an application where configurations are stored in a XML file. I have a ConfigurationManager class which provides properties to all these XML data. I am looking for an efficient method to read data from the XML. I have tried the following
1 - Tried using XMLDocument class
Time taken : 20Milli seconds
2 - Tried using XML serializer
Time taken : 400Milli seconds
Obviously I could go with XMLDocument class approach. But I just want to make sure I am choosing the right method. BTW, is there any way to cache the configuration manager instance, then I can avoid reading it all the time.
|
|
|
|
|
Hi,
I think ConfigurationManager class has been done many optimizations. According to my knowledge it is the best method.
Yes, you can cache ConfigurationManager Instance by using Singleton Design Pattern.
Regards!
jayasshc
|
|
|
|