netoops blog

Wednesday, 29 August 2012

Show Map Inside Power View in Excel 2013


There is a special feature in Excel 2013 for inserting maps into our Power View report. By doing this we can analyze the data in terms of the map. If we have a set of data and we want to analyze the data through the map in Excel 2013 then we must follow various of steps.
Let's have a look at the following steps.
Step 1
First go to Excel 2013.
Step 2

Now select the blank workbook template from the available templates.





Step 3

Now enter some data like this:



Step 4

Now select the insert menu option.


Step 5

Now under it just select the Power View option like this:



Step 6

A Power View window will appear like this:



Step 7
In it just deselect all the fields from the Power View Fields task pane and leave the state checkbox checked.



For More Steps Click On

http://www.c-sharpcorner.com/UploadFile/c59e94/use-map-in-power-view-in-excel-2013/

Thus in this way we can analyze the data through the map in the Power View in Excel 2013.

GeniusTalkByJinal: Talk to your computer with Chrome and ASP.NET Combo Box

GeniusTalkByJinal: Speech Recognition: Talk to your computer with Chrome and  ASP.NET Combo Box ...

Speech Recognition


Talk to your computer with Chrome and  ASP.NET Combo Box


Check out how to enable speech-recognition for the ASP.NET Combo Box control and let your end-users talk to your website!
Watch this short 1 minute screencast to see how the voice-to-text integration works with the ASPxComboBox:
Chrome Speech Recognition and ASP.NET Combo Box
First, the disclaimer:
<disclaimer>
1. This feature will only work with Google's Chrome Web browser version 11 and above. I explain why below.
2. Two undocumented DevExpress client-side functions are used for this code. However, this sample is still simple to implement.
This how-to is 99.9% for fun and I cannot guarantee that Google Chrome may change this feature in the future which could break the code I'm about to show you.
You've been warned. Now let's have some fun…
</disclaimer>

Chrome Speech Recognition

Google's Chrome Browser introduced support for speech recognition with version 11 (back in April 2011):
Fresh from the work that we’ve been doing with the HTML Speech Incubator Group, we’ve added support for the HTML speech input API. With this API, developers can give web apps the ability to transcribe your voice to text. When a web page uses this feature, you simply click on an icon and then speak into your computer’s microphone. The recorded audio is sent to speech servers for transcription, after which the text is typed out for you. -Chrome Blog 
And this feature still works in the current version 13 of Chrome which I used for the screencast above.

How-To Enable Speech Recognition

To enable speech recognition in the ASPxComboBox follow these 3 steps:
1. Insert a meta-tag to set the language (in case the site language differs from the speech recognition language):
1
2
3
4
<head runat="server">
    <meta http-equiv='Content-Language' content='en-US' />
    <title>DevExpress - Fun with Chrome</title>
2. Override the ASPxClientComboBox's client-side Init event:
1
2
3
4
5
6
7
8
9
10
11
12
<script type="text/javascript">
    function OnComboBoxInit(s) {
        var input = s.GetInputElement();
        input.setAttribute("x-webkit-speech", "x-webkit-speech");
        input.onwebkitspeechchange = function (evt) {
            if(s.filterStrategy && s.filterStrategy.FilterStartTimer)
                s.filterStrategy.FilterStartTimer();
            else
                aspxETextChanged(s.name);
        };
    }
</script>
Please note that s.filterStrategy.FilterStartTimer and aspxETextChanged functions are not documented. Sorry.
3. Point the ASPxComboBox to the OnComboBoxInit event:
1
2
3
4
<dx:ASPxComboBox ID="ASPxComboBox1" runat="server" IncrementalFilteringMode="Contains" DropDownStyle="DropDown"
   DataSourceID="AccessDataSource1" TextField="Country" ValueField="Country">
   <ClientSideEvents Init="OnComboBoxInit" />
</dx:ASPxComboBox>
The ASPxComboBox in this code above uses the same functionality as the one in this 'Callback mode' demo.

What about Internet Explorer?

Currently, Internet Explorer doesn't support speech recognition. There is a possibility that IE may get the speech recognition feature in the future.

Download Code

There is a code central demo for this feature which you can try online now:
ASPxComboBox - How to enable speech recognition in Google Chrome web browser
You can also download the full source code and project right from code central.

Summary

