← Back to all blogs

Posts tagged with 'c1gridview'

Formatting Date Column based on day of week with ComponentOne Wijmo GridView

ComponentOne's Wijmo GridView is an advanced GridView control which works perfectly in bound mode. There are times when you may want to bind your Wijmo GridView to a data source which has Date columns as well. In this blog, we are going to learn how we can format this date column based on the day of the week.

Getting Started with Creating Hierarchical C1GridView

Hierarchical data display is a very common way of presenting related data. With the 2014v3 release of Studio for ASP.NET Wijmo, C1GridView now supports Hierarchical display. C1GridView, displays the hierarchical data with multilevel, multiple layouts and provide features such as sorting, filtering, grouping and editing.

Context Menu in ComponentOne GridView

C1GridView lets you display items from a data source in an interactive, fully customizable table. And a common scenario is to display a ContextMenu and provide some functionality such as exporting to various formats etc.

Custom Editor with Client-side Editing in GridView

ComponentOne GridView provides both client-side editing and server-side editing options to the end users. You can refer to the following demo's showing various editing techniques available in C1GridView:

Extending C1GridView Editing-EditForm

The C1GridView provides multiple options to edit data, be it client side or server side. It also enhances the editing experience by allowing editing controls. The server side editing now supports default C1Input controls, you can also bind to any other editing control of your choice. However applications may sometime require to show an edit form while editing,best if it is shown inside the grid. Though this functionality is not present out of the box but the C1GridView does allow you to create one by extending it through a few lines of reusable code. Let me walk you through extending C1GridView to implement a editable form like the image below.

Inheriting Wijmo Controls

Studio for ASP.NET Wijmo provides a complete development toolkit for creating and styling perfect web applications. It contains more than 40 controls which can cater all the needs of a project. Each control contains many inbuilt properties, events etc. and also, allows you to customize it. You may also inherit Wijmo controls in order to add more properties or override any behavior.

C1GridView: Working With C1HyperLinkField

C1GridView supports various types of Columns which can be customized according to User's need. In my previous blogs, I discussed how we can data bind a C1TemplateField at design time and at runtime. In this blog we discuss how to DataBind a C1HyperLinkField and show hyperlinks in the grid.

C1GridView: Runtime DataBinding of Template Field

In my previous blog we discussed how to bind a Template Field containing DropDownList using a lookup table. Binding was done at design time using the DataSourceID property of C1GridView. You can refer to the blog here.

Checkbox Selection in Wijmo Grid

To implement row selection via checkbox in Wijmo Gridview server control, you can add a checkbox control in Template column and then handle the RowCreated event. But, in WijGrid widget, there is a different way for achieving the same requirement.

Wijmo Gridview : Restoring Group States at Client Side

In my previous blog, I discussed how you can save the open group states when you have enabled server-side editing, as group states are lost when postback occurs. But, sometimes, you may have a situation where you need to refresh or redraw the grid at client side. At that time, you would face the same issue i.e. state of the opened groups are not retained.

Wijmo GridView : Updating Database From Client Side

Many a times you wish to show data in a GridView and allow users to edit the data and save it. It used to be a cumbersome and time-consuming task where you had to define template columns and then manually get the updated values.

Handling Client Side Key events of Wijmo Gridview

Wijmo Gridview does not have any keyboard events but sometimes, we may have a requirement where we need to perform any action on the basis of the key pressed by the end user. In this blog, we will see how we can fulfill the above requirement and can handle the key events of Wijmo Gridview.

Exporting Wijmo GridView to Excel

Wijmo GridView does not provide a method to export excel file. This blog explains a simple approach to save Wijmo GridView in a excel file. You can use the same approach for C1WebUI GridView as well.

Runtime Data Operations in Wijmo GridView

C1GridView has in-built features such as sorting, filtering, paging and grouping. These are extremely helpful for developers as it saves a lot time for them without having to implement it through code.

Pivot C1GridView

The C1GridView displays the grid as a table. When a user wants to display grid in a horizontal manner (vertical rows), there is no property in the grid to flip the grid.

JavaScript delete confirmation with the C1 ASP.NET GridView

The ComponentOne ASP.NET GridView allows you to add a Delete button to remove a record from the DataTable. However there isn't a native way to add a confirmation that you really want the record deleted. It's always best to check for sure when it comes to destructive actions, so I did some spelunking and came up with a way to do it. 1. Add a Template Field column to the grid by using either the property builder, or in the declarative code of your .aspx page. 2. Go into source view and add an ItemTemplate, then an asp:ImageButton.

