Hi,
Hoping someone may be able to offer some advice. I have an asp.net page using c# code behind. This page pulls an individuals record from an sql database and displays the info on the page using the asp:formview control. This control is bound to an asp:sqldatasource control. Also on this page...
Thanks George,
So am I right in thinking that the following should be the overall plan:
Run the previous query you gave me into a new table: DupeIdentify
Write a new query which does the following:
Selects the data from DupeIdentify, loops through the results and for each row returned:
uses...
Hi
Sorry I'm back on this again. I have been looking into where to go from here and have a few ideas. Just wanted to run them by you for feedback?
So from the previous result could I:
Copy the previous resultset in a temp table then:
loop through the results using CURSOR and
if for example...
No worries, I am impressed so far. I have been staring at these tables trying to figure out the best method of doing this for ages. My next step was to go manual he he. Now my challenge is understanding what each piece is doing lol :)
Looks fine to me. Has returned all duplicates and put the...
Hi again,
I ran this but got the error:
Column 'Contract.PersonId' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
I added a group by clause so it looked like:
;With RecentActivity As
(Select Contract.PersonId...
Thanks for the quick response. I have been trying this out but I dont think I am getting the desired result. My original post with the table details in was a basic mock up to explain the structure. However it was a little too basic. The actual structure is as follows (I have created a replica...
Ok finally sorted. in aid of finishing the thread and for future reference:
I had been writing my code in the wrong place and needed to define a new event for the menu. The completed code is as follows:
private void contextMenuStrip1_Opened(object sender, EventArgs e)
{
string ssql = ""...
Hi,
SO I now know how to get the menu item disabled but am stuck linking it to a query or similar to determine whether there is a date present in the record.
I so far have this:
private void InitializeComponent()
{
if ()
this.ToolStripMenuItem.Enabled = false;
else...
Thanks for that. Sorry to push my luck but any hints on the If statement and how to set the query up?
Thanks again for all your help today. Really appreciated.
ok, forget my previous post as I have now sorted it. I know where I need to put the disable in to get the desired result. The menu looks like this:
<right click the persons details>
Registration >
Demographics
Events
etc
If you hover or click the Registration text it takes you to:
Register
I...
Thanks, I have had a look and sure enough the item i need to disable is called "RegisterToolStripMenuItem" as above. I have just as a test changed the code from:
private void RegisterToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Opacity = .1...
Thanks for that, I see what you mean however would that not disable the entire right click functionality? I currently have this:
private void RegisterToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Opacity = .1;
frmActivity newContact = new...
Just to add to that, there is already a query to pull up all the client details for this form based on the Persons ID which is passed from a previous search. Whether this same query can be used or whether it would be easier to creat a smaller more specific one I dont know.
Hi, Thanks for the speedy reply. IT is a custom right click menu that has a few options. some of which are relavent still but the one I want to gray out/disable for instance is Register. I want to disable this option if there is a registration date present in the table. Does that make sense...
Hi guys,
Hope someone can help me with this. I can only assume its a relativly simple one to solve. I have a visual c# system which I have taken over (with very little c# experience). I am trying to disable a (right click) menu item when there is a date present in the SQL database record.
I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.