The how-to code above shows you a simple way to enable speech recognition for the ASPxComboBox in Chrome version 11 and above. Try it and then drop me a line below with your thoughts. Thanks.


Thursday, 23 August 2012

Drag Drop GridView Rows With JQuery Asp.Net




Drag Drop GridView Rows With JQuery Asp.Net



This Example explains How To Implement Drag And Drop GridView Rows Functionality Using JQuery JavaScript In Asp.Net 2.0 3.5 4.0 To Rearrange Row On Client Side.

You need to download and add JQuery and TableDnD plugin in your application.

GridView is populated with Northwind database using SqlDataSource.

Drag Drop Gridview Rows Using JQuery


Add Script references and css style in head section of page.


   1:  <style type="text/css">
   2:     .highlight
   3:      {
   4:          color : White !important;
   5:          background-color : Teal !important;
   6:      }
   7:  </style>
   8:  <script src="jquery-1.7.1.js" type="text/javascript"/>
   9:  <script src="jquery.tablednd.0.7.min.js" type="text/javascript"/>

Call tableDnD function of drag and drop plugin by passing Gridview Id.


   1:  <script type="text/javascript" language="javascript">
   2:  $(document).ready(function() 
   3:  {
   4:  $("#<%=GridView1.ClientID%>").tableDnD(
   5:              {
   6:                  onDragClass: "highlight"
   7:              });
   8:  });
   9:  </script>
  10:  </head>

   1:  <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
   2:                AutoGenerateColumns="False" DataKeyNames="OrderID" 
   3:                DataSourceID="SqlDataSource1">
   4:  <Columns>
   5:  <asp:BoundField DataField="OrderID" HeaderText="OrderID"/>
   6:  <asp:BoundField DataField="Freight" HeaderText="Freight"/>
   7:  <asp:BoundField DataField="ShipName" HeaderText="ShipName"/>
   8:  <asp:BoundField DataField="ShipCity" HeaderText="ShipCity"/>
   9:  <asp:BoundField DataField="ShipCountry" HeaderText="ShipCountry"/>
  10:  </Columns>
  11:  </asp:GridView>

Build and run the code.

How to use theme and skin id (SkinID) in FileUpload control

FileUploadSkin.aspx


  1. <%@ Page Language="C#" Theme="FileUploadSkinIDTest" %>  
  2.   
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  4.   
  5. <script runat="server">  
  6.       
  7. </script>  
  8.   
  9. <html xmlns="http://www.w3.org/1999/xhtml">  
  10. <head id="Head1" runat="server">  
  11.     <title>How to use theme and skin id (SkinID) in FileUpload control</title>  
  12. </head>  
  13. <body>  
  14.     <form id="form1" runat="server">  
  15.     <div>  
  16.         <h2 style="color:Navy; font-style:italic;">FileUpload Example: Theme and SkinID</h2>  
  17.         <asp:FileUpload   
  18.              ID="FileUpload1"   
  19.              runat="server"  
  20.              />  
  21.         <br /><br />  
  22.         <asp:FileUpload   
  23.              ID="FileUpload2"   
  24.              runat="server"  
  25.              SkinID="SandyBrown"  
  26.              />  
  27.     </div>  
  28.     </form>  
  29. </body>  
  30. </html>  
FileUploadSkinIDTest.skin

  1. <asp:FileUpload   
  2.      runat="server"  
  3.      ForeColor="Snow"  
  4.      BackColor="OrangeRed"  
  5.      Font-Size="Large"  
  6.      BorderWidth="1"  
  7.      BorderColor="Orange"  
  8.      Font-Italic="true"  
  9.      />  
  10.   
  11. <asp:FileUpload   
  12.      SkinID="SandyBrown"   
  13.      runat="server"  
  14.      ForeColor="Snow"  
  15.      BackColor="SandyBrown"  
  16.      Font-Size="Large"  
  17.      BorderWidth="1"  
  18.      BorderColor="SaddleBrown"  
  19.      Font-Italic="true"  
  20.      Font-Names="Comic Sans MS"  
  21.      />  



Wednesday, 22 August 2012

What is HTML5 Web Storage?


With HTML5, web pages can store data locally within the user's browser.
Earlier, this was done with cookies. However, Web Storage is more secure and faster. The data is not included with every server request, but used ONLY when asked for. It is also possible to store large amounts of data, without affecting the website's performance.
The data is stored in key/value pairs, and a web page can only access data stored by itself.

