User Profile & Activity

Hans Kristian Member
Page
of 69
Posted: August 1, 2014 5:02 AM
Hello,

There is a feature in WebScheduler to add custom or additional field to your event.
You could see the example from one of WebScheduler Samples Solution, “EventOrganizer.aspx” page.
Please kindly have review on the page to see how it works.

Once you could add / save the custom / additional field, you could add validation code in “OnEventBound” client side event.

I create the example validation code based on EventOrganizer.aspx page.
I modify the event color if the “TotalAttendees” field has a specific value. Here’s the example snippet code:
function WebScheduler1_OnEventBound(controlId, evt) {    if (evt.RecurrenceType == "Default") {
        if (evt.MasterObject.TotalAttendees == 150) {
            //Header
            evt.Element.childNodes[0].childNodes[0].childNodes[0].style.backgroundColor = "orange";
            evt.Element.childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.border = "1px solid orange";

            //Content
            evt.Element.childNodes[0].childNodes[0].childNodes[1].childNodes[0].style.backgroundColor = "red"
            evt.Element.childNodes[0].childNodes[0].childNodes[1].childNodes[0].border = "1px solid orange";
        }
    }

    else if (evt.RecurrenceType == "Exception") {
        if (evt.OriginalRecurringObject.TotalAttendees == 100) {
            //Header
            evt.Element.childNodes[0].childNodes[0].childNodes[0].style.backgroundColor = "gray";
            evt.Element.childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.border = "1px solid gray";

            //Content
            evt.Element.childNodes[0].childNodes[0].childNodes[1].childNodes[0].style.backgroundColor = "black"
            evt.Element.childNodes[0].childNodes[0].childNodes[1].childNodes[0].border = "1px solid gray";
        }
    }

    else {
        if (evt.OriginalObject.TotalAttendees == 0) {
            //Header
            evt.Element.childNodes[0].childNodes[0].childNodes[0].style.backgroundColor = "blue";
            evt.Element.childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.border = "1px solid blue";

            //Content
            evt.Element.childNodes[0].childNodes[0].childNodes[1].childNodes[0].style.backgroundColor = "purple"
            evt.Element.childNodes[0].childNodes[0].childNodes[1].childNodes[0].border = "1px solid blue";
        }
    }
}

Hope this helps.

Regards,
Hans K.

Hello,

Thank you for the reply.

I have replied you email from Intersoft Developer Network.

Please kindly have review on the email and let me know your response.

Thank you.

Regards,
Hans K.
Posted: July 30, 2014 11:46 PM

Hello,

Thank you for the question regarding WebScheduler.

I tried to make a workaround that might be you could try.

First, I add “OnEventDoubleClicked” client side event on the WebScheduler.

<ISWebScheduler:WebScheduler ID="WebScheduler1" runat="server" Height="100%" Width="100%">	<ClientSideEvents OnEventDoubleClicked="WebScheduler1_OnEventDoubleClicked"/>
</ISWebScheduler:WebScheduler>

Then in that event I add a couple line of code to modify the selected event.

function WebScheduler1_OnEventDoubleClicked(controlId, clickedEvent) {
    var WebScheduler1 = ISGetObject(controlId);
    clickedEvent.Elements[0].childNodes[0].style.backgroundColor = "red";
    clickedEvent.Elements[0].childNodes[0].style.border = "2px solid orange";
    return true;
}

Hope this helps.
Thank you.

Regards,
Hans K.

Hello,

Thank you for the question.

If don’t mind, could you inform me more information regarding your current scenario?
So that we can find the suitable solution for you, based on your current scenario.

Thank you for your help.

Regards,
Hans K.

Hello,

Thank you for the question.

I have a work around that you might try.
I add a couple line of JavaScript code in “OnInitialize” & “OnBarClick” WebNavPane’s client side event.

<ISWebDesktop:WebNavPane ID="WebNavPane1" runat="server" Height="100%" Width="100%" OnInitialize="WebNavPane1_OnInitialize" OnBarClick="WebNavPane1_OnBarClick"></ISWebDesktop:WebNavPane>

In those client side events, I add JavaScript code to active the first NavBar item.

function WebNavPane1_OnBarClick(id, navbar) {
    // To load/active the first NavBarItem
    navbar.Items[0].Click();
}

