Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, August 17, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Filtering a mainview with LookupResults (7.5) - with free bonus question!
Byrnes
Posts: 43
 
Filtering a mainview with LookupResults (7.5) - with free bonus question!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Feb 09 4:49 PM
//This isn't exactly my scenario but the principals are identical so I'm changing entity names, etc so I don't have to explain a ton of stuff first....

From the Account mainview (details) I'm viewing the 'Contacts' tab. I want to add a column to that datagrid titled 'View Addresses'. When clicked I want a new mainview in list view to display all Addresses that belong to the Contact who's row was clicked. (Which would normally result in a 'lookupresults' tab active in the LAN client.)

What steps would I go through to do this?

I'm guessing I have to do it this way because (here's the bonus question aren't I limited to the number of dialogworkspace type popups? (I want the list view to give the user the ability to jump into the add/edit but I don't think I can do that if the resultset was a popup itself as that would be two popups...)

Hopefully this made a little bit of sense...
[Reply][Quote]
Mike LaSpina
Posts: 116
 
Re: Filtering a mainview with LookupResults (7.5) - with free bonus question!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Feb 09 5:00 PM
Tim,
I'd do the following:

1) Add 'Row selection Column' to the grid and set it up the way you want (text, image, etc...)
2) Add a c# snippet action to the OnRowSelection event of the grid to redirect
3) Use the SelectedValue property to get the contact ID your code should look something like this:
Response.Redirect("ContactAddresses.aspx?entityId=" + grdContacts.SelectedValue.ToString());


[Reply][Quote]
Byrnes
Posts: 43
 
Re: Filtering a mainview with LookupResults (7.5) - with free bonus question!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 Feb 09 2:47 PM
Hey Mike, thanks for the suggestions. It seems simply enough (and I've got it mostly knocked out) but I'm stuck on the entityId parameter.

grdContacts.SelectedValue.ToString() gives me a GUID, not a valid SLX ID.

I tried this in the C# snippet:
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow selectedRow = grdAssets.Rows[index];
TableCell cellValue = selectedRow.Cells[1];
Response.Redirect("AssetSampleLogs.aspx?entityId=" + cellValue.Text);

but I get this error:
'System.EventArgs' does not contain a definition for 'CommandArgument'
which just seems odd to me as that's in the sub definition as a parameter.

Any other thoughts?
[Reply][Quote]
Byrnes
Posts: 43
 
Re: Filtering a mainview with LookupResults (7.5) - with free bonus question!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 Feb 09 4:33 PM
I ended up working around this by making it a custom smartpart. Had to turn 'enableviewstate' to true and instead of using protected void grdAssets_RowSelectedAction to do the redirect I entered a new case in protected void grdAssets_RowCommand.

Works like a champ now.

Thanks Mike!
[Reply][Quote]
Mike LaSpina
Posts: 116
 
Re: Filtering a mainview with LookupResults (7.5) - with free bonus question!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Feb 09 2:38 PM
"grdContacts.SelectedValue.ToString() gives me a GUID, not a valid SLX ID."

Did you set the DataKeyNames for the grid? Set it to 'Id'.
[Reply][Quote]
Byrnes
Posts: 43
 
Re: Filtering a mainview with LookupResults (7.5) - with free bonus question!Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Feb 09 2:44 PM
I just checked that and yes, the DataKeyNames was set to 'Id'. Not sure what else I may have been missing, but it's working as a tweaked custom .ascx file now...
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 8/17/2025 3:17:15 PM