Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, July 6, 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: Dynamically Populate an slxgridview from an external smartpart Problem
Marc Murphy
Posts: 23
 
Dynamically Populate an slxgridview from an external smartpart ProblemYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 May 09 8:30 PM
Hey there,

I have reviewed the online demo for 'Dynamically Populate an slxgridview from an external smartpart' and recreated the required code.

Basically it adds a textbox to the dashboard an allows you to dynamically search and create the corresponding result grid based on Account name

My problem is after i hit return or exit the text box a comma is appended to whatever I entered

I.e.

I place 'ab' and exit / hit enter and it becomes 'ab,'

at first I thought I had made a typo along the way and disabled the search functionality but to no avail, I then added a 2nd text box and the same issue occurs except this time leave one text box appends a comma into both.

If i modify some account to include the comma it returns the data as expected

Im very new to SLX web so im totally stumped, any idea's

Note: I disabled functionality in the cs file in case that was the issue and it was not (still disabled in the provided code snippet)
and added the 2nd text box (as in the provided code snippet)

The following is the QuickLookup.ascx file

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="QuickLookup.ascx.cs" Inherits="SmartParts_Dashboard_QuickLookup" %>
<%@ Register Assembly="Sage.SalesLogix.Web.Controls" Namespace="Sage.SalesLogix.Web.Controls" TagPrefix="SalesLogix" %>
<%@ Register Assembly="Sage.SalesLogix.Web.Controls" Namespace="Sage.SalesLogix.Web.Controls.Lookup" TagPrefix="SalesLogix" %>
<%@ Register Assembly="Sage.SalesLogix.HighLevelTypes" Namespace="Sage.SalesLogix.HighLevelTypes" TagPrefix="SalesLogix" %>
<%@ Register Assembly="Sage.Platform.WebPortal" Namespace="Sage.Platform.WebPortal.SmartParts" TagPrefix="SalesLogix" %>






Quick Account Lookup:



























<script type="text/C#">


</script>


The following is the QuickLookup.ascx.cs file

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Sage.Platform.WebPortal.SmartParts;
using Sage.Entity.Interfaces;
using Sage.Platform.Application;
using Sage.Platform.Application.UI;
using Sage.Platform.Application.UI.Web;
using Sage.Platform;
using Sage.Platform.WebPortal.Binding;
using Sage.Platform.Repository;
using System.Data;
using System.Configuration;
using System.Collections;

//using System.Web.Security;
//using System.Web.UI.WebControls.WebParts;
//using System.Web.UI.HtmlControls;





public partial class SmartParts_Dashboard_QuickLookup : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
//txtSearch.TextChanged += new EventHandler(txtSearch_OnChange);
}

protected void RefreshGrid(string val)
{

Sage.Platform.RepositoryHelper acct = Sage.Platform.EntityFactory.GetRepositoryHelper();

Sage.Platform.Repository.ICriteria criteria = acct.CreateCriteria();
criteria.SetProjection(acct.PF.ProjectionList()
.Add(acct.PF.Property("AccountName"))
.Add(acct.PF.Property("AccountManager"))
.Add(acct.PF.Property("Type"))
.Add(acct.PF.Property("Id")));

criteria.Add(acct.EF.Like ("AccountName", val,LikeMatchMode.BeginsWith ));
criteria.SetMaxResults(10);
System.Collections.IList tempList = criteria.List();

System.Collections.IList results = new List<object>();
String[] propertyPaths = { "Account", "AccountManager", "Type", "Id" };

foreach (object[] data in tempList)
{
Sage.Platform.ComponentModel.ComponentView componentView = new Sage.Platform.ComponentModel.ComponentView(propertyPaths, data);
results.Add(componentView);
}
System.Collections.IList result = results;

dgResults.DataSource = result;
dgResults.DataBind();

}

protected void txtSearch_OnChange(object sender, EventArgs e)
{
string val = txtSearch.Text;
//RefreshGrid(val);

}
}


[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): 7/6/2025 1:48:04 PM