|
lo,
i want to change a number in a certain cell
i thought i coud change it with a for loop
and i found that i can select a cell with datagridview[columnindex,rowindex]
so i thought that this would work:
datagridview[3,2].value=x.tostring(); //x is a int from the for loop
but it doesnt,
anybody ideess ???
plzzzz
|
|
|
|
|
YOU CAN USE SIMPLY
IT WILL CHANGE THE DESIRED VALUE WITH YOU VALUE
DATAGRID[ROW,COLUM]="YOUR TEXT";
sikandar
|
|
|
|
|
when i write
datagridview2[3,2]= "this is text";
i get an error
Cannot implicitly convert type 'string' to 'System.Windows.Forms.DataGridViewCell'
|
|
|
|
|
datagridview2.Rows[3].Cells[2].Value.ToString()= "this is text";
|
|
|
|
|
it works :p first not but now it does
thxx
|
|
|
|
|
Never mind dude
|
|
|
|
|
answer my combo question then i will not mind
thanks
sikandar
|
|
|
|
|
which is ur question???????
|
|
|
|
|
right below you question
if u can and try ur self
how to do some items of combobox will be bold and some are regular.
???
i willbe greatfull.
sikandar
|
|
|
|
|
|
Dear programmers
is there any way that some item of combobox can be bold and remaining will be regular.
if it is then plz tell me how..
thanks in advance.
sikandar
|
|
|
|
|
You need to make it owner drawn and render the text yourself.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
thanks for response
i don know how can i render the text
can u plz give descpriction
thanks
sikandar
|
|
|
|
|
Its quite easy to make an Owner Drawn control. Basically, you are telling a control that you will write the code to draw each item in a control. In the case of a combo box, each item is an item in the drop-down portion.
To do it, follow these steps
1) Drag a combo box to your form
2) In the properties window change its DrawMode property to OwnerDrawnFixed
3) Change to the events and double click the DrawItem event
4) Switch to code view and you should have this
private void comboBox1_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e)
{
}
5) Write your code in there, for example I used the following code to alternate bold and nomal items
private void comboBox1_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e)
{
if((e.Index%2)==0)
{
e.Graphics.DrawString(this.comboBox1.Items[e.Index].ToString(),e.Font,Brushes.Black,e.Bounds,StringFormat.GenericDefault);
}
else
{
Font boldFont = new Font(e.Font,FontStyle.Bold);
e.Graphics.DrawString(this.comboBox1.Items[e.Index].ToString(),boldFont,Brushes.Black,e.Bounds,StringFormat.GenericDefault);
}
}
|
|
|
|
|
hi all ,
i'm asking if could the windows service that i create , can be run automaticlly when the windows start and read from the
XML file .
:->regards ,
abdallah zaid
|
|
|
|
|
Yes. Use services.msc console and set the Startup type for your service to Automatic.
|
|
|
|
|
thx alot its help full for me
, but also i am asking about get this service working with xml instruction (like scheduling things "daily, monthly...etc) so this service can interact with these changes in the xml.
:->regards,
abdallah zaid
|
|
|
|
|
You can get your service to read an XML file if you want.
|
|
|
|
|
how is that can be done ?
|
|
|
|
|
http://support.microsoft.com/default.aspx?scid=kb;en-us;307548
|
|
|
|
|
thx its helpfull steps.........,,
mircee:->
|
|
|
|
|
Hi!
how to display large numbers in exponential form on graph axis ?
bye,
Asha
hi!
|
|
|
|
|
Using string.Format to format your number however you like, then you can draw the string on your graph.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
when can i get the ORCA for .net 1.1
and the article about it ?
Thanks
MHF
|
|
|
|
|