Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Template Column Control in code, Always AllowEdit in Cell, Minimum styles
posted

Platform:  SL4, VS2010, XamGrid v10.3
Business Scenario: User clicks "Upload Excel"  button and selects an Excel file with over 1500 rows of data (Item Id, Qty columns). We need to display the entire data, without paging and no Grid scrollbar. The grid will contain 3 columns, ID, Qty and a UnboundColumn column with ItemTemplate button "REMOVE" to remove the current row from the Grid.

We are currently evaluating XamGrid and are stuck with the following 3 requirements:

  1. Template Column Control in Code behind: Depending on uploaded data, we would need to validate the Item list and disable the Remove button. But it seems due to virtualization and inherent Silverlight limitations, there is no way to directly access the control in code behind (in a for each loop over the Grid rows or DataItems)? 
  2. Always Edit mode for Cells: It seems v10.3 doesnot have a property that allows the Cells to be in always edit mode? So is there a workaround or we have to use the TextBox control in the item template to enable Always Edit functionality?
  3. Minimum Styles: As it is evident, we need very basic UI to ensure high responsiveness. So cell focus colors and mouse over/out animations are simply not desirable. We went through customising the Default.xaml style provided in the installation folder and it contains around 4000 lines of Xaml. We need just the basic grid for this particular page, hence what would be the most performant way of minimising the advanced UI functionalities that XamGrid provides? We wont be needing Filter, Sort, Column Chooser, Gradient Headers, Active Row, Active Cell highlighting, nothing.

Getting the upload done quickly and responsively is the sole motive of adopting XamGrid. The default DataGrid is crashing on IE and most other browsers when bound with the ObservableCollection of uploaded items.

Any help would be appreciated and would assist us in adopting the XamGrid as our SL Grid across our LOB app.

Parents
No Data
Reply
  • 21382
    posted

    1) If you were going to change the Visibility it would probably be easier to put a ValueConverter on the buttons Visibilty and if the value of your data object is whatever it needs to be, having the value converter do the work.

     

    2) In v11.2 we allowed some columns to always be in edit mode, (ComboBox column, Date Column, Checkbox) but in general the columns will only show the editor once the grid is put into edit mode.  That being said, off the Editing setting object is an option to have the cell go into edit mode as soon as the cell is active, so that would get you partially there.

     

    3) You can modify the associated cell style like you would modify any other style.  You can remove the VisualStates, and probably everything down to the ContentPresenter.   

Children
No Data