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

Extending the GridView with custom states

1 Answer 38 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Damon
Top achievements
Rank 1
Damon asked on 16 Mar 2011, 04:46 PM
Hi,

We have the following requirements and I was wondering how easy to meet them using your GridView.

1. When the bound collection is empty a watermark row should be displayed. Therefore we always have a minimum of 1 row.
2. A right click menu is available / enabled on actual rows (not the watermark one) only for inserting and deleting items.
3. Each row will hold states Normal, Error and Saving. We like the edit symbol that appears in the left hand side and would like to display a saving image here when our row is in that state.

I am considering managing the logic for this watermark row in the view model, changing the state once the user has edited it and using this state in the CanExecute method to enabled / disable each bound command

For the saving image I'm considering a custom column displaying an image for each state; but this would mean removing your editing symbol.

Is there a better approach for this using the GridView?

Thanks,

Damon

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 16 Mar 2011, 04:58 PM
Hi Damon,

You may take a look at this blog post that illustrates a similar scenario to yours. Considering the second requirement, you may easily use the RadContextMenu. You may refer to our demos.
As for you last requirement, you indeed may create a separate column displaying images for each state if you require to. The edit-sign that you are referring to is in the firstly column that is generally named row indicator. It still be there unless explicitly removing it by setting RowIndicatorVisibility property to "Collapsed".

 

Best wishes,
Maya
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
GridView
Asked by
Damon
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or