User Profile & Activity

Glenn Layaar Support
Page
of 99
Posted: September 20, 2010 11:48 PM

We are very sorry for the issue, I have re-open the bug report from earlier issue. The fix should be available on next hotfix release.

Posted: September 20, 2010 11:16 PM

the licenses.islicx file should be located in the silverlight application root. For example, if you create a ClientUI project named ClientUIApp1. By default there will be 2 project, ClientUIApp1 and ClientUIApp1.Web. The license.islicx file should be located in the ClientUIApp1.

If you will not compile the ClientUIApp1 project anymore in the final location, the runtime generation could be done on the development computer. If the final compilation will be done on the final location the license generation should be done on the final location.   

In my test, the Select function will return error if the row is not in the displayed view. My workaround is to use the GetRowByKeyValue function to check if the newly added row is in the displayed view. If the row is not displayed this function will return null.

Based on your description, I think the scroll into focus script that cause the postback to get more data. Do you mind sharing the code snippet so we could do further testing?

Based on my discussion with the developer, seperate cell /row edit mode and display mode feature has not been supported in GridPresenter. The feature is being considered for GridPresenter, however I do not have a fixed timetable for the release of the feature.

Posted: September 19, 2010 11:17 PM

Based on my test, you will need to set the datakeyfield of the grid during the PrepareDataBinding event handler, here is the snippet:

protected void WebGrid1_PrepareDataBinding(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e)
{
WebGrid1.RootTable.DataKeyField = "id";
WebGrid1.RetrieveStructure();
WebGrid1.RootTable.DataKeyField = "id";
}

You will also need to re-set the command during batch update event handler and invoke the RefreshAll client side method, here is the snippet:

protected void WebGrid1_BatchUpdate(object sender, ISNet.WebUI.WebGrid.BatchUpdateEventArgs e)
{
DataSet dt = (DataSet)WebGrid1.GetCachedDataSource();
DataSet changeDT = (DataSet)dt.GetChanges();

da = new SqlDataAdapter("SELECT * FROM logintbl;", conn);
SqlCommandBuilder builder = new SqlCommandBuilder(da);

da.InsertCommand = builder.GetInsertCommand();
da.UpdateCommand = builder.GetUpdateCommand();
da.DeleteCommand = builder.GetDeleteCommand();

da.Update(changeDT);
WebGrid1.ClientAction.RefreshAll();
}



Posted: September 19, 2010 10:39 PM

Based on my test, using query string select parameter I could successfully filtered the data in the Grid. Attached is the page I used to test the scenario.

The GenericObject class is already available on the WebGrid provided sample under the folder App_Code/GenericObject. Plese add a new function GetCustomersFiltered, here is the snippet:

// using Generic Collection
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
public List<Customer> GetCustomersFiltered(string ContactTitle)
{
List<Customer> customers = new List<Customer>();

try
{
this.Connection.Open();

string cmdText = "SELECT " +
"CustomerID, CompanyName, ContactName, ContactTitle, Address, City, Region, " +
"PostalCode, Country, Phone, Fax FROM Customers";

if (!string.IsNullOrEmpty(ContactTitle))
cmdText += " WHERE ContactTitle = '" + ContactTitle + "'";

OleDbCommand command = new OleDbCommand(cmdText, this.Connection);

OleDbDataReader reader = command.ExecuteReader();

while (reader.Read())
{
Customer customer = new Customer();
customer.CustomerID = reader.GetString(0);
customer.CompanyName = reader.GetString(1);
customer.ContactName = reader.GetString(2);
customer.ContactTitle = reader.GetString(3);
customer.Address = reader.GetString(4);
customer.City = reader.GetString(5);
customer.Region = reader.IsDBNull(6) ? "" : reader.GetString(6);
customer.PostalCode = reader.IsDBNull(7) ? "" : reader.GetString(7);
customer.Country = reader.IsDBNull(8) ? "" : reader.GetString(8);
customer.Phone = reader.IsDBNull(9) ? "" : reader.GetString(9);
customer.Fax = reader.IsDBNull(10) ? "" : reader.GetString(10);

customers.Add(customer);
}

return customers;
}
finally
{
this.Connection.Close();
}
}

Without query string the page will list all customer, if we wish to show all the Owner, the query string will be ?ContactTitle=Owner

Posted: September 8, 2010 12:44 AM
In order to enable or disable ColumnFreezing feature, the PreRender event handler will be too late, so I suggest using the PageLoad event which will be invoked earlier.

Based on your description, such scenario will required 2 database request. The first one in the page load will return if the query return any row, using SELECT COUNT, which will only return a scalar value. The second one in the InitializeDataSource will be run if the first query determine there is a data.

Another suggestion is to run the query in the page load and hold the result in a class property. During the initialize data source event handler, instead of requerying the database you will only need to refer to the class property. 
 

After further testing using the sample code in this thread. You could disable the ColumnFreeezing during page load event. Here is the snippet, only disable the ColumnFreezing if the SelectedValue is C:

protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostBack)
{
ddlChoiceA.Items.Add(new System.Web.UI.WebControls.ListItem("A: all columns", "A"));
ddlChoiceA.Items.Add(new System.Web.UI.WebControls.ListItem("B: some hidden columns (16-19, 21-22)", "B"));
ddlChoiceA.Items.Add(new System.Web.UI.WebControls.ListItem("C: no data", "C"));
}

if (ddlChoiceA.SelectedValue == "C")
grdResult.LayoutSettings.AllowColumnFreezing = ColumnFreezing.No;
}


Posted: September 6, 2010 10:14 PM

In 2010 R1 WebInput does not recieve a major version update, so your WebInput license will still be valid for the WebInput 2010 R1 build. You will need to retrieve this new build from the 2010 R1 installation folder since the update server has not been updated with the latest build.

If you would like to wait, the build will be available in the Update Manager in later time.

Based on my discussion with the developer, the FreezePane must be enabled or disabled in client side event handler. I am still in the process of simulating the scenario in my environment. I will inform you of any discovery I made.

All times are GMT -5. The time now is 5:50 AM.
Previous Next