This is a migrated thread and some comments may be shown as answers.

Excel like control in the datagrid

3 Answers 101 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Colm
Top achievements
Rank 1
Colm asked on 06 Aug 2010, 02:57 PM
Our requirement is pretty simple. We want users to be able to manually enter some text on a table/datagrid/spreadsheet object. In addition, they will drag drop some data from a treeView that will populate cells with their contents which is actually fetched from a data source. Finally, they need to be able to format individual cells to change text, background colour etc.

I spotted a post in your asp.net section:
http://www.telerik.com/community/code-library/aspnet-ajax/grid/excel-like-radgrid.aspx

This shows using the grid in a similiar fashion to an excel interface. Maybe this is possible to do in silverlight?


Using your libraries, how could this be best achieved?

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 09 Aug 2010, 06:33 AM
Hi,

 I've made quick application to illustrate how to style quickly RadGridView to look  similar to Excel. You can check the attached screenshot and application for reference. 

Greetings,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Colm
Top achievements
Rank 1
answered on 11 Aug 2010, 12:09 PM
Hi,
That's a great and very simple way of making the grid look like an excel spreadsheet. We're trying to move from a winforms solution using farpoint spreadsheet, so with some tweaks, this will allow us to keep look and feel. There's still a few features that we need to sort though.

I've attached a screenshot of what I'm trying to do with the datagrid:
* The user enters some static text at runtime. You can see this in columns A and B.
* The user drags some dynamic data onto the spreadsheet from a treeview in another control, as shown in columns C and D. This contains the connection info for a slow data server that hosts the data we will wish to display when we press a query button. The placeholder DYNAMIC_TAG is being used to show the startign point for the data dragged. When we press the button, the area highlighted in blue will populate with the data.

Is there a way to bind the datagrid to datasource(s) but offset the starting cell to display the data? In the example shown, we need to show data beginning at C4, not A1.

Proposed Solution:
We use a coordinate reference system for each cell and it's contents. We then create a single datasource for the spreadsheet that is databound and shown at runtime.

Can you advise if this is the best solution or is there something we're missing?

Cheer,s
Colm
0
Vlad
Telerik team
answered on 17 Aug 2010, 06:45 AM
Hello Colm,

 There will be no problem to bind the the grid and change the data runtime however the entire logic for how (and from where) the data are bound should be inside your view-model. RadGridView should not know anything about your business logic. 

Kind regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Colm
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Colm
Top achievements
Rank 1
Share this question
or