There are two new objects for storing data on the client:
  • localStorage - stores data with no expiration date
  • sessionStorage - stores data for one session
Before using web storage, check browser support for localStorage and sessionStorage:



The localStorage Object



Example

localStorage.lastname="Smith";
document.getElementById("result").innerHTML="Last name: "
+ localStorage.lastname;





Example explained:
  • Create a localStorage key/value pair with key="lastname" and value="Smith"
  • Retrieve the value of the "lastname" key and insert it into the element with id="result"

The sessionStorage Object

The sessionStorage object is equal to the localStorage object, except that it stores the data for only one session. The data is deleted when the user closes the browser window.
The following example counts the number of times a user has clicked a button, in the current session:

Example


if (sessionStorage.clickcount)
  {
  sessionStorage.clickcount=Number(sessionStorage.clickcount)+1;
  }
else
  {
  sessionStorage.clickcount=1;
  }
document.getElementById("result").innerHTML="You have clicked the button " + sessionStorage.clickcount + " time(s) in this session.";



Tuesday, 21 August 2012

ASP.Net

How to use CSS style in Calendar individual Day Cell



  1. <%@ Page Language="C#" AutoEventWireup="true" %>  
  2.   
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  4. <script runat="server">  
  5.     protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)  
  6.     {  
  7.         DateTime stratDate = new DateTime(2011,12,15);;  
  8.         DateTime endDate = new DateTime(2011,12,24);;  
  9.   
  10.         if (e.Day.Date > stratDate && e.Day.Date < endDate)  
  11.         {  
  12.             e.Cell.Font.Italic = true;  
  13.             e.Cell.Font.Size = FontUnit.XLarge;  
  14.             e.Cell.Font.Strikeout = true;  
  15.             e.Cell.CssClass = "CustomCellCss";  
  16.         }  
  17.     }  
  18. </script>  
  19.   
  20. <html xmlns="http://www.w3.org/1999/xhtml">  
  21. <head id="Head1" runat="server">  
  22.     <title>How to use CSS style in Calendar individual Day Cell</title>  
  23.     <style type="text/css">  
  24.         .CustomCellCss a:hover  
  25.         {  
  26.             background-color:DarkOrange;  
  27.             padding: 0px 30px 0px 30px;  
  28.             }  
  29.     </style>  
  30. </head>  
  31. <body>  
  32.     <form id="form1" runat="server">  
  33.     <div>  
  34.         <h2 style="color:SlateBlue; font-style:italic;">  
  35.             How to use CSS style in Calendar individual Day Cell  
  36.         </h2>  
  37.         <hr width="550" align="left" color="SlateGray" />  
  38.         <asp:Calendar  
  39.             ID="Calendar1"   
  40.             runat="server"  
  41.             NextPrevFormat="FullMonth"  
  42.             ForeColor="WhiteSmoke"  
  43.             SelectionMode="Day"  
  44.             DayNameFormat="Full"  
  45.             Font-Names="Book Antiqua"  
  46.             Font-Size="Medium"  
  47.             OnDayRender="Calendar1_DayRender"  
  48.             VisibleDate="12/1/2011"  
  49.             >  
  50.             <DayHeaderStyle  
  51.                  BackColor="DodgerBlue"  
  52.                  />  
  53.             <DayStyle  
  54.                  BackColor="Crimson"  
  55.                  BorderColor="IndianRed"  
  56.                  BorderWidth="1"  
  57.                  Font-Bold="true"  
  58.                  Font-Italic="true"  
  59.                  />  
  60.             <NextPrevStyle  
  61.                  Font-Italic="true"  
  62.                  Font-Names="Arial CE"  
  63.                  />  
  64.             <SelectedDayStyle  
  65.                  BackColor="Green"  
  66.                  BorderColor="SpringGreen"  
  67.                  />  
  68.             <OtherMonthDayStyle BackColor="DarkRed" />  
  69.             <TitleStyle  
  70.                  BackColor="MidnightBlue"  
  71.                  Height="36"  
  72.                  Font-Size="Large"  
  73.                  Font-Names="Courier New Baltic"  
  74.                  />  
  75.         </asp:Calendar>  
  76.     </div>  
  77.     </form>  
  78. </body>  
  79. </html>  







Related Posts Plugin for WordPress, Blogger...