User Profile & Activity

Glenn Layaar Support
Page
of 99

Thank you for the new sample. Currently I am still in discussion with the developer regarding this issue and we are still analysing the sample for the cause of the issue.

Do you mind elaborating why the drag drop will not work on your project?

Currently, hierarchy table with client binding support is planned for the next major version of WebGrid. You could aslo bind hieararchical data using numerous data source, however in some data source you will need to define the object relation in outbound mode as discussed in this thread.


Our online documentation is currently offline, you need to open the provided WebGrid documentation with the WebUI Studio installation to lookup the article.

Posted: October 27, 2010 12:10 AM

I can not find a viable workaround to allow checkbox is clicked upon selecting a row / cell. However, attached is a sample which show how to postback the page when checkbox is clicked and during the postback show checkbox row info in a div element. 

In order to initiate the postback, invoke SendCustomRequest function in checkbox click clietn side event handler. The postback event is handled on the server side on the InitializePostback event handler.

You can iterate the collection using for loop. Here is a simple snippet to update a Component column for a specific row:

function Grid_BatchUpdating(gridObject, rowChanges) {
debugger;

for (var i in rowChanges) {
currRow = rowChanges[i];
if (currRow.NewObject.BugId == "2875")
currRow.NewObject.Component += "-rev";
}
}

You could analyse the structure in more detail using the debugger. As shown in the snippet above, you could modify the data using the NewObject property and column information.  

Posted: October 26, 2010 9:50 PM

Glad it could help solve your issue. However our developer also has an alternative snippet without using nested timeout. Here is the alternative snippet:

function WebTextEditor_OnInitialize(controlId) {
var WebTextEditor = ISGetObject(controlId);
WebTextEditor.SwitchToPreview();

setTimeout(function () {
var previewText = WebTextEditor.GetPreviewIFrameElement().contentWindow.document.body.innerHTML;

var el = WebTextEditor.GetDesignViewTabElement();
el.attributes["isactive"].value = "false";

WebTextEditor.SwitchToDesignView(true);
WebTextEditor.SetValue(previewText);

WebTextEditor.GetPreviewTabElement().style.display = "none";

var hiddenToolBar = ["cmdInsertLabel", "cmdPreview", "cmdSendMail", "cmdSeparator4", "cmdSeparator5"];

for (var i = 0; i < hiddenToolBar.length; i++) {
var toolbarElem = document.getElementById(WebTextEditor.ToolBar[1].Name + "_" + hiddenToolBar[i]);
toolbarElem.style.display = "none";
}
}, 500);
}


Posted: October 26, 2010 5:15 AM

Re-testing the workaround in the latest build of WebTextEditor, I encounter the same issue. Based on on my discussion with the developer, the snippet must be modified to work in the latest build of WebTextEditor, here is the modified snippet:

function WebTextEditor_OnInitialize(controlId) {
var WebTextEditor = ISGetObject(controlId);

setTimeout(function () {
WebTextEditor.SwitchToPreview();

setTimeout(function () {
var previewText = WebTextEditor.GetPreviewIFrameElement().contentWindow.document.body.innerHTML;

WebTextEditor.SwitchToDesignView(true);
WebTextEditor.SetValue(previewText);

WebTextEditor.GetPreviewTabElement().style.display = "none";

var hiddenToolBar = ["cmdInsertLabel", "cmdPreview", "cmdSendMail", "cmdSeparator4", "cmdSeparator5"];

for (var i = 0; i < hiddenToolBar.length; i++) {
var toolbarElem = document.getElementById(WebTextEditor.ToolBar[1].Name + "_" + hiddenToolBar[i]);
toolbarElem.style.display = "none";
}
}, 500);

},500);
}

You will need to set another delay before invoking the SwitchToPreview method.


Unfortunately Hierarchical has not been supported in WebGrid Client Binding. Regarding the drag / drop, you could use the WebDragDropExtender control to use drag drop feature in WebGrid as demonstrated in the attached sample. The attached sample does not use client binding, however it should be similar iin client binding scenario.

We have an article in the WebGrid documentation titled "Client Binding Consideration and Best Practices" which you can read to have some insight about client binding approach.


Have you tried the suggested solution in the thread you mention?

The workaround is invoking a refresh client side method after calling the PerformBatchUpdate. Here is the snippet:

protected void Button1_Click(object sender, EventArgs e)
{
WebGrid1.PerformBatchUpdate(true, false);
Page.ClientScript.RegisterStartupScript(this.GetType(), "RefreshGrid", "<script>RefreshGrid()</script>");
}

Refresh client side method:

function RefreshGrid() {
var grid = ISGetObject("WebGrid1");
grid.Refresh();
}


I am very sorry for the misunderstanding.

It seems the method definition is not available in the WebGrid docs, I inform our documentation team regarding this issue.

Based on my test with the event handler, the BatchUpdating event handler have 2 parameter the Grid object and the row changes collection object. Here is the snippet:

function Grid_BatchUpdating(gridObject, rowChanges) {

}


Posted: October 25, 2010 6:16 AM

One of our WebDesktop sample already demonstrate theming using ISL files. The sample could be lauched from page MyWebDesktop.aspx. In order to modify the style use the "Change Desktop Style" shortcut. You could analyse the sample to know more about ISL, the theme file is located on the Themes folder.

However, in the shipped provided sample the project is missing istheme.config file. I have attached the missing file in this post. Please copy this file to the WebDesktop sample project root folder.

All times are GMT -5. The time now is 1:55 PM.
Previous Next