|
|
Hi i am having two datagrid views in my form
User is entering data into the gridview 1
and i have provided a button ...
So how to copy the data from the first gridview to second on button click ...
Here i can implement a recursive method to do this ...want to know is there any other way to do this
Thank You
*** Why EXPERTS behave like a fool ***
|
|
|
|
|
Why would you need recursion when a gridview has only one level ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i mean to say a loop for assigning the grid view 1 cell data to grid view 2..
CG I have solved this ...i know i am starting another thread here sorry
One more question when user clicks on the column head cell contents get sorted how to restrict this ....
*** Why EXPERTS behave like a fool ***
modified on Monday, March 24, 2008 3:03 AM
|
|
|
|
|
Hey! the problem is solved, it needed a static class
|
|
|
|
|
Sorry My Dear Friend
Try this Take a Grid View on the form with two columns In the load event add 10 rows to it
Restrict user from adding and deleting rows
now run the application
Example : S.No Phone_Number
1 23232
2 45324
5 23422
Now click on the S.No which is the Column header you will find that there positions are changing and getting sorted up.. I want to restrict this thing
*** Why EXPERTS behave like a fool ***
|
|
|
|
|
Can we do like this in enums
enum myStringEnum {
enumItem1 = "value 1",
enumItem2 = "value 2",
etc
}
i.e.spaces in the string value, I know we can assign int value to enum
but I m not sure whether string values (with spaces) can be assigned to enums.
If no, then can we have some alternative?
Since I want the string values with spaces in enum
|
|
|
|
|
Nope you can't. You can use underscore.
You can put a Description attribute to the enum
public enum EnumTypes
{
[System.ComponentModel.Description("Nothing To See Here")]
Null = 0,
}
and use DescriptionAttribute to read the Description. But for datagridview, databinding etc, it will show the enum (not the description).
|
|
|
|
|
and if i want to use the value in description then how can i retrieve this,
I mean I have "value 1" i.e. string value (with spaces) in database and I want this value to the database value and retreive some records,
then m i able to get the string value?
|
|
|
|
|
Nope, you can't directly.
Work around is (not recommended, it's messy)
1. From database, read "value 1"
2. Make a function to map "value 1" to the enum value base on the Description value, using loop, etc.
3. Use the enum in your code, etc.
4. When saving to database, save the enum's Description.
|
|
|
|
|
Hey! Thanks a lot ,
the problem is solved by using static class....
got the answer in this link
http://www.codeproject.com/KB/cs/stringenum.aspx
|
|
|
|
|
All,
Is there a way in which I can run my application as a SYSTEM process instead of a user process?
Thanks
|
|
|
|
|
CNewbie wrote: in which I can run my application
Is it a Windows service?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
It is not a Windows Service in and of itself.
|
|
|
|
|
Not really. Why would you want to??
|
|
|
|
|
hey Folks,
I`m looking for a code that would set a Connection between a mobile and a PC (it's a simulation of bluetooth sensor that will detect any mobile device in the range, but i will simulate the sensor using my laptop bluetooth) and send then a file OR an SMS to the mobile phone..
Thanks in advance
(for any Questions, or more details.. kindly contact me.. )
|
|
|
|
|
Hi,
Any one suggest me how to solve the following issue. In my page i am loading dyanamic controls, in default the text box should be invisible. Later from client side i am makeig it visible if needed, but the problems is when i set the visible=false while loading dynamically, the control is not loaded in the webpage.
Please suggest me how to laod the textbox in invisible mode?
Thanks in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|
The problem is two fold
1 - you're asking in the wrong forum, although I worked out your asking an ASP.NET question
2 - hide it with css, the visible=false property causes ASP.NET to not render it at all
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
You can try this. You load the textbox with its visibility set to true. And then make it invisible at client side when the page is loaded. And in this way , the textbox will not be visible to the user unless it is made visible by your clientside code.
Do let me know if you need further help.
Cheers...
|
|
|
|
|
Help! I using some classes that came from a program that worked...it was an example from a book. My problem is when linking my program with these classes. It dos not reconize the windows form Panel which is used for drawing. My error message is Error 1 'WingSoft.DesignWing.PlotPanel' is inaccessible due to its protection level This puzzles me becouse it is squacking about is a form component. Here is a piece of code:
public void Transform(Matrix3 m, DesignWing form1, ChartStyle cs)
{
// Normalize the point:
float x1 = (X - cs.XMin) / (cs.XMax-cs.XMin) - 0.5f;
float y1 = (Y - cs.YMin) / (cs.YMax - cs.YMin) - 0.5f;
float z1 = (Z - cs.ZMin) / (cs.ZMax - cs.ZMin) - 0.5f;
// Perform transformation on the point using matrix m:
float[] result = m.VectorMultiply(new float[4] { x1, y1, z1, W });
X = result[0];
Y = result[1];
// Coordinate transformation from World to Device system:
float xShift = 1.05f;
float xScale = 1;
float yShift = 1.05f;
float yScale = 0.9f;
if (cs.Title == "No Title")
{
yShift = 0.95f;
yScale = 1;
}
if (cs.IsColorBar)
{
xShift = 0.95f;
xScale = 0.9f;
}
X = (xShift + xScale * X) * form1.PlotPanel.Width / 2;
Y = (yShift - yScale * Y) * form1.PlotPanel.Height / 2;
} ^it does not like this:'(
}
}
I renamed the form earlier ...would i be causing my own problems since vs 2005
said it could not rename all the files?
|
|
|
|
|
You have another namespace which has a Panel class in it. You therefore need to specify which panel class you're using. The easy way to do this, if your code never creates the other panel class is a using statement that renames it locally, as in
using WingSoft.DesignWing.Panel as DodgyPanel;
Or something like that.
However, the fact that your error message is about a class called PlotPanel, makes me think the error has to do with how you're using an external library, and not a name clash.
rctriplane wrote: form1.PlotPanel.Width
Why are you accessing the control outside of the form class ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello. I have a form application in C# and i wanna create an html file at run time. In Net Framework there is the HtmlTextWriter class that can do this job, but this class is for ADO applications, that is not my case. Any ideas what can i do in my case?
Thanks in advance.
|
|
|
|
|
I'm not getting why you think you can't use the class that was created for the purpose.
You can just use a basic textstream if you want, too. Or a string builder.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
do u want to develop a CMS type application where user can design his own page.
Sarvesh Upadhyay
Senior Software Engineer
Birlasoft India Ltd.
Microsoft Certified Professional Developer in Dotnet 2.0 Enterprise Application
|
|
|
|
|
If I have the URL of a file e.g. http://mysite.com/file.php?f=1 where I cannot see the extension of the file is it possible to determine the mime-type of the file without downloading it first?
|
|
|
|