﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - Event</title><link>http://www.intersoftsolutions.com/Community/Tags/Event/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>How to sort WebGrid by displayed text instead of underlying data?</title><link>http://www.intersoftsolutions.com/Community/Tags/Event/</link><pubDate>Tue, 28 Aug 2012 06:28:28 GMT</pubDate><dc:creator>Eric</dc:creator><category>WebGrid</category><category>InitializeDataSource</category><category>Event</category><category>sort</category><category>InitializeRow</category><category>e.Row.Cells.GetNamedItem().Text</category><category>CustomSort</category><description>&lt;p&gt;See this thread for code example:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.intersoftpt.com/Community/WebGrid/WebGrid-How-to-access-Session-object-in-InitializeRow-event-handler/"&gt;http://www.intersoftpt.com/Community/WebGrid/WebGrid-How-to-access-Session-object-in-InitializeRow-event-handler/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There's a sorting problem. When sorting by this Name field, it will get sorted by the value in the DataTable from InitializeDataSource, field List_Name. But in InitializeRow I set the ListName.Text (e.Row.Cells.GetNamedItem("xx").Text) to the value that will be displayed. In the case of this example I prepend just "-DIR-" for folders and "-FIL-" for leaf-nodes. When sorting, it won't get sorted by the displayed text, but by the underlying data field (before updating). For this example, the root-level entry "-FIL-a-" comes before "-DIR-b-", just because "a" comes before "b", but the final text is ignored ("-D.." would come before "-F..").&lt;/p&gt;
&lt;p&gt;How can I make sure the list gets sorted by the displayed text? Would I have to implement CustomSort event? How?&lt;/p&gt;</description></item><item><title>Webscheduler Event Color Enhancement </title><link>http://www.intersoftsolutions.com/Community/Tags/Event/</link><pubDate>Thu, 29 Dec 2011 02:56:53 GMT</pubDate><dc:creator>srikantweb007</dc:creator><category>WebScheduler</category><category>Event</category><description>&lt;p&gt;I have a very specific requirement regarding my application that I am using the webscheduler for, specifically the month view mode.&lt;/p&gt;&lt;p&gt;Webscheduler seems to use the Resource color as the Event color "bar" when designating appointments.&lt;br /&gt;
Now I have a requirement like,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Each event has 3 parts.&lt;/li&gt;
&lt;li&gt;Each part can be set to number of days.&lt;/li&gt;
&lt;li&gt;The End Date will be calculated by adding the days for each part to the Begin Date&lt;/li&gt;
&lt;li&gt;We want to display the line on the calendar covering the days in color blocks.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So for a event that is 1 day part1, 1 day part2 and 1 day part3 the schedule would show a band covering 3 days that is 1/3 color1; 1/3 color2; 1/3 color3;&lt;/p&gt;
&lt;p&gt;So, main thing is that, can we have a single event with three different colors ?&lt;/p&gt;
&lt;p&gt;Please tell me do I have any options or workarounds regarding this?&lt;/p&gt;</description></item><item><title>Enter_Event issue</title><link>http://www.intersoftsolutions.com/Community/Tags/Event/</link><pubDate>Thu, 07 Oct 2010 21:39:07 GMT</pubDate><dc:creator>qq397472251</dc:creator><category>WebGrid</category><category>Event</category><category>NoEdit</category><category>enter</category><description>&lt;p&gt; Webgrid  have a column which is &lt;strong&gt;"NoEdit"&lt;/strong&gt; !&lt;/p&gt;&lt;pre&gt; &amp;lt;ISWebGrid:WebGridColumn Width="60px" EditType="NoEdit" Name="idxBox" Caption="myname" &amp;gt;    
  &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;&lt;/pre&gt;
