User Profile & Activity

Hans Kristian Member
Page
of 69
Posted: July 23, 2012 11:34 PM

Hello,

Thank you for your code.

I’ve made a simple sample using your code. However, I don’t get any prompt when I try to apply changes.
I bind WebGrid with access data source control (Northwind.mdb database & Shippers table).

Please have a review on my sample & video, then let me hear your response.

Regards,
Hans.

Hello,

Thank you for your reply.

I can replicate your issue on my end, after I followed your instruction.
I apologize for the inconvenience.

Basically, the function of this property (TreatMarkupAsLiteralText) is to gets or sets whether markups such as HTML or XML should be treated as literal text.
For example, a literal < normally indicates the start of a tag, and & normally indicates the start of a character entity reference or numeric character reference; writing it as &amp; or &#x26; or &#38; allows & to be included in the content of an element or in the value of an attribute.

Therefore, if you want to use ‘&’ character, you should changes into ‘&amp;’.
For example, if you to find ‘Compa&ny’ value, you should type ‘Compa&amp;ny’ in your filter column.

Hope this helps. Thank you.

Regards,
Hans.

Hi,

I’m glad to hear that you’ve found a workaround for this issue.

Yes, there is a way to change the Batch Update through client side event (javascript).
For example, perhaps you could use OnUndoallChanges() or OnAcceptAllChanges().
You could see more information about our WebGrid’s client side event in our documentation.

Should you have further question, please do not hesitate to contact us.
I would be happy to help you again.

Regards,
Hans.
Posted: July 11, 2012 10:26 PM
Hi,

Thank you for your reply and I’m sorry for the late response.

The setInterval() method calls a function or evaluates an expression at specified intervals (in milliseconds).
The setInterval() method will continue calling the function until clearInterval() is called, or the window is closed.
Or you could find more information about this method from another website.

If I remove the setInterval() method (from my sample), it can only apply changes in one row.
You could try to remove the setInterval() method (from my sample) and see the effect.

I apologize for the inconvenience.
I try to remove the setInterval() method. But unfortunately, I can’t replicate your issue on my end.

Could you tell me the step by step how to reproduce this issue?
Or if you don’t mind, could you provide me simple sample that replicate this issue?

Thank you.

Regards,
Hans.

Posted: July 9, 2012 11:25 PM
Hi,

Thank you for the question.
Yes there is a sample, use FishEye in WebDesktopManager, you could see in WebDesktopSamples.
Please have a review on “AquaUITheme(FeaturingWebAqua).aspx” or “WebAqua_CoverFlow.aspx”, in WebDesktopManager folder.
And let me hear me your response.

Thank you.

Regards,
Hans.

Posted: July 9, 2012 10:37 PM

Hi,

Thank you for the question.

You could find our online documentation in our support site.

Go to one of our control (ex: WebGrid).
Through that page, you could see WebGrid online documentation, by clicking “Browse Online Documentation”. (OnlineDocumentation.png)
Or you also could download the documentation, by clicking “Download Documentation”. (DownloadDocumentation.png)

Then you could find the list of properties & method in “Server-side References” and “Client-side References” section. (WebGridDocumentation.png)

However, you could see our documentation through Microsoft Help Viewer. (HelpViewer.png)

Hope this helps. Thank you.

Regards,
Hans.

Hi,

I’m glad to hear that you have solved your issue.
Should you have further question, please do not hesitate to contact us.
I would be happy to help you again.

Thank you.

Regards,
Hans.

Hi,

Thank you for your reply.
I’m glad to hear that you’ve found a workaround for this issue although it’s still partially done.

Could you kindly explain in details what you’ve done in your code and what the result is with using your workaround?
Or if you don’t mind, could you provide me the sample that replicate your issue? So that, I can investigate this issue further more on my end.

Thank you.

Regards,
Hans

Hello,

Thank you for the question and I apologize for the inconvenience.

I’ve made a simple sample that maybe similar with your current scenario. I bind the WebGrid to Northwind.mdb database and Shippers table.
In my sample, you could update CompanyName column’s value, based on WebCombo’s value.

I use SetText() method to update the selected row's cells (CompanyName) value.
And I use Update() method to update the selected row object.
I also set PersistRowChecker property of WebGrid to “True”. This makes the row checker is not being cleared during postback.

Here’s the example java script code how to update selected row in WebGrid:

var i = 0;var intervalObj;
function WebButton1_OnClientClick(controlId, parameter) {
    var WebButton1 = ISGetObject(controlId);
    var WebCombo1 = ISGetObject("WebCombo1");
    var WebGrid1 = ISGetObject("WebGrid1");
    var comboValue = WebCombo1.Value; // Get WebCombo Value
    var checkedRows = WebGrid1.RootTable.GetCheckedRows();
    if (checkedRows.length > 0) {
        intervalObj = setInterval(function () {
            if (!WebGrid1.IsInProgress) {
                if (i < checkedRows.length) {
                    var checkedRow = WebGrid1.RootTable.GetCheckedRows()[i];
                    var selectedRow = WebGrid1.RootTable.ToRowObject(checkedRow);
                    var cells = selectedRow.GetCells();
                    if (selectedRow.KeyValue != '') {
                        // update the selected row's cells value
                        cells.GetNamedItem("CompanyName").SetText(comboValue, true);
                        // update the selected row object
                        selectedRow.Update();
                    }
                    i++;
                }
                if (i >= checkedRows.length) {
                    clearInterval(intervalObj);
                    intervalObj = null;
                    i = 0;
                }
            }
        }, 5);
    }
    return true;
}

Please have a review on my sample as well and let me hear your response.

Thank you.

Regards,
Hans.

Hi,

Thank you for your information code and I apologize for any inconveniences this problem may have caused you.

I’ve made a sample that perhaps similar with your current scenario (based on information code). I bind the WebGrid to Northwind.mdb database and Orders table.
I try to expand a couple of grouped rows, then I refresh the WebGrid. And I get a java script error as well.

To fix this issue, you should modify your code in OnAfterResponseProcess function.
Here I enclosed the code:

var i = 0;var intervalObj;
function WebGrid1_OnAfterResponseProcess(controlId, actionName, lastRequestObject, xmlResponseObject) {
    var WebGrid1 = ISGetObject(controlId);
    if (actionName == "Refresh" || actionName == "ColumnSort") {
        if (expandedGroupNodes != null) {
            var splitResult = expandedGroupNodes.split(";");
            intervalObj = setInterval(function () {
                if (!WebGrid1.IsInProgress) {
                    if (i < splitResult.length - 1) {
                        WebGrid1.RootTable.GetRowByGroup(0, splitResult[i]).ExpandGroupRow();
                        i++;
                    }
                    if (i >= splitResult.length - 1) {
                        clearInterval(intervalObj);
                        intervalObj = null;
                        i = 0;
                    }
                }
            }, 5);
        }
    }
    return true;
}


Please have a review in my sample and let me hear your response.

Thank you.

Regards,
Hans.

All times are GMT -5. The time now is 6:21 PM.
Previous Next