|
I have to fill a column in a datagridview with a default value, therefore I have defined a custom celltype:
public class BNummerCell : DataGridViewTextBoxCell
{
public override object DefaultNewRowValue
{
get
{
return NewCellValue();
}
}
}
From this custom cell I created a custom columntype:
public class BNummerColumn : DataGridViewTextBoxColumn
{
public override DataGridViewCell CellTemplate
{
get
{
return new BNummerCell();
}
set
{
//base.CellTemplate = value;
}
}
}
I have added a column of type BNummerColumn to my DataGridView, and new rows are supplied with a correct default value.
However, whenever I click on the new row, the default value dissapears and doesn't come back.
It must be simple, but I searched already over an hour....
Thanks in advance,
Rob
|
|
|
|
|
Hey guys
Im still battling with this crap!
this is a console app and sits in C:\windows\system32 . the reson being so that another program can access it via command prompt. When the caller program calls this exe i get the error message "CLR error: 80004005 program will now terminate".
If i move the app and its dll to the desktop it executes
im so confused... this works like a charm in XP
why is this happening? apart from vista being retarded
[update]
i wrote an hello world console app and put it in system32, targeted 3.5 and it worked fine. Im convinced it has something to do with the SDK (C++ wrapper) the app is calling. I still dont get how it works if i move it out of there.
also tried running as admin & played with the compatibility stuff
[/update]
thanx
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
modified on Friday, August 22, 2008 2:36 PM
|
|
|
|
|
Check which versions of .NET framework are installed.
This problem can occur if v2.0.50215 is installed (it was a pre release version)
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
only 3.5 shows in "Programs and features"
how would it execute after i moved it out of system32 if its a compatibility thing? im so confused with this
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Check the framework folder - not sure where it is on Vista, on XP it's C:\WINDOWS\Microsoft.NET\Framework - there's a folder in there for each version.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
found it, its got...
V1.0.3705
V1.1.4322
V2.0.50727
V3.0
V3.5
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Looks OK
It may be worth uninstalling all of them and then re-installing the ones you need.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
all but 3.5 is "built in" vista, AFAIK there isnt an easy way to uninstall it
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Hmmm... Maybe this blog[^] can help?
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
Thank you dave, ill try it monday morning
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Try taking over permissions of that file.
Chuck Norris has the greatest Poker-Face of all time. He won the 1983 World Series of Poker, despite holding only a Joker, a Get out of Jail Free Monopoloy card, a 2 of clubs, 7 of spades and a green #4 card from the game UNO. In the movie "The Matrix", Chuck Norris is the Matrix. If you pay close attention in the green "falling code" scenes, you can make out the faint texture of his beard. Chuck Norris actually owns IBM. It was an extremely hostile takeover.
|
|
|
|
|
hey
i just updated the original message...
what do you mean by taking over permissions?
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Thought is was worth a shot, any ways you right click a file, click properties, click the security tab, click Edit and change the permissions in your favour.
Chuck Norris has the greatest Poker-Face of all time. He won the 1983 World Series of Poker, despite holding only a Joker, a Get out of Jail Free Monopoloy card, a 2 of clubs, 7 of spades and a green #4 card from the game UNO. In the movie "The Matrix", Chuck Norris is the Matrix. If you pay close attention in the green "falling code" scenes, you can make out the faint texture of his beard. Chuck Norris actually owns IBM. It was an extremely hostile takeover.
|
|
|
|
|
The Default access specifier for the class members in C# is Private
and
The Default access specifier for the class in C# is Internal
Are these statements correct ......
Actually somewhere i read tht "The Default access specifier for the class members in C# is Internal
Plz suggest me ????
|
|
|
|
|
|
Yep u r right,
Always Class is internal and member variable pertaining to that class are private in C#.
Regards,
Rohan.
|
|
|
|
|
Hi,
I hv my datagrid in a table,which includes labels also..I am exporting the whole table(Datagrid,labels)to excel.The labels are displayed randomly,but when i run the application it displays correct,but when exported to excel they r arranged in random fashion..
Pls can anyone help..
Thanks & Regards
Annu
|
|
|
|
|
Check the code where you exporting data to excel ?
|
|
|
|
|
Hey here is my code...
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Clear();
Response.ContentType = "application/ms-excel";
Response.AddHeader("content-disposition", "attachment;filename=MonthWise.xls");
Response.Charset = "";
System.IO.StringWriter sw = new System.IO.StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
tb.RenderControl(hw);
Response.Write(sw.ToString());
Response.End();
}
public override void VerifyRenderingInServerForm(Control Control)
{
}
Here tb is my table which i am exporting...
|
|
|
|
|
where is the code for label ??
|
|
|
|
|
My labels are in table..its id is tb
|
|
|
|
|
|
i am working webparts... Its successfully working but cannot published.. the following error will be displayed
Error 1 The process cannot access the file 'C:\Documents and Settings\Afxisi\Desktop\webparts\UserControlEditorPartEx\App_Data\ASPNETDB.MDF' because it is being used by another process. /
|
|
|
|
|
This C# Forum. Please Put it in ASP.NET Forum
|
|
|
|
|
Hi guys, im making an application kind of like a peer to peer program to share text over the network. Im originally thought I would use sockets and have one server object and one client object. But now my problem is what happens if Computer A needs to send something to B and then C? Do I disconnect the client, set the new IP address, then reconnect, then do that all again. Or what? That seems rather innefficient to me :-/
Im very new to network programming so any help would be appreciated. Whats the best way to send information when theres lots of peers?
Thank you!
|
|
|
|