Showing posts with label DevExperss. Show all posts
Showing posts with label DevExperss. Show all posts

Wednesday, May 17, 2017

DevExpress introduces new ASP.NET Bootstrap controls in v17.1

DevExpress controls suite now include Bootstrap enabled ASP.NET controls in upcoming release. So far I found these controls well incorporated with Bootstrap framework.

These new  ASP.NET Bootstrap controls are compatible with the Bootstrap version 3.3.7. These provides out-of-the-box Bootstrap framework. Right now all not all DevExpress ASP.NET controls found in DevExpress Bootstrap controls. In DevExpress 17.1 Beta Demo Bootstrap controls are totally a separate category of controls.

DevExpress ASP.NET Bootstrap controls are new line of controls which somewhat gives us similar versions of DevExpress ASP.NET features There controls contains 4 type of controls as a subset of the DevExpress ASP.NET controls:

image

And Visual Studio toolbox also showing them in separate category of controls:

image

Let  check the DevExpress Bootstrap Controls:
Most of the added controls are similar to the standard DevExpress ASP.NET controls because they are derived from them. Editor controls has almost all of these properties and the client side events.

 

image

These bootstrap enabled controls has new properties section which specifies the bootstrap related properties. In case of button we use SettingsBootstrap.RenderOption  to specifies the button style as shown in the above image.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DevExBootstrapControls.Default" %>



<%@ Register Assembly="DevExpress.Web.Bootstrap.v17.1, Version=17.1.2.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.Bootstrap" TagPrefix="dx" %>



<%@ Register Assembly="DevExpress.Web.v17.1, Version=17.1.2.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>



<!DOCTYPE html>



<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title></title>

<!-- Latest compiled and minified CSS -->

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">



<!-- Optional theme -->

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">



<!-- Latest compiled and minified JavaScript -->

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

</head>

<body>

<form id="form1" runat="server">

<div>

<dx:BootstrapTextBox ID="btnMessage" ClientInstanceName="message" runat="server" Text="Hello, Bootstrap TextBox"></dx:BootstrapTextBox>

<dx:BootstrapButton ID="btnShowTextMessage" runat="server" AutoPostBack="False" Text="Button">

<ClientSideEvents Click="function(s, e) {

alert(message.GetText());

}" />

<SettingsBootstrap RenderOption="Success" />

</dx:BootstrapButton>

<br />

<br />

-- Grid --

<br />

<dx:BootstrapGridView ID="BootstrapGridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" KeyFieldName="AddressID">

<Columns>

<dx:BootstrapGridViewTextColumn FieldName="AddressID" ReadOnly="True" VisibleIndex="0">

</dx:BootstrapGridViewTextColumn>

<dx:BootstrapGridViewTextColumn FieldName="AddressLine1" VisibleIndex="1">

</dx:BootstrapGridViewTextColumn>

<dx:BootstrapGridViewTextColumn FieldName="AddressLine2" VisibleIndex="2">

</dx:BootstrapGridViewTextColumn>

<dx:BootstrapGridViewTextColumn FieldName="City" VisibleIndex="3">

</dx:BootstrapGridViewTextColumn>

<dx:BootstrapGridViewTextColumn FieldName="StateProvinceID" VisibleIndex="4">

</dx:BootstrapGridViewTextColumn>

<dx:BootstrapGridViewTextColumn FieldName="PostalCode" VisibleIndex="5">

</dx:BootstrapGridViewTextColumn>

<dx:BootstrapGridViewTextColumn FieldName="rowguid" VisibleIndex="6">

</dx:BootstrapGridViewTextColumn>

<dx:BootstrapGridViewDateColumn FieldName="ModifiedDate" VisibleIndex="7">

</dx:BootstrapGridViewDateColumn>

</Columns>

<CssClasses Table="grid-table-with-template" />

</dx:BootstrapGridView>

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:AdventureWorksConnectionString %>" ProviderName="<%$ ConnectionStrings:AdventureWorksConnectionString.ProviderName %>" SelectCommand="SELECT top 20 * FROM [Person_Address]"></asp:SqlDataSource>

</div>

</form>

</body>

</html>




and below is the output of these added controls on the page:


image



 


Conclusion: DevExpress Bootstrap controls idea is quite good and really decrease the development time rather using the flat table for rendering data and other operations using the editor controls. DevExpress native web form controls rich with the features so these Bootstrap enabled control really make intuitive user interface.


 

Wednesday, August 10, 2016

When to use CodeRush Classic or CodeRush for Roslyn?

Microsoft’s has started new way of development in Open Source world with the  paradigm “Compiler as a service”. Now Microsoft has lots of open source projects including the .NET Compiler Platform (“Roslyn”).NET Compiler Platform (“Roslyn”). The .NET Compiler Platform ("Roslyn") provides open-source C# and Visual Basic compilers with rich code analysis APIs. You can build code analysis tools with the same APIs that Microsoft is using to implement Visual Studio!.

According to these dramatic changes in the development on the Microsoft platform lots of tools are adopting ways to move along these. After a while again I got chance to install CodeRush in Visual Studio IDE and I there are two different flavours of CodeRush. This makes me little confuse that which one should i install to work with.

After checking through documentation and ready some blog posts related to my question I got that When to use this newer version of CodeRush for Roslyn or CodeRush Classic. Actually CodeRush Classic work with the prior version of .NET Framework 4.6. With this newer version of .NET framework which is shipped with the Microsoft’s open source projects which based on the Rosyln compiler platform. Below are points which help you to decide that which version suits to your development environment:

  1. If you are using Visual Studio  2015 and .NET framework 4.6 (above) then CodeRush classic does work for you. In this case you should install CodeRush for Roslyn. This does not has all the feature of the CodeRush Classic but newer version will defiantly improve this open source stack.
  2. If you are working with older version of .NET Framework then you’ll need CodeRush Classic. If you need both, you can install both versions simultaneously and defiantly i try this too.
  3. CodeRush Classic supports C# 5.0, VB10, ASP.NET, HTML, JavaScript, XML, and XAML. In this case, for the newer version of language CodeRush for Roslyn is the only option and may be in near future Classic version of CodeRush go obsolete.

Learning and source of information:
CodeRush
.NET Developer Tooling: The Roslyn Revolution
CodeRush on Roslyn

Wednesday, January 6, 2016

How to disable path editing in BreadCrumbEdit control?

Recently I have implemented DevExpress BreadCrumbEdit control in my application and in the implementation I need to disable editing of the path in the control. In technical words, I need BreadCrumbEdit control in only Select mode rather the Edit Mode. Initially it can be set using the BreadCrumbEdit’s BreadCrumbMode property to “Select”.

I found one solution that it is impossible to prevent switching to the Edit mode. The easiest way DevExpress guys suggest that handle the BreadCrumbEdit's PropertiesChanged event and reset it back to “Select” if it try to go in the “Edit” mode. So I did it in the following manner:

C#

private void breadCrumbEdit1_PropertiesChanged(object sender, EventArgs e)

{

if (breadCrumbEdit1.Properties.BreadCrumbMode == BreadCrumbMode.Edit)

{

breadCrumbEdit1.Properties.BreadCrumbMode = BreadCrumbMode.Select;

}

}

VB

Private Sub breadCrumbEdit1_PropertiesChanged(sender As Object, e As EventArgs)

If breadCrumbEdit1.Properties.BreadCrumbMode = BreadCrumbMode.Edit Then

breadCrumbEdit1.Properties.BreadCrumbMode = BreadCrumbMode.Select

End If

End Sub