|
Well, there is, otherwise one of both would be redundant. Imagine you open a form, has focus. Now I click once on a tray-icon. Just tried it, and the form raises the Deactivate event, not the Leave event; the form still has the input-focus (for your app, and will continue there when it's activated again).
Bastard Programmer from Hell
|
|
|
|
|
No, it's not. It's entirely possible to have a form deactived, but the focus never really leaves the confines of the form. I know, it's rare, but it happens...
It's also possible to have the focus leave the form, but never deactivate the form by clicking on someone outside of it.
What you do with those events is up to you.
|
|
|
|
|
Hay Guys,
I'm working on one live project which is web based application. And We Are Using Business Logic Using Multiple Class & Fatch The Record In Front End From Back-End DB2. Now I Need To display Multiple Records.
In One Gridview, I Need To To Display One More Gridview Control By MasterGrid Reff. Through Identification By Unique Key. Using Business Logic(Classes)
Thank You For Consideration.
|
|
|
|
|
Did the answer in the thread below not help, or did I misinterpret your question?
Bastard Programmer from Hell
|
|
|
|
|
No It Was Help-Full But It Was Related Using By DataSourse, & I Need Answer Related With Using Business Logic (a multiple classes). & Database Was DB2.
|
|
|
|
|
Aight, good luck in finding one
Bastard Programmer from Hell
|
|
|
|
|
hi ,
You can use <item template> along with <table> and <gridview>
kindly search on google "item template with gridviews".
You will get you solution there.
You have to do this coding on .aspx->Source file.
<div class="modified">modified on Friday, June 3, 2011 4:19 PM</div>
|
|
|
|
|
Please edit your answer. You've borked the forums.
|
|
|
|
|
|
Hello
I am not much experienced but I can give you an overview
Protected Sub grdMaster_RowDataBound(ByVal sender As Object, _
ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) _
Handles grdMaster.RowDataBound
Dim objListItem As DataControlRowState
objListItem = e.Row.RowState
Dim intMAsterID1 As Integer
If e.Row.RowType = DataControlRowType.DataRow Then
Dim grd As GridView
If objListItem = 5 Then
grd = CType(e.Row.FindControl("grdChildGridEdit"), GridView)
MasterTableID = Convert.ToInt32(CType(e.Row.DataItem, _
DataRowView).Row.ItemArray(0).ToString())
intMAsterID1 = MasterTableID
ElseIf objListItem = DataControlRowState.Normal Or _
objListItem = DataControlRowState.Alternate Then
grd = CType(e.Row.FindControl("grdChildGridNormal"), GridView)
intMAsterID1 = Convert.ToInt32(CType(e.Row.DataItem, _
DataRowView).Row.ItemArray(0).ToString())
Dim lnkButtton As LinkButton
lnkButtton = CType(e.Row.FindControl("Edit"), LinkButton)
If lnkButtton IsNot Nothing Then
lnkButtton.CommandName = "Edit Master"
lnkButtton.CommandArgument = intMAsterID1.ToString
End If
ElseIf objListItem = DataControlRowState.Edit Then
grd = CType(e.Row.FindControl("grdChildGridEdit"), GridView)
MasterTableID = Convert.ToInt32(CType(e.Row.DataItem, _
DataRowView).Row.ItemArray(0).ToString())
intMAsterID1 = MasterTableID
End If
If grd IsNot Nothing Then
grd.DataSourceID = ""
grd.DataSource = ChildDataSource
ChildDataSource.SelectParameters(_
"MasterTableID").DefaultValue = intMAsterID1
ChildDataSource.Select()
grd.DataBind()
End If
End If
End Sub
visit here to solve your .net grid related problem http://www.dapfor.com/Help/NetGrid/Index.aspx[^]
|
|
|
|
|
|
There's a walkthrough[^] on MSDN
Bastard Programmer from Hell
|
|
|
|
|
Hi,
I am working on an MVC application which is written in c#.
I am not able to save the httpposted file to my local folder while running the test case.But the same I am able to run from my controller and its working fine.Pelase find the code below.
string savePath ="c:/test.xlsx";
HttpPostedFileBase uploadedFile = files[0] as HttpPostedFileBase;
uploadedFile.SaveAs(savePath); //not saving the file to the path
can anyone pls help me on this.
Thanks in advance.
|
|
|
|
|
I don't know what operating system you are running, but after Windows XP the root directory has become protected. Software normally can't write to it without acquiring permissions first. Try creating a directory C:\Test and then try saving to C:\Test\Text.xlsx.
Also, you can check the return value or catch exceptions SaveAs throws so you can find out more about the specific error. My guess now is that it would be 'access denied'.
|
|
|
|
|
Was wondering if anyone has bumped into any show-stoppers developing .NET apps using an Apple Mac?
I need to support and develop iPhone, Andriod and Windows Phone apps and I'm thinking this might best be achieved on an Apple with a Windows7 bootcamp. Sounds good, looks good but I couldn't find much on the net re: developer experiences.
Anyone been there, done that?
"You get that on the big jobs."
|
|
|
|
|
So long as your running Windows in a virtual machine, no problem.
|
|
|
|
|
There are tools that allow iPhone and Android development on a PC. Unless you are doing the majority of your development for Apple I wouldn't bother with the hassles of trying to develop with a Mac.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
This appears to be a communications issue between .NET and SQL, so I've chosen to put it in the .NET category first.
Problem: A VB.NET app executed from a SQL stored procedure is unable to open a NamedPipe connection on a workstation. When the same app runs under CMD.EXE, the connection is successful. Unfortunately, the app must be initiated from SQL.
Environment: Server is Win Svr 2003 Enterprise, with SQL Server 2005 and .NET 2.0.50727.3620.
Workstation is Win 7 Pro
On the workstation, a job creates a NamedPipeServer (listener), then separately reads from a multicast broadcast. On the server, a stored procedure periodically runs, kicking off a VB.NET app which connects to the NamedPipe. This connection triggers the workstation job to update the SQL database.
This works fine when the workstation job (a VB.NET app) runs in a user context. However, it needs to run as a service on the workstation so that it can be running continuously, not be dependent on a particular user, and automatically restart if the workstation were to reboot.
When I coded it as a service, the workstation code does not see the NamedPipe connection request (triggered by a VB.NET app executed from a SQL stored procedure). It WILL work, however, if I run the "trigger" app on the same server under CMD.EXE.
Things I've tried:
-- Validated all user ids throughout the process, making sure the stored procedure is running under the same id as the workstation job.
-- Affirmed that SQL can actually run the trigger job.
-- Affirmed that the server can see the NamedPipe on the workstation. The existing (non-service) method works fine, the server connects to the NamedPipe, the NamedPipe listener collects the multicast data and sends it to the SQL database.
Something is different about kicking off the executable from SQL vs. CMD; my first thoughts were security, but I've made sure the stored procedure is running under the same id as the workstation job.
Has anyone run into something like this before? I'm guessing it's a trivial setting somewhere, but for the life of me I can't find it. Whatever help you can give me is greatly appreciated.
|
|
|
|
|
Presumably you collected the exact error - what was it?
There is nothing special about CMD versus any other application excluding the fact that CMD itself is an application.
You can of course use CMD itself to run your net app from SQL Server.
TrustTheMath wrote: but I've made sure the stored procedure is running under the same id as the workstation job.
How exactly?
I haven't tried it, and it may require some fooling about but it should be possible to get SQL Server to pop a CMD shell (console window). There might be a flag that you need to set to get this to work. If you do that then you can type anything you want in there. Including running the net app yourself.
|
|
|
|
|
Thanks for replying. There is no error -- none on either side. I've populated the code for the service with log msgs, and it shows that the service is sitting there waiting for a connection, but none comes. If the same .NET job runs from a CMD window, it does make the connection. Part 2 of your reply -- SQL (using EXECUTE AS) can run under a specified domain account; that is the same account used by the workstation when starting the service. In addition, the xp_cmdshell_proxy_account (which allows one to execute CMD) is set to the same domain account.
I'll try your suggestion about having SQL kick off the .NET job using CMD and having CMD initiate the .NET app -- something else at least to try. I've been kicking off the .NET app directly (i.e., xp_cmdshell "myapp.exe /parm=...").
|
|
|
|
|
TrustTheMath wrote: I've populated the code for the service with log msgs, <layer>and it shows that the service is sitting there waiting for a connection, but none comes.
For how long?
If a firewall blocks a connection then the connection will time out. That can take several minutes (or longer if someone has been messing with OS configurations.)
|
|
|
|
|
hello
i would like to change the background of the added row in a datagrid.
is there any way to get the added row and change its background?
Thanks
|
|
|
|
|
First please tell us the environment. The answer will be different between Windows and Web
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Defender-NF wrote: is there any way to get the added row and change its background?
Yes.
Without some context of what you environment you are trying to run this from, we can't really offer anymore help.
|
|
|
|
|
Ah sorry.
I m working on visual studio 2010 ultimate, wpf/c#
my datagrid are bound to some generic lists/datasets via simple itemsource-bindings.
Thanks
|
|
|
|