&lt;p&gt;When focus on  "myname"  column, I Press&lt;strong&gt; Enter Key&lt;/strong&gt;,can not tun into next cell ！&lt;br /&gt;&lt;span style="color: #c00000"&gt;How can I do to tun into next cell&amp;nbsp; when have a &lt;strong&gt;"NoEdit"&lt;/strong&gt;&amp;nbsp; column???&lt;pre&gt;&lt;span style="color: #0c0c0c"&gt;function WebGrid1_OnEditKeyDown(controlId, tblName, rowIndex, cellIndex) {
    var grid = ISGetObject(controlId);
    var totalRows = grid.TotalRows;
    var curRow = grid.GetSelectedObject().rowIndex;
    var curCell = grid.GetActiveEditCell().cellIndex;
    var activeCell = grid.GetActiveEditCell();

    if (activeCell.rowElement.type == "Record") {
        if (event.keyCode == 37)//左键左移
        {
            if (curCell != 1)//不是第一单元,则在该行左移
            {
                MoveAndSelectCell(curRow, curCell - 2);
            } else//如果是第一单元并且不是第一行则上移一行
            {
                if (curRow != 0) {
                    MoveAndSelectCell(curRow - 1, 3);
                }
            }
        }

        if (event.keyCode == 39)//右键右移
        {
            if (curCell != 8)//不是最后单元则在该行移
            {
                MoveAndSelectCell(curRow, curCell);
            } else {
                if (curRow != (totalRows - 1))//不是最后一行,则下移一行.
                {
                    MoveAndSelectCell(curRow &amp;#43; 1, 1);
                }
            }
        }

        if (event.keyCode == 38)//下键上移
        {
        alert('up');
        }
        if (event.keyCode == 40)//下键下移
        {
     
            
            if (curRow &amp;lt; (totalRows - 1))//如果不是最后一行，则下移一行
            {
//                if (curCell != 4) {
//                MoveAndSelectCell(curRow &amp;#43; 1, curCell-1);
//             
//                                     
//                } else {
//                    var WebCombo1 = ISGetObject("WebCombo1");
//                    window.setTimeout(function() { WebCombo1.ShowDropDown(true); }, 100);
//                }
            }
        }

        if (event.keyCode == 13)//如果是回车
        {
            if (curCell == 8) {

                if (curRow == (totalRows - 1)) {
                       
                        var newRow = grid.RootTable.NewRow();
                        var newCells = newRow.GetCells();

                        newCells.GetNamedItem("vouid").SetText(totalRows &amp;#43; 1, true);
                        newCells.GetNamedItem("商品编号").SetText("", true);
                        newCells.GetNamedItem("商品名称").SetText("", true);
                        newCells.GetNamedItem("商品规格").SetText("", true);
                        newCells.GetNamedItem("包装单位").SetText("", true);
                        newCells.GetNamedItem("数量").SetText("", true);
                        newCells.GetNamedItem("价格范围").SetText("", true);
                        newCells.GetNamedItem("备注").SetText("", true);

                  
                        
                        
                        newRow.Update();
                      
                        
                        window.setTimeout(function() { SelectNextRow(curRow &amp;#43; 1); }, 1000);     
                }
                else {
                    var nextCell = grid.RootTable.GetRow(curRow &amp;#43; 1).GetCell(1);
                    grid.SetFocus();
                    grid.RootTable.GetRow(curRow &amp;#43; 1).Select();
                    nextCell.ActivateEdit();
                }
                event.keyCode = null;
            } else {
                event.keyCode = 9;
            }
        }
    }
    return true;
}&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style="color: #0c0c0c"&gt;function WebGrid1_OnEditKeyDown(controlId, tblName, rowIndex, cellIndex) {
    var grid = ISGetObject(controlId);
    var totalRows = grid.TotalRows;
    var curRow = grid.GetSelectedObject().rowIndex;
    var curCell = grid.GetActiveEditCell().cellIndex;
    var activeCell = grid.GetActiveEditCell();

    if (activeCell.rowElement.type == "Record") {
        if (event.keyCode == 37)//左键左移
        {
            if (curCell != 1)//不是第一单元,则在该行左移
            {
                MoveAndSelectCell(curRow, curCell - 2);
            } else//如果是第一单元并且不是第一行则上移一行
            {
                if (curRow != 0) {
                    MoveAndSelectCell(curRow - 1, 3);
                }
            }
        }

        if (event.keyCode == 39)//右键右移
        {
            if (curCell != 8)//不是最后单元则在该行移
            {
                MoveAndSelectCell(curRow, curCell);
            } else {
                if (curRow != (totalRows - 1))//不是最后一行,则下移一行.
                {
                    MoveAndSelectCell(curRow &amp;#43; 1, 1);
                }
            }
        }

        if (event.keyCode == 38)//下键上移
        {
        alert('up');
        }
        if (event.keyCode == 40)//下键下移
        {
     
            
            if (curRow &amp;lt; (totalRows - 1))//如果不是最后一行，则下移一行
            {
//                if (curCell != 4) {
//                MoveAndSelectCell(curRow &amp;#43; 1, curCell-1);
//             
//                                     
//                } else {
//                    var WebCombo1 = ISGetObject("WebCombo1");
//                    window.setTimeout(function() { WebCombo1.ShowDropDown(true); }, 100);
//                }
            }
        }

        if (event.keyCode == 13)//如果是回车
        {
            if (curCell == 8) {

                if (curRow == (totalRows - 1)) {
                       
                        var newRow = grid.RootTable.NewRow();
                        var newCells = newRow.GetCells();

                        newCells.GetNamedItem("vouid").SetText(totalRows &amp;#43; 1, true);
                        newCells.GetNamedItem("商品编号").SetText("", true);
                        newCells.GetNamedItem("商品名称").SetText("", true);
                        newCells.GetNamedItem("商品规格").SetText("", true);
                        newCells.GetNamedItem("包装单位").SetText("", true);
                        newCells.GetNamedItem("数量").SetText("", true);
                        newCells.GetNamedItem("价格范围").SetText("", true);
                        newCells.GetNamedItem("备注").SetText("", true);

                  
                        
                        
                        newRow.Update();
                      
                        
                        window.setTimeout(function() { SelectNextRow(curRow &amp;#43; 1); }, 1000);     
                }
                else {
                    var nextCell = grid.RootTable.GetRow(curRow &amp;#43; 1).GetCell(1);
                    grid.SetFocus();
                    grid.RootTable.GetRow(curRow &amp;#43; 1).Select();
                    nextCell.ActivateEdit();
                }
                event.keyCode = null;
            } else {
                event.keyCode = 9;
            }
        }
    }
    return true;
}&lt;/span&gt;&lt;/pre&gt;
</description></item><item><title>WebDesktopToolbar - Javascript confirm dialog on click</title><link>http://www.intersoftsolutions.com/Community/Tags/Event/</link><pubDate>Thu, 25 Mar 2010 08:06:01 GMT</pubDate><dc:creator>dragon</dc:creator><category>WebDesktop</category><category>Toolbar</category><category>Event</category><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;I have a delete button in my toolbar, i also have a server side and a client side event for the button.&lt;/p&gt;
&lt;p&gt;The button is also allowed to do AutoPostBack.&lt;/p&gt;
&lt;p&gt;Now, what i want is when the user click the delete button, it will call the client side event and there i will open a javascript confirmation. If user cancels the confirmation, then nothing will happen (no post back will happen/no server side event execution), otherwise the server side event will be executed.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I want to give an Asp.net version of the task that i am trying.&lt;/p&gt;&lt;pre&gt;&amp;lt;asp:Button ID="btnDelete" runat="server" Text="Delete" OnClick="Delete_Click" OnClientClick="return confirm('Are you sure that you want to delete?');" /&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;But the problem i face is when i set AutoPostBack = Yes, then clicking the button fires both server side and client side event altogether. without waiting for the confirmation box, the page postbacks. I tried to stop the postback by putting a javascript alert inside the client side event, but still post back happens, ignoirng the alert. &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;So my question is, is it possible to cancel the serverside event from the clientside event for toolbar.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Please help me on this. Thanks in advance.&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>