|
I've used this in the past
DataView dv = new DataView(myDataTable)<br />
dv.AllowNew = false<br />
dataGrid1.DataSource = dv
|
|
|
|
|
I tried the code you just gave me, instantiating the DataView then setting AllowNew to false. But it doesn't seem to change a thing.
Mark
|
|
|
|
|
Hi Guys,
In one project I have to write code to send email using MAPI. .Net does not support MAPI, and i dont have much information how to use MAPI in C#.
If anybody have worked on MAPI in .net,then please provide some informaion and sample code.
Please give some Links on MAPI programming.
Regards
AShu
ashu
|
|
|
|
|
hi,
Why don't you use .Net Framework managed component for send mails. You can't use that ?
Sreejith Nair
|
|
|
|
|
Hi ,
I have already done this using SMTP (.net framework component). But our client machine does not support SMTP.They want this to be done using MAPI.
ashu
|
|
|
|
|
I have an application (C#/ADO.NET) that collects alarms from equipment at around 100 sites, through concurrent TCP/IP listeners. Per day I receive about 1 million messages (~10/sec). I used to insert the directly into the destination table, but that would lock up the table so user access (read/reporting) was hardly possible. Now I insert the data in a intermediate table and upload it every 5 min. to the final table with SQl agent.
First of all, this doesn't look like an elegant solution. Furthermore, performance is still quite bad. Even though I have just this one DB/table, SQL-server uses up all available memory (1.5Gb out of 2Gb) and all available CPU, 24x7; I'm just wainting for a melt-down...
Anybody have any experience with this amount of transactions, and/or any suggestions?
Thanks.
|
|
|
|
|
CPU should not be high on the SQL box for data inserts. Check that your inserts are as efficient as possible:
* avoid INSERT ... WHERE ... statements
* avoid clustered index (good for selecting, often bad for inserting)
* minimize the number of indexes on the tables you insert to
Regarding memory usage, SQL tends to do that (grab as much memory as it can), it does not necessarily mean anything. However, it is worthwhile checking that you have appropriate indexes for the user-reporting and other reads are optimized.
my blog
|
|
|
|
|
Hi
I am looking for a convertor. It must be able to convert a numeric range to a regular expression string.
I searched the internet but I could not find a one. I do not have time to write from scratch.
Do you know such a code?
Thanks
|
|
|
|
|
hi,
You mean you want the minimum to the selected numer into a string or ?. Will you explain little more ?
Sreejith Nair
|
|
|
|
|
Hi
I want to enter a minimum value and a maximum value as the input.
Ex:3-55
Then I want an output as regular expresion like ([3-9]|[1-4][0-9]|5[0-5])
Thanks
|
|
|
|
|
When using the richtextbox control there is an intense amount of flickering. It is especially noticeable after an image is pasted into it.
I have tried using the ControlStyles to take advantage of double buffering, but I am not able to successfully paint the text and images properly.
Any help would be greatly appreciated.
Thank you in advacne.
JB
|
|
|
|
|
hi,
If you are calling the Invalidate() function of base form then it will invalidate the entire region of the form. Better try to Invalidate the your RichTextBox
<blink>S r e e j i t h N a i r
|
|
|
|
|
The problem is not about calling Invalidate() on the base form or for that matter on the Richtextbox itself.
To see what I am talking about, create a WinForm application and add a RichTextBox to the form. Compile the application and run it.
Start typing into the richtextbox. Then paste an image into it. Then continue typing on the line below or above the pasted image. The flicker is unbearable.
If someone can give me some direction on overriding the OnPaint(PaintEventArgs pe) event to be able to successfully paint complex data, it would be helpful and very much appreciated.
Thank you.
|
|
|
|
|
hello guys
i have made a collection class which contains some properties like bitmaps and rects.
the problem is , when i create an object of this class i want a collection property like an imagelist's Collection in property editor. any one having idea how can i achieve it.
thanx
|
|
|
|
|
hi,
If you are looking for collection iteration or accessing then what you need to do is, Impliment IEnumerable,IEnumerator interfaces in your collection class. If you want more help and explanation . Then please refer my article on IEnumerable and IEnumerator. thanks
<blink>S r e e j i t h N a i r
|
|
|
|
|
i had alredy implement IEnumeable interface but the problem is, i can't made it's property just like an ImageList control's collection property.
thanx
|
|
|
|
|
i would like to know how i can make the string some more small strings
like string x = "i like it" then string y = "i" & string z = "like"
& string m = "it" i tried the subroutin "subString()" but i gives an error "unknown method"
|
|
|
|
|
hi,
string is immutable in nature so you don't want to worry about the new string instance. Substring() method of a string class is used to extract a part of string from the given string.
<blink>S r e e j i t h N a i r
|
|
|
|
|
hi
when i use it SubString() it gives error "unknown property or method"
|
|
|
|
|
Moustafa_C# wrote:
string x = "i like it"
try the following
string[] xyz = x.Split(' ');
xyz will then be an array of 3 strings.
Kev
|
|
|
|
|
hi
so what is that x.Split(' ')
dimentions or what
|
|
|
|
|
hi,
Split methos will split the entire string into different parts. Here a space is mentioned. So it will split the whole string where ever it found a space.
Eg: string a ="i am @ fine i@f you@ care me";
string[] col=a.Split('@');
so the result values will be.
col[0] is -> i am
col[1] is -> fine i
col[2] is -> f you
col[4] is -> care me
Did u understood ?
Sreejith Nair
|
|
|
|
|
I dont understand what your asking but i'll try to explain a bit more.
x is you string which currently equals "I Like It"
x.Split(); returns an array of strings and it requires a char parameter.
The char is the "Seperator" that you want to use to split your string with.
In the example you used in your original post that character would be a space ' '.So..
string[] myString = x.Split(' ');
makes myString into a 3 string array.
myString[0] will equal "I"
myString[1] will equal "Like"
myString[2] will equal "IT"
Hope that is what you were asking but your question didn't make sense.
If you need any mroe help then just ask.
Cheers
Kev
|
|
|
|
|
|
Colin Angus Mackay wrote:
You mean "Separator"
;P;P;P;P
Kev
|
|
|
|