User Profile & Activity

Handy Surya Support
Page
of 223

Hello Tim,

My previous code showed default categories in multiple selection. Your code for single selection is already correct. So, I think you will not find any problem in handle the validation.

Regards,
Handy

Posted: December 1, 2010 4:08 PM

Hello Vince,

Unfortunately, using Up button to select the first row could not be done. Why don't you select the first row from a button click instead of changing our current feature. Currently, we used that for LoadOnDemand purpose. If you change it, I am afraid that there are some behaviour might be changes or not working.

Regards,
Handy

Posted: December 1, 2010 4:04 PM

Hello Frank,

Please try to call alert with using timeout in firefox.

E.g

   function WebButton1_OnClientClick(controlId, parameter)
        {
            var WebButton1 = ISGetObject(controlId);
            window.setTimeout(function () { alert("1"); }, 100);
            return true;
        }

        <ISWebDesktop:WebButton ID="WebButton1" runat="server" Height="20px" OnClientClick="WebButton1_OnClientClick"
            Text="WebButton" >

As I said before, it is browser behaviour. When it returns error from mozila. the page would postback.
Somehow, in mozila, calliing alert directly would also returns an error. If you put timeout, you will that the page won't postback.

Regards,
Handy

Hello,

You can validate at OnEditingFormSave clientside event. Below is the snippet code. Hope this helps.

 function WebScheduler1_OnEditingFormSave(controlId, action, eventView)
        {
            var s = ISGetObject(controlId);
            var editWindow = s.GetEditingFormWindow();
            var wcCategories = editWindow.ISGetObject("wcCategories");
            if (wcCategories.Values == null)
            {
                alert("Categories can not be Empty");
                return false
            } else
            {

                return true;
            }
        }

 

Regards,
Handy

Posted: November 30, 2010 5:24 PM

Hello Vince,

In each WebGridColumn, we have properties for your scenario. You can try to set DefaultText and DefaultValue for its Column. When you click on new row, it would automatically has them as value/text.

Regards,
Handy

Posted: November 30, 2010 5:07 PM

Hello Vince,

You can use SetText() method in WebCombo or in WebGridCell as well.
If you want to avoid it to be selectable in new row when integrate into WebGrid, you can set NewRowEditType as TextBox. By using TextBox as EditType in new row, user would not able to select row in WebCombo at new row.

Regards,
Handy

Posted: November 30, 2010 4:57 PM

Hello Frank,

If I am not mistaken, this is a default behaviour from the browser itself.
Mozila would postback the page if there is an error in the script or process. However, when WebButton calls alert, mozila will assume it as an error result. If you don't use any alerts but set the text/value or call the function from WebButton click, it surely works well.

Regards,
Handy

Posted: November 30, 2010 4:52 PM

Hello Frank,

SubTotal Columnx is an unbound column in AddCalculatedColumn.aspx. So, the footer for SubTotal column would not changed. Also, you did not mention about footer scenario last time. If you would like the footer gets updated as well, you would need to save the changes calculation and set into the footer.

Please see my attached sample. It will show you how to calculate the changes and set into the footer.
Hope this helps.

Regards,
Handy

Posted: November 30, 2010 10:20 AM

Hello,

You can use Glenn approach or retrieve the dropdown element by attaching onchange event.

e.g

  function DropDownSelect()
        {
            var ddObject = document.getElementById("WebGrid1_Company");
            var grid = ISGetObject("WebGrid1");

            alert("Text: " + ddObject.options[ddObject.selectedIndex].innerText + "\nValue: " + ddObject.options[ddObject.selectedIndex].value);
        }

        function AttachEvent()
        {
            var dd = document.getElementById("WebGrid1_Company");
            dd.attachEvent('onchange', DropDownSelect);
        }

        function WebGrid1_OnInitialize(controlId)
        {
            AttachEvent();
        }

Note: If you have a trouble in finding dropdownlist id, you can try to use view source after load the page.

 

Regards,
Handy

Posted: November 30, 2010 9:54 AM

Hello Kenny,

I can replicate this issue only in WebGrid. Fyi, this issue has been raised at the past. I will try to contact our developer teams regarding this issue. I will let you know when it's fixed.

Regards,
Handy

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