|
How do I do this? I've been searching for it on the internet, but can't find it. The Intellisense options seem rather limited.
|
|
|
|
|
Hmmm, I coulda sworn this was possible. I think this is just part of VS2008. I'll check 2010 when I get home and see if they've fixed it.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Anyone still has an idea? This seems rather weird...
|
|
|
|
|
I'm trying to use Publish in C# 2008 express for the first time and getting an error that reads
...copy the latest version into the directory that contains SignTool.exe. If CAPICOM.dll exists, you may not have proper permissions to install CAPICOM.
The dll is there, and I have local administrator rights but do not remember installing CAPICOM.
Any suggestions about this error, or direction to a tutorial of the proper use of creating an install package would be great.
Thanks.
|
|
|
|
|
I can't seem to find this, although I don't know why as it can't be that difficult.
I want to have a comboxbox appear in a DataGridView. The combo will get its data from a seperate DataSet.
Anyone?
Everything makes sense in someone's mind
|
|
|
|
|
You just need to add the dropdownlist into your grid by using edit template and use a Sqldatasource for the dropdownlist...that's it.
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Ok, I am now able to add the column, but when I click the arrow, there is nothing in it. Here's my code so far:
private void _SetupLists()
{
_TableId = (int)cboTables.SelectedValue;
DataSet dsGrid = DataProcs.ExecuteQuery("SELECT ColumnId, TableId, ColumnName, Expression FROM Columns WHERE TableId = " + _TableId, CommandType.Text);
grdColumns.DataSource = null;
grdColumns.DataMember = null;
if (dsGrid.Tables[0].Rows.Count > 0)
{
grdColumns.DataSource = dsGrid.Tables[0];
grdColumns.Columns[0].Visible = false;
grdColumns.Columns[1].Visible = false;
grdColumns.Columns[2].Width = 200;
grdColumns.Columns[3].Width = 490;
}
DataSet dsTables = DataProcs.ExecuteQuery("SELECT TableId, QueryName FROM Tables ORDER BY TableName");
DataGridViewComboBoxColumn colTables = new DataGridViewComboBoxColumn();
colTables.Name = "colTables";
colTables.DataSource = dsTables.Tables[0];
grdColumns.Columns.Add(colTables);
}
Everything makes sense in someone's mind
|
|
|
|
|
hi.
I have a problem.
a section of a project I have created excel file to transfer data from the datagridview would. I then transferred the data after checking this information to the database I want to register. I assign the following code to add a record button.
string constr = "DSN=depo";
OdbcConnection con = new OdbcConnection(constr);
string firma = dataGridView2.SelectedRows[0].Cells["firma_ad"].ToString();
string miktar = dataGridView2.SelectedRows[0].Cells["miktar"].ToString();
for (int i = 0; i < dataGridView2.Rows.Count; i++)
{
con.Open();
OdbcCommand cmd_ec = new OdbcCommand();
OdbcDataAdapter adapter_ec = new OdbcDataAdapter();
string sql_ec = "insert into siparis (firma_ad,miktar)values ('" + firma + "','" + miktar + "')";
OdbcDataAdapter adpt_ec = new OdbcDataAdapter(sql_ec, con);
DataSet dsett_ec = new DataSet();
adpt_ec.Fill(dsett_ec, "Firmaya_göre_parçaları belirle");
con.Close();
But it also said there is an error in the code. excel file with this code when processing the same record over and over again until my yaıt line goes. Add the information in the same row is continuous.
Please let me know solution for my problem. How do I need to follow a path?
Thanks.
|
|
|
|
|
dr_move wrote:
string sql_ec = "insert into siparis (firma_ad,miktar)values ('" + firma + "','" + miktar + "')";
just check the format of the sql statement first...
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
is there any class that converts in different number system?
|
|
|
|
|
Hi,
numbers don't have a base, it is only when they are converted to/from strings that a base applies.
have a look at Convert.ToInt32(String, Int32) and Convert.ToString(Int32, Int32)
[and similar for other types]
|
|
|
|
|
no. i mean what if i want to convert FFFF to binary or octal or any other format?
|
|
|
|
|
you can convert "FFFF" to an int32 and then to "1111111111111111" or "00000000000000001111111111111111" with the methods I indicated earlier.
or you can write your own code to convert one string in another, which is harder to do, and does not really offer any advantage.
|
|
|
|
|
FFFF is already in the desired "format". You just need to choose the correct string format so you can see it in the desired representation.
Int32 i = 200;
String oct = Convert.ToString(i, 8);
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
|
|
I have developed a windows application. I put a rectangle picture as a background picture for my form. In that picture, outside the rectangle, it is colored red. In my form I set that color as the transparency color so it would show only that rectangle or any other shape as a form.
It works well in my own computer, but whenever I try to use it in another computer which also has the .Net framework installed there, the color does not hide and the transparency does not work. It shows both the rectangle and the background color. What should i do?
the picture is saved as BMP.
I'm using C# in a Visual studio. The application is written in .Net 2.0.
|
|
|
|
|
A program cannot behave like this….Better you review your code. You can also post your code snippets for getting better suggestions from the forum.
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Hey, i've been looking for an effective method of storing 2 byte values within one. Or, two short values within one.
The system I currently use is by embedding an unsafe code to point to a byte value and to cast the relevant data. Here's an example:
byte db, v1, v2;
v1 = 50;
v2 = 80;
unsafe
{
byte* db_p = &db;
db_p[0] = (byte)((v1) >> 2);
db_p[1] = (byte)(((v1) << 6) | (((v2) >> 4)&0x3F));
db_p[2] = (byte)((v2) << 4);
}
Which stores two values excellently. However, For values below 4 generally, numbers tend to overlap each other. IE, values of v1 = 0, v2 = 0; and v1 = 1, v2 = 1; tend to have the same digit value of db .
I was wondering there were any other methods of storing 2 values of data (bytes) within one single data (I'm using this to remove the necessity for multi-dimensional arrays and large collection objects).
Thank you!
|
|
|
|
|
1. this isn't C# code is it? hence: wrong forum.
2. db_p is a pointer pointing to a byte, yet you write at locations db_p+0, db_p+1, db_p+2, so you write past the item your pointer points to, which is either not allowed (C#) or cheating (C/C++).
3. Of course you can store 2 byte values in 3 bytes; it is plain stupid.
|
|
|
|
|
Well i'm sorry but i'm not entirely experienced with the whole "storing two values in one".
I came here asking for help, not asking to be told i'm stupid and the methods i'm using are stupid..
That post didn't help at all, does anyone else have any real experience in storing data values inside one variable?
Thanks
|
|
|
|
|
when I said "storing 2 byte values in 3 bytes is plain stupid." I can assure you it is, as that isn't compression at all, if anything it is expansion.
Epoque wrote: i'm not entirely experienced with the whole "storing two values in one"
Nobody is, as it can't be done. If you could store two byte values in one byte (i.e. store two byte values and then retrieve those values in any order and as often as you'd like), then what would keep you from doing that recursively: you could store the first two bytes of anything in 1, the next two bytes in another one, then combine those two bytes into a final byte; in the end you could store any amount of data, why not the entire Internet, into that one final byte?
We do get lunatics asking such questions regularly.
OTOH one of the replies you posted earlier in this thread seems to indicate an entirely different problem: storing one (or N) values for a 2D collection of cells. That can easily be solved in many ways:
1. with N two-dimensional arrays
2. with N one-dimensional arrays, and linearizing the index (as in index = x + y * width )
3. with a single one-dimensional array holding a little struct, which holds the different values for a single cell.
If that is what you need, then you should have made that clear from the start.
|
|
|
|
|
No offense, but your code is odd.
Now of course you can store multiple values in one variable, but they'll be smaller.
Example:
static byte CombineBytes(byte a, byte b)
{
return (byte)((a & 15) | (b << 4));
}
A and B can only be zero through 15 though, obviously.
To get them back:
byte a = (byte)(x & 15);
byte b = (byte)(x >> 4);
warning: all code here is untested. (but really it is just about the idea, not the actual code)
|
|
|
|
|
Thank you for this.
Let's say I want to store a value greater than 15, would it be plausable to use a "short" value instead, to increase the available range of data?
And, would each of the values produced be unique, or would they intersect at some point with conflicting values?
Thank you for your help.
|
|
|
|
|
It just divided the byte in two parts, you could do the same with a short (then you could fit in two complete bytes) or an int (then you could fit in 2 complete shorts or 4 bytes)
But if you want a 2D -> 1D mapping it's better to use something "sane" such as x + y * width or if you don't want to use width you could use morton numbers to get a Z curve (just interleave the bits of your indices)
|
|
|
|