|
hi,
the vlaues from datatable to datagrid are transferred , the problem is that when i transfer value second time, from datatable to datagrid, it overrides the first valuues of datagrid.
can u tell me how can i append values in a datagrid by using a datatable.
the code snap is like this
private void btnadd_Click(object sender, System.EventArgs e)
{
frmapp_academic_record obj = new frmapp_academic_record();
obj.ShowDialog();
if (obj.flag == true)
{
dgridacademic_record.DataSource = obj.dt.DefaultView;
}
}
|
|
|
|
|
Why not just pull the information out of the datagrid,. add it to the data in your table then update the datagrid with the new information.
Kev
|
|
|
|
|
In MSDN I find this clause, but I don't know what it means.
if ((e.Effect & DragDropEffects.Move) == DragDropEffects.Move)
What's the difference about the following:
if (e.Effect == DragDropEffects.Move)
Please help me !
hope for help
|
|
|
|
|
DragDropEffects is an enum with the Flags attribute set. This means a single variable can hold more than one value of this enum.
E.g. you can assign: DragDropEffects myVar = DragDropEffects.Move | DragDropEffects.Scroll
Now the comparison myVar == DragDropEffects.Move will return false. To test if some variable with a flags enum has one special value set (and assuming other values are not interesting) you will have to use the comparison shown in the MSDN.
|
|
|
|
|
The DragDropEffects enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
You have to compute the bitwise AND before comparing, cause otherwise this comparison if (e.Effect == DragDropEffects.Move) returns false as soon as DragDropEffects.Move is combined with another member of the DragDropEffects enumeration.
www.troschuetz.de
|
|
|
|
|
I have 2 applications, and I want them to get data from 1 udp port say 5855, how can I do it ?
|
|
|
|
|
Hi
First of All thanks to heat to give another kind answer of my previous post:
1)ok,i have a datagrid on a form and what i want to select a column and it opens a form and then i want to pass dataGrid value to another Form..i can fetch dataGrid value on Select but when i am trying to pass Opened Form it givs following error:
G:\ITracker Enterprise Server\mainPanel.cs(574): Cannot pass 'ITracker_Server.ViewAll.Preference_ID' as ref or out, because 'ITracker_Server.ViewAll.Preference_ID' is a marshal-by-reference class
i am calling other class whuch is under same NameSpace like this:
ViewAll va=new ITracker_Server.ViewAll();
MessageBox.Show(va.Preference_ID.ToString());
where Preference_ID is a protected variable
i got some clue on following site:
http://www.geekpedia.com/forums/topic.php?id=14&id_forum=1&start=0[^]
but i dont want to use TextBox for this..any other Tip?
i have another question but will post after solving this problem
|
|
|
|
|
ok i solved it by assigning other class members public and then call them in form where i wanted to use them
but i am still intrested to know about mentioned error.
|
|
|
|
|
How to disable the application close icon (on the right top corner) in C# ????
saleem
|
|
|
|
|
A few days ago there was an article titled "dissecting the messagebox".
Search the articles for it, it has an explanation on how to disable the "X" (needs interop).
mav
|
|
|
|
|
|
You can alternatively override onClose but this causes problems when windows try's to close down if your app is still open.
Kev
|
|
|
|
|
You can catch the Closing event of the form. Youll get CancelEventArgs in the handler and can set Cancel to true.
|
|
|
|
|
If you are using Visual Studio .NET :
1. Select the form, you want your close button to un-show
2. On the property list...select ControlBox
3. Set it False
However, doing this, would also disappear the minimise and maximise buttons.
I suggest you to override the OnClose Event, yet it gives some trouble!
GaMBiT---> aND ReVeNGe WiLL Be
|
|
|
|
|
In MFC, Draw a Round rectangle,can use CDC::RoundRect() method,In C#, I how to do it? Give me a sample?
|
|
|
|
|
You will have to use a GraphicsPath object.
Rectangle r;
int angle = 180;
int radius = 5;
GraphicsPath gp = new GraphicsPath();
gp.AddArc(r.X, r.Y - radius, radius, radius, angle, 90);
angle += 90;
gp.AddArc(r.Right - radius, r.Y - radius,radius, radius, angle, 90);
angle += 90;
gp.AddArc(r.Right - radius, r.Bottom - radius, radius, radius, angle, 90);
angle += 90;
gp.AddArc(r.X, r.Bottom - radius, radius, radius, angle, 90);
angle += 90;
gp.CloseAllFigures();
xacc-ide 0.0.12 now with C#, MSIL, C, XML, ASP.NET and HLSL coloring - Screenshots
|
|
|
|
|
hi,
I'm writing a program in C# that monitors and controls user's access to the computer , logs in keyboard keystrokes and takes a snapshot of the user's desktop. Now I'm trying to write the code to modify the registry to allow my program to load with the operating system and run the instance a spicific user logs into the system. I'm really in great need for help since I'm not sure what functions and classes to use to achieve this goal. I'm writing this program as a graduation project and the deadline is getting near so any help will be very greatly appreciated.
|
|
|
|
|
use the Microsoft.Win32 namespace, it has a Registry class which has some static methods for accesing the local registry and some other classes you can use to create your own registry keys.
Kev
|
|
|
|
|
Hi,
I am currently writing an application in pocket pc 2003. The application
need to get those emails related to the application(e.g. email from a specified contact) from the
default email client in pocketpc and store them in the application. But I face a design consideration
problem,
1. Are most users use the default email client in pocket pc when they
receive email wirelessly ? If not, my application need to connect to the other third-party email client
also, but how I program the application to connect to diverse set of pocket pc email clients available
on the market ? Are there a common standard for doing this ?
2. My application need to send email from the pocket pc, the current
method is to send the email message to the default email client in the pocket pc, and the user click the
send/receive button on the default client later. But this seem not quite user-friendly to the users.
Original, I intend to write code so that the application directly send email to the smtp server, but the
coding seem quite complex and need to handle many cases for the smtp server protocol handshaking. So are
there any better methods ?
Thanks
|
|
|
|
|
how do i create a collection of collections?
Heres what I mean:
SectionCollection
TemplateCollection
PageCollection
Contents
Where each ofthe collections has a subcollection (like the datatable->rows->column)
SectionCollection[x].TemplateCollection[x].PageCollection[x].Contents[x].whatevercontent
My sectioncollection is inheriting System.Collections.CollectionBase. The SectionCollection also parses data that it is passed into SelectionItem.
My question is how can i extend this to make it similar to the datatable->rows->column relationship?
-Steven Hicks
CPACodeProjectAddict
|
|
|
|
|
Hi all,
I had a basic problem, I think it is a very small one. I had a problem with the Date function. I am encountering an error
"The type or namespace name 'date' could not be found (are you missing a using directive or an assembly reference?)"
I am unable to locate, which namespace the "date" function belongs to.Can anyone guide me on this?
Regards,
Sowmya Mulukutla,
UAB
|
|
|
|
|
Do u mean the DateTime class?
|
|
|
|
|
yes and also what does DayOfWeek mean, do we have to set it to one of the 7 values?
Regards,
Sowmya Mulukutla,
UAB
|
|
|
|
|
|
Hi all,
I am currently evaluating SSL components from IPWorks to
implement https protocol for client-server communication.
But it is a bit expensive, do anyone have any experience on using it
or are there any other cheaper component for SSL communication ?
Thanks
|
|
|
|