08
Juli
2010

ASP.NET MVC and a Generic jQuery Grid –jqTGrid Part 2

von Simon Gorski | 3 Kommentare »

In my last post I was talking about my idea to use the jqGrid to create a grid based on the data model. In this post I want to take the existing jqTGrid and go one step further. – What if we want to hide a column? What about the column header text?

The first step what I did for that was to change Linq2Sql to the Entity Framework.

That is actually not a big deal and I was surprised that everything worked so straight but when I saw the page I figured out that there are new columns.

image
Weiterlesen…

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google
  • description
  • description
  • TwitThis
07
Juli
2010

ASP.NET MVC and a Generic jQuery Grid -jqTGrid

von Simon Gorski | 8 Kommentare »

If you searching the internet for jqGrid and ASP.NET MVC you will find many examples,
but all of them always define the jqGrid columns – see for an example the blog post from Phil Haack.
If you have a lot of jqGrids in your project you don’t want to define every single column for all the grids.

<script type="text/javascript">
    jQuery(document).ready(function () {
        jQuery("#list").jqGrid({

            url: '/Home/GridData/',
            datatype: 'json',
            mtype: 'GET',

            colNames: ['Id', 'Votes', 'Title'],
            colModel: [
          { name: 'Id', index: 'Id', width: 40, align: 'left' },

          { name: 'Votes', index: 'Votes', width: 40, align: 'left' },

          { name: 'Title', index: 'Title', width: 200, align: 'left'}],

            pager: jQuery('#pager'),
            rowNum: 10,
            rowList: [5, 10, 20, 50],

            sortname: 'Id',
            sortorder: "desc",
            viewrecords: true,

            imgpath: '/scripts/themes/coffee/images',
            caption: 'My first grid'
        });
    });

</script>

So I came up with the idea, why not just pass the data model class and let the grid create itself based
on the model!
Weiterlesen…

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google
  • description
  • description
  • TwitThis
07
Juli
2010

Code Overload

von Richard Deininger | 0 Kommentare »

Maybe I should consider to rethinking my code style guidlines. As I opened my AMUSE project today I got the following message from Visual Studio (9.0).

Never seen it bevor ;)

image

Just checked witch file was responsible for this,… seems like VS doesn’t like the embedded MDG Technology file (XML) of Enterprise Architect.

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google
  • description
  • description
  • TwitThis
06
Juli
2010

Checking Silverlight Version

von Richard Deininger | 0 Kommentare »

We are currently working with Wix (Windows Installer XML) and  today we wanted to roll out a new software package with a prerequisite for Silverlight 3.0.

I must say it’s pretty hard to find something on the web, on how to check installation or version of Silverlight (for Wix or other deployment projects).

But Alex and I found the solution.

If Silverlight is installed you will find the following Registry Entry:

[HKEY_CLASSES_ROOT\AgControl.AgControl\CurVer]

@=”AgControl.AgControl.x.x”

The “AgControl.AgControl.x.x” part contains the current installed version (Silverlight 3.0 = AgControl.AgControl.3.0)

As a little extra here the “Condition” check for Wix:

<Property Id="SILVERLIGHTVERSION">
  <RegistrySearch Id="SilverLightSearch" Type="raw" Root="HKCR" Key="AgControl.AgControl\CurVer"/>
</Property> 

<Condition Message="Please install Silverlight 3.0 or higher, available at: http://go.microsoft.com/fwlink/?LinkID=149156&amp;v=3.0.40818.0">
  <![CDATA[Installed OR SILVERLIGHTVERSION >= "AgControl.AgControl.3.0"]]>
</Condition>

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google
  • description
  • description
  • TwitThis
30
Juni
2010

Full screen for WM/CF

von Richard Deininger | 3 Kommentare »

Since I do some Compact Framework programming on the side. I ran into the problem on how to do full screen applications on WM. Due to our background as “third level developers” we got a pretty good framework for C# Compact Framework programming and there I found the good old HHTaskBar “Hack”.

public static class TaskBar
{
    private static IntPtr taskbar; 

    [DllImport("coredll.dll", EntryPoint = "FindWindowW", SetLastError = true)]
    private static extern IntPtr FindWindowCE(string lpClassName, string lpWindowName); 

    [DllImport("coredll.dll")]
    private static extern IntPtr ShowWindow(IntPtr hWnd, int visible); 

    [DllImport("coredll.dll")]
    private static extern bool EnableWindow(IntPtr hwnd, bool enabled); 

    /// <summary>
    /// hides windows taskbar
    /// </summary>
    public static void HideTaskbar()
    {
        taskbar = FindWindowCE("HHTaskBar", null);
        ShowWindow(taskbar, 0);
        EnableWindow(taskbar, false);
    } 

    /// <summary>
    /// shows windows taskbar
    /// </summary>
    public static void ShowTaskbar()
    {
        ShowWindow(taskbar, 1);
        EnableWindow(taskbar, true);
    } 

}

This is fine,… but if the app crashes or you forget to implement the  ”ShowTasbar” function your TaskBar is gone (till the next cold reset). So I searched and found the following “lightweight” way to “hide” the TaskBar.

public static void FullSize(Form frm)
{
    frm.WindowState = FormWindowState.Maximized;
    frm.Size = Screen.PrimaryScreen.WorkingArea.Size;
    frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
}

Only tested for WM 5.0, 6.0 and 6.5!

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google
  • description
  • description
  • TwitThis
30
Juni
2010

.net and click once and settings

von Andreas Bruckner | 2 Kommentare »

For some applications this is a very useful technique to assure, the user runs the latest version.
For some applications, you may experience difficulty with settings files. Settings files in that way, that users store local data in there, and that these changes are not going to be lost on the next app-update.

There are 3 known circumstances, where your settings files will not get updated:
1) downgrade your deployment version (e.g previous version was 2.5, new version is 2.3)
2) change your deployment provider url
3) changes in public key token/certificates

So if you can make sure, that none of the 3 reasons will ever appear, let click-once setup handle your settings files.
Otherwise, you might consider moving the files to a location outside the click-once environment (e.g. the localappdata folder).
Get an idea of how to do this in this article.

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google
  • description
  • description
  • TwitThis
23
Juni
2010

Mexico 1.0 – Mexican dice game on windows phone | Best Windows Mobile Games / Windows Phone Apps Review

von Christian Zauner | 1 Kommentar »

 

Kaum gepostet ist “Mäxchen” auch schon getestet! Saijo George hat in seinem Bestwindowsmobileapps – Blog “Mexican” einen Review über unser neuestes Machwerk geschrieben.

Und um uns Arbeit zu ersparen ;-) auch ein kleines Video gemacht.

Den gesamten Review gibt es unter Mexico 1.0 – Mexican dice game on windows phone | Best Windows Mobile Games / Windows Phone Apps Review

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google
  • description
  • description
  • TwitThis