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!
|
|
Filtering a mainview with LookupResults (7.5) - with free bonus question!
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...
|
|
|
|
Re: Filtering a mainview with LookupResults (7.5) - with free bonus question!
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());
|
|
|
|
Re: Filtering a mainview with LookupResults (7.5) - with free bonus question!
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?
|
|
|
| |
| |
| |
|