|
i did check and all my column name, it did match up.
any clue?
|
|
|
|
|
nurul aida wrote: any clue?
Nope
The exception quite clearly states that it can't find the ID column in the DataRowView so that's where you'll have to look.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Ed, thanks for the help.
it is actually one column didn't match...
thanks!
|
|
|
|
|
Hi,
I'm wrinting a windows application in C# and want to build a 'breadcrumbs' section to show the user where they are in the application.
In keeping with the webstyle of breadcrumbs most users are familiar with I want my breadcrumbs to display as hyperlinks.
I tried using a group of linklabels (on for each level) but I have trouble with this when one of the level names is so long that it overwrites part or all of the next label... so I thought I'd use a richtextbox.
I declared a couple of strings to handle the rtf syntax:
<br />
string rtfStart = "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Verdana;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs18 ";<br />
string rtfEnd = "/\\par\r\n}\r\n";
then added my level names inbetween:
<br />
string test = rtfStart + root + Separator + deck + rtfEnd;<br />
richTextBoxBreadCrumbs.Rtf = test;<br />
However this just displays my level names without URL style formatting.
So my question is, can you force a richtextbox to display a string which is not a URL as a URL and if so, what am I doing wrong?
If this can't be done and I have to resort to using a linklabel, is there any way to deduce which part of a link label has been clicked if I just build my breadcrumbs as one long linklabel?
Too hot and tired, Newbury, UK
|
|
|
|
|
Hi!
You might want to take a look at this article[^]
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Mav,
I think that's just what I'm looking for. Thanks!
Mike
|
|
|
|
|
hi
can you please tell me if there's a way to check the current InputLanguage if it's considered a latin language?
thank you
|
|
|
|
|
use System.Globalization; namesapce<br />
and check <br />
<br />
if(CultureInfo.CurrentCulture.DisplayName=="Latin")
<br />
to get currently istalled cultures name use CultureInfo.InstalledUICulture.DisplayName
-- modified at 2:18 Tuesday 25th July, 2006
|
|
|
|
|
I do not think there is a direct way. You can go though the CultureInfo's TextInfo property and get the code page (ANSI, OEM or whatever you like) and try to base it on this. It would probably narrow it down to a few codepages you should "include", but to be honest I am afraid you might as well create a manual list and check the major language name. It should not take toooo long.
|
|
|
|
|
I'm literally trying to clone data rows, nothing very complicated, infact, they aren't even going to be changed during this section of the project.
I've captured the rows I want to clone using a custom SQL query, but I'm not sure how to insert them back into the database with new ID's(primary key is autonumber)...
can't I just run a .update of some sort?
I've tried copying the data table from results of my query and merging into the complete table, that doesn't make any change.
I dont seem to be able to .insert anything other then independant values for each column.
I'm using VS 2005 and C#.
Thanks.
|
|
|
|
|
I want to add an attribute
[TypeChecker()]
public class MyClass {}
That will format all serializable properties to a date format of "yyyy/mm/dd"
Is that possible with an attribute?
I know it can be accomplished with AOP, but thats bulky and I would like to avoid that.
Thanks,
Nick
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
But you may have to write your own serializer to acheive it ( idk?) also you would most likely want your attribute on the property level.
One workaround is to mark your date property as not serializable and create a seperate string property that returns the string formated the way you want it.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: One workaround is to mark your date property as not serializable and create a seperate string property that returns the string formated the way you want it.
Well not actually. Since it will be evaluating at class level it should stay there. Plus, it puts a lot of responsibility on the developer to remember to include the attribute on each method.
Ennis Ray Lynch, Jr. wrote: But you may have to write your own serializer to acheive it ( idk?) also you would most likely want your attribute on the property level.
And actually since an attibute is added at runtime I can just have my attibute extend the ISerlializable and iterate through each property. Formatting the date fields as they are encountered.
Thanks for your efforts to help,
Nick
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
I was trying to implement .net remoting in my project as
object oriented programming. Means, I get success to create
server process as SAO/CAO but in my client application after geting server remoted object, I was trying to pass a object in method of server remoted object, whitch was created on client side .
But I could'nt succes.
If you need my project to solve my problem , then send me email on EMAIL ID : sanjaykhang@yahoo.co.in
|
|
|
|
|
more than likely its not serializable. But know one can answer with that little amount of information
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
I was trying to implement .net remoting in my project as
object oriented programming. Means, I get success to create
server process as SAO/CAO but in my client application after geting server remoted object, I was trying to pass in method of server remoted object, whitch was created on client side .
But I could'nt succes.
If you need my project to solve my problem , then send me email on EMAIL ID : sanjaykhang@yahoo.co.in
|
|
|
|
|
As short as i can explain... I have a RichTextBox that i want to use for syntax highlighting. For coloring i use:
richControl.Select(...);
richControl.SelectionColor= ...;
and it works . The text is highlighted using a list of keywords. Lets say that I have te following line in my textbox:
I like icecream
In this line "like" is a keyword and its color is red(for explanation sake) and all the other words are black. THE PROBLEM is that if I move the caret just after the word "like" and I start typing, the new inputed characters will also be red,and i wanted them to be black. How can i escape this problem?
|
|
|
|
|
That's the regular behaviour you get in every text editor under windows that allows for formatted text.
If you really want to do syntax highlighting in your RTB yourself (although there are several articles here on this topic), you should reconsider when to perform colorization.
If you do it whenever the text is changed or when a key is pressed, then you'll find out that like + the letter you typed isn't a keyword anymore, so the whole word should be black.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
I implimented the Windows Media Player control in my project, it is very easy to pen a file with it but how can i load the file without openning it, is there a property(Load)?
and how can i give it an array of files, with there path?
and how can i see what is the time of the song?
Thanks
|
|
|
|
|
Hi,
I am trying to convert c++ code into c# code, and I am having trouble with arrays in structs.
The c++ struct looks like the following:
typedef struct {
int nAs;
int As[8];
int nBs;
int Bs[12];
int nCs;
int Cs[30];
} AN_ENTRY;
After quite a bit search, I figured out the definition can be changed to this:
[StructLayout(LayoutKind.Sequential, Pack = 4)]
public struct AnEntry
{
public int nAs;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=8)]
public int[] As;
public int nBs;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=12)]
public int[] Bs;
public int nCs;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=30)]
public int[] Cs;
}
But how would I go around and initialize such a struct, I mean they are 53 integers that need to be passed in to initialize this? Can I do the following?
AnEntry anEntry = new AnEntry(1, 1, 1, 1, ....., 1, 1); // 53 1's
Do I have a define a constructor in the struct? If yes, the argument list of the constructor would be REALLY long. What if I need to create an array of AnEntry? Any suggestion or comment is highly appreciated. Thanks a lot.
|
|
|
|
|
Usually when your passing a new array of something into a constructor / parameter, you would do something like this:
AnEntry anEntry = new AnEntry(new int[53]{1,1,1,1,1,1,1,1...}) ;
make sense?
|
|
|
|
|
But do I need to create a constructor inside the struct? If yes, I will have to list all those 53 parameters? Thanks.
|
|
|
|
|
Where do you take data for the struct instances?
If data are taken from a database then you can create constructor with one parameter (record identifier) and load data within this constructor. Or you can add Load(int id) method to your struct. If data are random then you can add FillRandom() method. And so on.
|
|
|
|
|
in a textbox when user enter some input after that i want to check wether user enter only alphanumeric values or any special char like *&$@!":. if user does i will inform the user that input string is not valid
my question is how i will find out that user has entered special char.
reply soon
|
|
|
|
|
string input = textBox.Text;
if(!input.Contains("@"))
{
}
Does that help?
|
|
|
|