|
Hello,
I have a datagrid: dataGridRevenues.
and tablestyles : styleLotYields.
How can I access particular cells in my datagrid, and how can I raise an
event on leaving a particular cell.
Thank you
|
|
|
|
|
int currentGridRow = 0;
int currentGridColumn = 0;
this.dataGridRevenues.CurrentCellChanged += new EventHandler(this.OnGridCurrentCellChanged);
styleLotYields[0].TextBox.Leave = new EventHandler(this.CellLeave);
private void CellLeave(object sender, EventArgs e)
{
if ( this.currentGridRow == 9 && this.currentGridColumn == 2 )
{
//Do some stuff
}
}
private void OnGridCurrentCellChanged(object sender, EventArgs e)
{
DataGridCell dataGridCell = this.dataGridRevenues.CurrentCell;
this.currentGridRow = dataGridCell.RowNumber;
this.currentGridColumn = dataGridCell.ColumnNumber;
}
Live Life King Size
Alomgir Miah
|
|
|
|
|
Adding to this i have a new question. How would i find the cell if it is a master detail datagrid and i want to fing cell in the inner grid?
Srinivas
|
|
|
|
|
Hi, I have a distributed application conecting presentation and busines rules tierswith remoting in tpc channel.
I want to send messages to the client (presentation tier) from server (business rules tier) but not with exceptions.
I want to show these mesaages into popup ballon un the presentation aplication. In most of the cases these mesaages will be abou sqlinfomessages of the connections.
I think i need to use Message queue MSMQ but I dont Know how.
What I need to do to acommplish this or watha othre way can I do and how. Please help me!
Thank you!
La realidad no es más que impulsos eléctricos del cerebro - Morpheus
|
|
|
|
|
I'm not sure if this is the best forum for this, but I'll give it a shot. We have a large Win32 app (not MFC) - with many windows. We have developed many re-usable business-specific panels that we load into these windows at runtime based on a users configuration.
Now that we are moving to .Net and C#, it would be a big advantage to be able to create re-usable panels in C# and add them to our Win32-based framework. We have successfully done this before with ActiveX components - like the browser control for example. Basically we manage the activex control window's geometry in place within our Win32 window.
Would we be able to do something similar with a C# user control? Any ideas on how to proceed here?
|
|
|
|
|
You can use Interop to achieve this. tlbexp utility is the answer.
Please visit msdn.microsoft.com for the details. I have done this
successfully in my project.
Alomgir Miah
Live Life King Size
|
|
|
|
|
Hello there!
I am trying to import data from excel spreadsheets to store it in datasets using OleDB, but something really weird is happenning for some cells.
What´s happening is that some cells (with non-null values)simply returns null.
Does anyone have any clue? Has someone experienced the same behaviour?
I would be thankful if someone could hel me with this issue.
Hugs,
Fernando Miranda
M.Sc., Software Developer
dollar_br@yahoo.com
Rio de Janeiro - Brasil
|
|
|
|
|
|
can find article how to do it..can you help me
|
|
|
|
|
See if this helps
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrwlkUsingXMLSchemaToPushTextToWordDocument.asp
Live Life King Size
Alomgir Miah
|
|
|
|
|
You can try brute force...you can use the ExcelSheet.Range method/property to access the cell value.
|
|
|
|
|
I have a combobox that displays a list of dynamically loaded "plugin" objects, using the code below:
Assembly ControlLib = Assembly.LoadFrom( Location );<br />
<br />
object objPlugin = ControlLib.CreateInstance( ControlName );<br />
<br />
cboList.Items.Add( (IFTPlugin)objPlugin );
I have set the combobox "DisplayName" property to "Caption" (a member of the IFTPlugin interface), but it always calls ToString on the object instead and shows the assembly name instead of the friendly name.
I know that the object is loaded correctly, and that the "Caption" method is working, because I can call the following code and get the expected result:
string strCaption = ((IFTPlugin)objPlugin).Caption;
Rather than override the objects ToString function, is there a way to get the combobox to correctly call IFTPlugin.Caption ?
Thanks for your help.
The StartPage Randomizer
|
|
|
|
|
Make sure to override "ToString()" method of the object you're adding to the dropdown. The dropdown will display the value returned by ToString and thus you dont need to set the databinding.
So ...
<br />
public class User<br />
{<br />
string _fname;<br />
string _lname;<br />
public User(string FName, string LName)<br />
{<br />
_fname = FName;<br />
_lname = LName;<br />
}<br />
public override string ToString()<br />
{<br />
return string.Format("{0}, {1}", _lname, _fname);<br />
}<br />
}<br />
<br />
private void form2_Load(object s, System.EventArgs e)<br />
{<br />
User[] arUsers = new User[2];<br />
arUsers[0] = new User("John","Smith");<br />
arUsers[1] = new User("Jane","Smith");<br />
this.comboBox1.Items.AddRange(arUsers);;<br />
}<br />
hope this helps.
- Malhar
|
|
|
|
|
There is one more twist to it.
Thoughts:
Make sure Caption is a property and has Get and Set implemented.
Alomgir Miah
Live Life King Size
|
|
|
|
|
|
|
Hello, I have an interesting situation here.
I have a C# application called Aquisition.exe that uses a COM dll called reports.dll
The curioisty is that there are two versions of reports.dll - version 83 and version 103 and version 103 is registered on the machine.
Acqusition.exe 's manifest file refers however to version 83 - interop.reports.dll version 83. The interop.reports.dll refers to version 103 and it resides in the folder containing Acquisition.exe
There are no errors and it looks like version 103 is being used by Acquistion.exe even though its manifest refers to version 83.
Is this OK? Should there be a bug in the .NET CLR engine? Can I leave things be? Thanks for your thoughts.
RK
|
|
|
|
|
Hi!
I need a file explorer to be able to implement it in my application, but they all those that I have found do not take the sight in Mosaic that one sees in Windows XP. There exists free someone that is capable of showing this sight? If not, is it possible to do someone? Better that I have found it is the Pi-Sys Labs's .NET Folder View (http://www.pisyslabs.com/DiskObserver.aspx) but it isn't free.
I think that it uses the explorer that show the OpenFileDialog, and show it as a control. How can be done that?
Thanks and sorry for my bad English
|
|
|
|
|
Hello,
Is there a way of placing a groove line on the Form? I tried to look
something up in Customization of a ToolBox, but to no avail.
Thank you.
|
|
|
|
|
hey Zaboboa,
To draw a line in c#, you need to use a label.
//
// label1
//
this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label1.Location = new System.Drawing.Point(44, 68);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(100, 2);
this.label1.TabIndex = 0;
this.label1.Text = "label1";
Or if you really want, you can make a user control that will draw the line(s).
K.
|
|
|
|
|
Thank you, it really helped.
|
|
|
|
|
Does anybody know of a way to add a form to a container?
For example adding a form as a control of another form, but not using IsMdiContainer?
|
|
|
|
|
Set the TopLevel property of your "child" form to false. Then you can add it to any Controls container you want.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks, just what I needed!
|
|
|
|
|
If I run my remoting client, and during run time I temporarily lose my connection to the network, how can I continue on using remoting?
For example,
ServerObj theServerObject = RemotingServices.Connect("tcp://.../obj.rem");
theServerObject.DoSomething();
LanConnection.Zap();
LanConnection.ReEstablish();
theServerObject.DoSomething();
I've been banging my head against a wall over the last 2 days trying to figure this one out. Anyone have insight into why this is happening, or how to 'reconnect' to my server object? Even the least bit of info would be greatly appreciated.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Homosexuality in Christianity
Judah Himango
|
|
|
|