GridView Extravaganza!

This week I gave a webcast on our own GridView for ASP.NET AJAX and all of the cool things you can do with it. Check out the video here:

Epic AdventureWorks Part 3 - The Web App

This article is the third of a four part series: Epic AdventureWorks Part 1 - The Blueprints Epic AdventureWorks Part 2 - The Model Epic AdventureWorks Part 3 - The Web App Epic AdventureWorks Part 4 - The Style Check out the AdventureWorks ASP.NET Sample ASP.NET app online. Now that we designed the blueprints and built an object model, its time to start to develop a website. I am going to create an ASP.NET 3.5 website project. I want to take advantage of the model I built with the Entity Framework and use LINQ to easily query the model. These two technologies will help me rapidly develop against this otherwise daunting database. To build a website I usually start with the most critical piece first and work down the chain from there. So in my opinion the most important part of a retail company's website is the product catalog. Some people might argue that it is the shopping cart, but the way I see it, no one is going to buy until they know what the product is. So we will assume there is a direct sales team to take orders until our shopping cart is launched. General practices Before we dig into code, here are a few of general practices I use when doing ASP.NET web development. Follow MVC Patterns (even in WebForms) I have been following this pattern subconsciously for years of WebForms development. It just makes sense. So how do I follow the pattern in WebForms? In a nutshell: loosely. I like to seperate all of my UI "chunks" or "modules" into UserControls and create Classes for them to inherit. I usually make the Classes more general like "ProductModule" and many UserControls inherit from it to take advantage of common data models and params. I then organize my UserControls into folders that group them logically. For this project I create "Products" and "Order" to section the modules into product catalog UI and shopping cart UI. In the root UserControls folder I add common UI elements like Header and Footer. Take Advantage of ASP.NET UI Features I like to utilize App_Themes, Skins and MasterPages to make UI development faster and more efficient. App_Themes are a nice way to stay organized and adding Skins to them helps to apply theme and behavior settings across the entire app. MasterPages are probably my favorite feature added in ASP.NET 2.0 and have saved me countless hours of work. I am also a fan of using nested MasterPages to really build rich UI templates across a large web app, but we will just use on in this project. Import a CSS Layout Framework Once of the biggest frustrations in web design is layout. I consider myself a CSS guru and still get stumped on some complex layout issues. If you want to spend your time actually styling things with CSS and not trying to hack your layout to work in all browsers then this practice is for you. In this app (and all my work) I chose to use YUI stylesheets including reset, base and grids. Reset will basically reset style on every html element to create a clean pallete across all browsers. Base (which requires reset) will give consistent styling to all html elements. Grids (which requires reset and base) creates a layout framework for you to build pretty much any type of column layout you need. It gets a little crazy when writing the markup, so they also provide a grid builder to make things easier. I can't recommend this practice enough. It has saved me so much time and prevented so many headaches. Use 3rd Party Controls As much as I would love to think I can build every aspect of my projects alone, it just isn't reality. I know it sounds like hot air coming from me, but using 3rd party controls is a great way to shift focus from the tedious code to the fun stuff. I have already wasted too many precious keystrokes writing sort algorithms and browser hacks. I had to draw the line and let the pro's do it for me. One of the most productive things you can do as a developer is know when to delegate work. For me, that delegation includes using custom controls that usually have more functionality than I would ever care to write for myself. Seriously, who really wants to sit down and write a PDF writer? No offense if that kind of programming is your cup of tea, but it sure isn't mine. I want to build the app, get it out the door and watch people use it. Then I can spend my time refining the UX and not trying to fix bugs in the chart control I was to stubborn to purchase. That's right, you need to think of how much effort you are going to spend supporting the custom controls you build on your own, not just how long it would take to develop. The next time you go to develop some controls I would ponder how valuable your time is and whether it's worth your keystrokes. I'm sure you get the picture, so I will stop with the C1 fanboy stuff. Let's Dev! Build the Navigation The AdventureWorks database products are organized by Category and SubCategory. So the first thing to do is make a few methods to build these lists.  Let's start with one we need to make the main menu. For the menu we will need a list of the the base categories in the database. So here is what that method would look like using LINQ against my Entity Model. public static List GetMainCategories(){ var cats = from cat in Common.DataEntities.ProductCategory select cat; return cats.ToList();}