function WebNavPane1_OnInitialize(id) {
    var navPane = ISGetObject("WebNavPane1");
    var navBar = navPane.GetActiveBar();
    
    // To load/active the first NavBarItem
    navbar.Items[0].Click();
}

With this workaround, it wills load/active the first NavBar item on the WebNavPane first load or NavBar click.

Hope this helps.

Regards,
Hans K.

Posted: July 30, 2014 3:57 AM

Hello,

I apologize for the inconvenience.

Could you please inform me more information regarding your current scenario / project?

Could you inform me your page configuration & WebGrid configuration?
What is your current WebGrid assembly version?

Thank you for your help.

Regards,
Hans K.

Hello,

Thank you for the sample.

1) I have tried to run your attached sample by running the “Default.aspx” file and then I try to export the WebGrid to Excel. But unfortunately, it works fine on my end. I attached the video regarding the result on my end.

2) Currently, WebGrid only can set the report name from server side event.

3) You could use “close()” JavaScript method to close the browser window.

I apologize for the inconvenience.

I have replied you email from Intersoft Developer Network as well.

Regards,
Hans K.

Posted: July 29, 2014 10:53 PM

Hello,

I apologize for the very late response.

Q: “The following live demo seems to be buggy on chrome 36. Every time I expand a node the combobox is closed. Is this the newest version or will this be fixed soon? (LiveDemo)”
A: I also get the same result as yours. I will forward this issue to the developer team.

Q: “Is multiselect possible in this treeview/combobox/webgrid scenario? Is there a live demo available?”
A: There is multiple selections feature in WebCombo. However currently you can’t use this feature while integrate the WebCombo to WebTreeView. I will forward this scenario to developer team to consider this as a feature request.

Q: “You wrote “the text will be sent back to the WebCombo text box” hopefully key values of selected leaves are send to the combobox instead of text!?”
A: Yes, you could the key value as well.

Q: “The integration of combobox and treeview to webgrid is complete, so selected keys are available on server on flypostbacks et cetera?”
A: Yes, it is available.

Q: “Since combobox and treeview are single packages I’d have to purchase two additional packages to enable this one webgrid function?”
A: Yes, you should purchase the WebCombo and WebTreeView packages as well.

I apologize for the inconvenience.

Regards,
Hans K.

Posted: July 22, 2014 11:48 PM
Hello,

Regarding your need about “drop-down-TREE”, perhaps you could use integration between WebCombo and WebTreeView feature.

When WebTreeView is integrated into WebCombo, the WebTreeView will be automatically shown when the WebCombo's dropdown button is clicked. When a selection is made in the WebTreeView instance, the text will be sent back to the WebCombo text box.

To see how to integrate WebTreeView into WebCombo, you could follow this link:
http://www.intersoftpt.com/Support/WebCombo/Documentation/topic189.html

You also could see the working sample about WebTreeView integration in one of WebCombo Solution Samples, “Integration_WebTreeView.aspx” page.

After integrating the WebCombo & WebTreeView, you could integrate WebCombo into WebGrid.
WebGrid can be integrated with WebCombo as an EditType.

To see how to integrate WebCombo into WebGrid, you could follow this link:
http://www.intersoftpt.com/Support/WebGrid/Documentation/topic512.html

There is a sample that show how to integrate the WebCombo, in WebGrid Solution Samples, “WebComboNETasFilterEditType.aspx” page or “UsingWebComboNETwithMultipleSelection.aspx” page.

Hope this helps.

Regards,
Hans K.
Posted: July 21, 2014 11:16 PM

Hello,

Thank you for the reply.

Basically, in “Load on Demand” case, that is behavior in WebTreeView, you should load/render the parent node before you can load the child node.

Regarding “the better workaround”, I still can’t get the better workaround than yours.

Regarding “hide plus button”, perhaps you could hide the “plus” / expand button in “OnInitializeNode” server side event.

Here’s the example snippet code how to hide the expand button:

protected void WebTreeView1_InitializeNode(object sender, WebTreeViewNodeEventArgs e){
    // For example, this code will hide the node the have depth level equal to 3
    if (e.Node.Depth == 3)
        e.Node.ChildNodeExpandable = false;
}

Thank you.

Regards,
Hans K.

All times are GMT -5. The time now is 10:34 PM.
Previous Next