|
Hy!
I want to make a comboBox and when I want to select I have some time in Items like
08:00 AM
08:30 AM
09:00 AM
but I want to have the possibility to introduce a time like 08:05 AM,
10x
|
|
|
|
|
Then you just have to get the text from the editor and add it to the collection of items in the combobox (in some combobox related event or when pressing some button).
SkyWalker
|
|
|
|
|
sorry,Your question is not clear...............
Try with DateTime values
My small attempt...
|
|
|
|
|
mihksoft wrote: Help!
Everyone asking questions on this forum is looking for help. Please choose a more appropriate subject line.
|
|
|
|
|
Could you please elaborate the question please. I could not get you properly!
Does that mean, that once you click on 8.00 am, u need to place a time with a difference of .05 units in some other control or something.?
Keshav Kamat
India
|
|
|
|
|
Nope
I want to have the possibility to select a time from a drawlist, but I want to have the possibility to modify the date in the same control.
|
|
|
|
|
what is the criteria for modification..........
If this is not a frequent action then you can simply remove and add new items using DataTime variables.................
but still ur question is not clear
My small attempt...
|
|
|
|
|
Hi,
I want to send an email with C# over a Smtp server. I can send a E-Mail, but I've got problems with the Proxy-Server.
Is there any possibility to authenticate me with C# at the proxy?
regards
spotl
|
|
|
|
|
All I could find was this, Someone with the same/similar issue, who was redirected to using WebServices.
How to send email through http proxy [Firewall] [^]
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
System.Drawing.StringFormat class allows you to justify a text to left, right, top, bottom, center and middle of the clip rect. But I saw in Microsoft Word an option to justify text to both margin, so every line of text has the same width.
I checked the System.Drawing.StringFormat properties and didn't find out how to do this.
Please help me, thanks alot.
|
|
|
|
|
I've done a quick lookup, and you're right, it doesn't work, not for textbox, not for richtextbox. I read on a forum that it was just not possible at all, without using custom controls that you can buy/make.
Although I would hope that Framework 3.0 or GDI+ has this functionality somewhere. I can't help you with that, but you could point your question towards them (also).
public object BufferOverFlow<br />
{<br />
__get { return BufferOverFlow; }<br />
__set { BufferOverFlow = value; }<br />
}
|
|
|
|
|
I got the problem when using Graphics object to draw text, like this
Graphics g;<br />
g.DrawString("Text", font, brush, rect, format);
with format is an instance of System.Drawing.StringFormat
No way to strect the text lines to have the same width
Thanks for your answer anyway.
|
|
|
|
|
Hello All,
How can I edit a datagrid item faster. I have the following approach.
string LocalTimeToStore = null;<br />
DateTime dt;<br />
DateTime local;<br />
string LocalDateTime = null;<br />
<br />
for (int i = 0; i < LoggerDatagrid.Rows.Count - 1; i++)<br />
{<br />
LocalTimeToStore = LoggerDatagrid.Rows[i].Cells[1].Value.ToString();<br />
dt = Convert.ToDateTime(LocalTimeToStore);<br />
local = dt.ToLocalTime();<br />
LocalDateTime = string.Format("{0}/{1}/{2} {3}", local.Month, local.Day, local.Year, local.TimeOfDay);<br />
LoggerDatagrid.Rows[i].Cells[1].Value = LocalDateTime;<br />
}
Is there a method to edit the data grid cells and repopulate the same back? please help me
Keshav Kamat
India
|
|
|
|
|
Are you asking for better performance or less Lines of Code (shorter code)?
For the performance, I think it is best to just change the format, and not the actual value of the cells. This can be done by editing the CellStyle, either via the IDE (Datagridview > edit columns > DefaultCellStyle > CellStyle Builder > Format) or via code:
dgv1.Columns[0].DefaultCellStyle.Format = ...
Hope this helps...
Here an MSDN link to Formatting types[^]
public object BufferOverFlow<br />
{<br />
__get { return BufferOverFlow; }<br />
__set { BufferOverFlow = value; }<br />
}
|
|
|
|
|
hi
ok can u tell me a way, where in I can populate a dataset from a datagrid.
that would be helpful.
Keshav Kamat
India
|
|
|
|
|
If it is a bound datagrid, you just have to cast the datasource property into a dataset or datatable.
DataTable dt = (DataTable)dgv.DataSource;
public object BufferOverFlow<br />
{<br />
__get { return BufferOverFlow; }<br />
__set { BufferOverFlow = value; }<br />
}
|
|
|
|
|
thanks. i will try it.
Keshav Kamat
India
|
|
|
|
|
by the way,
how do I access a cell of this table that is created.
I need to modify the contents of this table. How do I do it?
Keshav Kamat
India
|
|
|
|
|
look up DataTable in Object Browser.
You can use DataTable.Rows[x].Cells[y].Value or something of the likes.
public object BufferOverFlow<br />
{<br />
__get { return BufferOverFlow; }<br />
__set { BufferOverFlow = value; }<br />
}
|
|
|
|
|
Hi i developed a windows application, after completion of the processing it has to write the results in to a file. I wrote code for this form_closing event. It is working fine when i closes the application. My problem is
If the system is shutting down with out closing the application it is not writing data in to the file. I dont know what event is fired when the application is closed by shutdown.
It is very important to store the results into the file.
Please Help me.
Thanks in Advance.
Ramu
|
|
|
|
|
|
Thank You Very Much.
This helps a lot for me.
Thank You
Ramu
|
|
|
|
|
just use the form closing event and use the FormCloseEventArgs object
and check if( e.Closereason == CloseReason.WindowsShutDown)
hope that is useful for u...
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Thank You very Much.
This helps me a lot.
Thank You
Ramu.
|
|
|
|
|
Hi,
I want to save/upload a file in sql database BUT WITHOUT using the upload object from c#, just a straight forward code. I already have the path of the file itself with fuill permission. Does anybody know how to do it?
Thanks
Dabsukol
|
|
|
|