User Profile & Activity

Hans Kristian Member
Page
of 69
Posted: May 30, 2014 12:17 AM

Hello,

Thank you for the question regarding WebGrid.

Here’s the example snippet code how to hide a row in WebGrid from server side:

protected void Button1_Click(object sender, EventArgs e){
    //Hide the 2nd row
    WebGrid1.RootTable.Rows[1].Visible = false;
}

If you want to hide a row when WebGrid being loaded, you can use InitializeRow server side event.
Here the example snippet code:

protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)
{
    // Hide the 3rd row
    if (e.Row.KeyValue.ToString() == "3")
        e.Row.Visible = false;
}

I attached the sample the use those code above. You could have review on the sample to see the result.
I bind the WebGrid to access data source (Northwind.mdb database & Shippers table).

You could download the sample from this link as well: http://1drv.ms/1kaksJq

Regards,
Hans K.

Posted: May 29, 2014 10:25 PM
Hello,

I attached the video regarding the result that I got on my end by using ‘WebDesktopManager_Loading_Hangs.aspx’ page.

Did you get the same result as mine?

Have you try to run the ‘WebDesktopManager_Loading_Hangs.aspx’ page as well?

If you can’t get the sample & video please try to download from this link: http://1drv.ms/1k9ZZ7N

Thank you.

Regards,
Hans K.
Posted: May 26, 2014 12:05 AM

Hello,

Perhaps you could use another JavaScript third party library, for example: ZeroClipboard.

Then you could add customize context menu item to call your customize JavaScript function code.

Here’s the example snippet code how to add customize context menu item:

function WebGrid1_OnRowContextMenu(controlId, rowType, rowElement, menuObject){
    var WebGrid1 = ISGetObject(controlId);

    if (!IS.ie)
    {
        //To hide "Copy Row" item
        menuObject.Items.GetNamedItem("mnuCopyRow").Hide();
        //To hide "Copy Table" item
        menuObject.Items.GetNamedItem("mnuCopyTable").Hide();

        // Add new context item nemu
        var copyRowItem = new WebMenuItem();
        copyRowItem.Text = "Copy Row Non-IE";
        copyRowItem.OnClick = function () { copyRowNonIE() };
        copyRowItem.Name = "mnuCopyRowNonIE";
        menuObject.Items.InsertAt(copyRowItem, 0);

        // Add new context item nemu
        var copyTableItem = new WebMenuItem();
        copyTableItem.Text = "Copy Table Non-IE";
        copyTableItem.OnClick = function () { copyTableNonIE() };
        copyTableItem.Name = "mnuCopyTableNonIE";
        menuObject.Items.InsertAt(copyTableItem, 1);
    }
    return true;
}

Hope this helps.

Regards,
Hans K.

Posted: May 25, 2014 11:36 PM
Hello,

Thank you for the attached file.

I created a WebDeaktopManager page based on your WebDesktopManager’s configuration.
However I didn’t use / remove “OnLoad” server event.

The “loading hangs” issue occurs due to “BackgroundImage” property in “FrameStyle” tag.
The issue disappears after I delete the “BackgroundImage” property in “FrameStyle” tag.

It might be the issue occurs because of WebDesktopManager can’t find the image file.
Please kindly ensure you provide the correct url path.

I attached my WebDesktopManager sample as well.

Thank you.

Regards,
Hans K.
Posted: May 25, 2014 10:42 PM
Hello,


Thank you for the attached file.

I created a WebGrid page based on your WebGrid’s configuration. But I use access data source control (Northwind database¬ & Shippers table) and since I don’t use Telerik assembly, I didn’t add Telerik on the page.

Unfortunately, the WebGrid rendered correctly (WebGrid_Height_Issue.png).

Basically, I didn’t recommend you to use two different (more than one) third party control in the same page. This could cause a rendering issue (style issue) like this.

I attached my WebGrid sample as well.

Regards,
Hans K.

Posted: May 21, 2014 6:07 AM

Hello,

I got the update from the developer team regarding this issue.
Basically this error message occurs due to browser (non IE) limitation itself.
You couldn’t do ‘Copy Row’ action in non-IE browser.

I have a workaround that you might try. You could hide the “Copy Row” item if the browser isn’t Internet Explorer.
You could add validation code in “OnRowContextMenu” client side event. Here’s the snippet example code how to hide the “Copy Rom” item:

function WebGrid1_OnRowContextMenu(controlId, rowType, rowElement, menuObject){
    var WebGrid1 = ISGetObject(controlId);
    if (!IS.ie)
    {
        //To hide "Copy Row" item
        menuObject.Items.GetNamedItem("mnuCopyRow").Hide();
        //To hide "Copy Table" item
        menuObject.Items.GetNamedItem("mnuCopyTable").Hide();
    }
    return true;
}

I’m sorry for the inconvenience. Thank you.

Regards,
Hans K.

Posted: May 15, 2014 11:23 PM

Hello,

I apologize for the inconvenience.

Would you mind to provide me more detail information regarding this issue?

Could you please help me to provide me your grid tab page’s configuration?
So that I can help you to investigate the issue further more.

Regards,
Hans K.

Posted: May 15, 2014 11:07 PM

Hello,

Thank you for the question regarding WebDesktopManager.

Please kindly ensure you use the correct HTML5 doctype declaration.

<!DOCTYPE html>
<html></html>

If you use HTM5 doctype, I suggest you to set the ‘RenderingMode’ property to ‘HTML5’ as well.

However, the issue still persist, could you please help me to provide me your WebDesktopManager page’s configuration?
So that I can help you to investigate the issue further more.

I apologize for the inconvenience.

Regards,
Hans K.

Hello,

I apologize for the inconvenience.

I have forwarded this issue to the developer team.

I will let you know if there is an update regarding this issue.

Thank you.

Regards,
Hans K.

Hello,

Here’s the snippet example code how to get name of the double clicked column:

function WebGrid1_OnCellDblClick(controlId, tblName, rowIndex, cellIndex, cellEl){
    var WebGrid1 = ISGetObject(controlId);
    alert(WebGrid1.RootTable.Columns[cellIndex - 1].Caption);
    return true;
}

Hope this helps.

Thank you.

Regards,
Hans K.

All times are GMT -5. The time now is 12:37 PM.
Previous Next