Well I'm tring to use your code and I get errors on the following. I tried adding several references that I though would do the trick. THis is my code as follows:
using SoftPro.Select.Client.SelectServer;
using SoftPro.Select.Client.SelectServerObject;
using SoftPro.Select.Server;
using SoftPro.Select.Server.Common;
public class MyEditorControl
{
private void MyEditorControl_Load(object sender, System.EventArgs e)
{
//connect using the select server object
NetworkCredential creds = new NetworkCredential("admin", "Passw0rd", "[SERVER]");
SelectServer sps = new SelectServer(new Uri("
http://localhost:8080/SelectServer"), creds);
sps.EnsureAuthenticated();
//this code loads the table data – currently, it only supports a single column filter specification
//the table name matches what is seen in SPAdmin Lookups Manager
//the filter wildcards are typical SoftPro wildcards (see search screen help)
LookupQuerySpec spec = new LookupQuerySpec();
Lookups lookups = sps.GetService<Lookups>();
DataTable table = lookups.GetTable("Endorsement", spec);
//this code will add a new row – this sample uses a column index, but the column name works too
//IMPORTANT: column 0 is the row id and must be populated with a new guid when creating a new row
DataRow row = table.NewRow();
row(0) = Guid.NewGuid();
//NOTE: In order to update data, simply edit the row inplace
((LookupValue)row(1)).Value = "TEST3";
//NOTE: The field data type is SoftPro.OrderTracking.Common.LookupValue
((LookupValue)row(1)).IsFormula = true;
table.Rows.Add(row);
//this form will let your visualize the data
using (Form f = new Form()) {
DataGrid grid = new DataGrid();
grid.Dock = DockStyle.Fill;
grid.DataSource = table;
f.Controls.Add(grid);
f.ShowDialog();
}
//to save changes back to the server, do this:
lookups.ApplyChanges(table);
}
}
I get errors on 1-NetworkCredental not defined, 2-Softpro.Select.Server.SelectServer is not accessible in this contexts because it is 'Friend', 3- Type 'LookupQuerySpec' is not defined, 4- 'Lookups' is not defined, 5-'LookupValue' is not defined and 6-'Form' is not defined
can you tell me how and which references to reference these adding dll's/references?