|
I have derived a custom control from the DataGridView to enable pasting operation from the Clipboard. I am able to do almost all the operation of pasting except the following
Scenario :
1. Added the custom DataGridView to form
2. AlloUserToAddRows = true and I have also set some other required property of custom DataGridView
3. when I turn AlloUserToAddRows = true , VS adds a one default row to grid
4. so I used the following steps to reproduce the bug
a. I run application and paste the data in each cell individually on the default added row it does not add any additional row to grid
b. I copied some rows from excel sheet and tried to paste in grid by selected first cell (as current cell)
c. Programmatically, I have to calculate the number of rows required to add in grid for pasting operation which I did , and using this.Rows.Add(n); to add n number of rows (I also tried with Insert())
d. While using Add() function everything works fine except that the first row is moved to end of the grid (only in the above mentioned scenario; for everything else it works fine)
e. While using Insert () method overloads, I am getting the exception (on same line in debug mode) InvalidOperationException with message as “no row can be inserted after the uncommitted new row.”
5. I tried many things to get work around for this bug, however I didn’t succeeded
Anybody knows the any approach where I can either get rid of this bug or exception?
suggestions are also welcome!!
Reg,
Deep
Happy Coding
modified on Monday, August 24, 2009 5:56 AM
|
|
|
|
|
Hi,
I need to convert string which has EBCDIC, packed decimal and Endian data to byteArray to save it in the database. I tried the following code.
Byte[] updateByte;
updateByte = System.Text.Encoding.Default.GetBytes(strData);
//here, strData is the string
Here what happens is it converts some characters to '?' with decimal value 63. For e.g. abc(ASCII vale) after converting to EBCDIC i get [129 130 131](these are decimal values of the converted EBCDIC data). When i convert the string to byte array in order to save it in database, it changes all three characters(129, 130 and 131) to 63. This mostly happens with small case alpbhbets.
I also tried other encoding(EBCDIC-US) but this also changes more characters.
IMP: Please note that the string that i need to convert to byte array contains EBCDIC, Packed decimal and Also Endian data.
Kindly let me know how i can achieve this.
Thanks,
Deepa
|
|
|
|
|
Hi,
that doesn't make much sense.
1. in .NET a sttring consists of Unicode characters, nothing else.
2. in a database, data is stored in fields, having some type, such as NVARCHAR.
3. "packed decimal" needs details
4. AFAIK "Endian data" does not exist; multi-byte data (such as int or float) can be stored in big-endian or little-endian mode, where one is "natural" on a given system and the other isn't.
I suggest you provide:
1. a better explanation of what it is you want
2. two examples with available input data, and the corresponding output data you hope to get (use either all decimal, or better yet all hexadecimal).
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
|
Depak - I suggest you read the guidelines for forum posting. This looked like an interesting question right up till the last 2 sentences.
DIPAK@EMSYS wrote: please help me out..if possible with some code example
This is a standing joke - plx snd codz, the cry of the incompetant.
DIPAK@EMSYS wrote: its very urgent please share ur valuable knowledge
This is plain rude - it is only urgent to you, not to the volunteers who help. I hope you have patience.
|
|
|
|
|
hey...i wrote for code snippet as giving suggession to this problem in descriptive manner may create confusion...i was looking for code just to get what exactly the solution provider want to say....and urgency is just to show how important and valuable is ur post...
dont mind it....if u have knowledge and want to share....the pls do....dont give such replys....
dipak
|
|
|
|
|
He was actually being NICE to you and you just went off being rude, AGAIN.
READ THE FORUM GUIDELINES.
No one cares how urgent it is for you. The more urgent it is, the less likely you will get ANY response.
No one is going to just hand code to you.
|
|
|
|
|
Please remember : "IT'S VERY URGENT" means in this forum : No Reply...
|
|
|
|
|
I am using C#.net 2005 and crystal Report XI while running report the dialoge box get promted and displyed this messege that "R6025 Pure Virtual Functiona Call Error". If I clicked on Ok Button of the Dialoge Box it shows me ::
Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.
Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.
And IF Countinued with refreshing the page Report Displayed Properly.
My Event Log Error Shoews as ::
asp_wp.exe closed Unexpectly ..
Any help Appretiated..I stuck same error from no of days but coun't found any exact cause behind this.
|
|
|
|
|
public interface IncDec<br />
{<br />
void Increment();<br />
void Decrement();<br />
}<br />
<br />
public class MyIncDec : IncDec<br />
{<br />
private int x;<br />
public MyIncDec(int x)<br />
{<br />
this.x = x;<br />
}<br />
public void Increment()<br />
{<br />
this.x++;<br />
}<br />
public void Decrement()<br />
{<br />
this.x--;<br />
}<br />
}
Part 1: Implement a class which can be used to measure how long each invocation of the Increment and Decrement method takes (in milliseconds) and prints out this information. The class should fit in more or less transparently with existing clients of the IncDec interface.
Part 2: Imagine you need to do something similar (timing of method calls) for many places in an application. What other ideas come to mind, e.g. could you propose other ideas for getting timing information more conveniently?
I got this question need to answer, it is simple, just something confused to me. hope anyone can help me.
btw, what "The class should fit in more or less transparently with existing clients of the IncDec interface.
" means?
|
|
|
|
|
|
dragon_yue wrote: I got this question need to answer, it is simple, just something confused to me. hope anyone can help me.
btw, what "The class should fit in more or less transparently with existing clients of the IncDec interface.
" means?
I suppose your teacher (this is homework, right?) means to give you a hint. If you create a new class that inherits MyIncDec and call the base classes methods, you can use this class instead of the orignal and have a place to put your performance timing code without disturbing MyIncDec's existing users.
Standards are great! Everybody should have one!
|
|
|
|
|
its not homework, I konw its simple.
thanks your answer. do you think the new class inherit from interface or that class. which one is better
|
|
|
|
|
Hi,
this is a stupid assignment. In order to make it a realistic problem, one would need to measure a method containing hundred or more instructions to start with, not a single increment.
The code required to transparently measure the duration of an increment will probably use a derived class, virtual methods, and a StopWatch. As such it will be much slower than the original increment itself, so the result is bound to be inaccurate (on top of being utterly irrelevant).
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I understand. it is stupid one. thanks
|
|
|
|
|
Hi Guys,
How can we set the web browser control for example if the user load a .doc file on it then it cannot be edited? I mean, the user is not able to change file that has been loaded in the web control (example format is '.doc','.xls' etc..).
I'm trying to counter this kinda things, but sad to say, I did not find some hint or solution on how to do that.
Thank you!
regards,
erson
|
|
|
|
|
So far as I know, you must set a password for "Change Document" in word during saving. Wrong password means not able to edit the document.
|
|
|
|
|
sir
plssssssss help me
I want to make a run time form with text box and label control for a user .
becaue I want user can take textbox from a control by drag and drop and then take a filed from database by combobox and bind them and save as a exe file and then run it .(all this work user will do on runtime form)
as like developer design a form for a user but i want i will give textboxe control,and lable control and also fields to user in this way user by self make a runtime form
r_ifti@hotmail.com
thx
|
|
|
|
|
This part of your question really I don't understand.
rashid2009 wrote: becaue I want user can take textbox from a control by drag and drop and then take a filed from database by combobox and bind them and save as a exe file and then run it .(all this work user will do on runtime form)
as like developer design a form for a user but i want i will give textboxe control,and lable control and also fields to user in this way user by self make a runtime form
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
sir
i want a blank runtime form for a user with textbox control and others control who can take a text field and take a database field from combo box and design a runtime form .(just like a mini vb.net)
for this requirement purpose user itself create a page and design .
thx
|
|
|
|
|
rashid2009 wrote: .(just like a mini vb.net)
Why are you posting in the C# forum then ?
This is a TON of work. You would need to basically write a framework that allows the user to create their own controls and databind them. I would say it's almost certainly beyond you.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i think this is beyond ur knowledge...
it requires lot of efforts to do this...and if u can give such solution than u will be next threat to MS...pls...dont post such hypothetical issues....
dipak
|
|
|
|
|
hello...
i am developing a C# window based application.i have a form(view Item) that contain a datagridview and a button.
datagridview shows the item information and at the button click a new form(Add Item) opened by which user can add the item information.
All i need to do is after filling the item information when we click the save button the datagridview must be updated.
How can i do this.
|
|
|
|
|
Bind daatagridview with select command after you insret new item.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
Its not Like that.........
datagridview is on a form named ViewItem and we want to update this datgridview through a button that is on another form name AddItem...
|
|
|
|