alabamavasup.blogg.se

Microsoft webmatrix 3
Microsoft webmatrix 3





defaultSort : "column1", canPage : false is just as valid as canPage : false, defaultSort : "column1". For example, you can decide that you do not want paging enabled, but you want to specify the default column for sorting. It doesn't matter what order they are passed in, so long as source is first. If you want to pass anything other than the default values, you need to pass the the argument name and parameter value into the constructor in the following manner - argumentname : value and each one needs to be separated by a comma. All other arguments are optional, which means they have default values and do not need to be specified when creating a grid. This can be any IEnumerable but most often it will be the results of a database query. The first argument, source is not optional. string sortDirectionFieldNameĪ custom value to replace the default querystring "sortdir" field string sortFieldNameĪ custom value to replace the default querystring "sort" field string selectionFieldNameĪ custom value to replace the default querystring "row" field string pageFieldNameĪ custom value to replace the default querystring "page" field string fieldNamePrefixĪ value which prefixes the default querystring fields The id of the containing element for Ajax paging and sorting support If this is true (it is by default) the grid can be sorted If this is true (it is by default) the grid can be paged The column that you want to have the grid sorted on by default The values that you want to appear as column headers. The main constructor (method called to create a WebGrid object) takes a number of arguments (mostly optional) as follows: IEnumerable source It has built-in support for paging and sorting (although a bug in the Beta 1 prevents you sorting on null DateTime values), and also offers access to a number of other formatting and design configurations. The WebGrid helper is designed for rendering data taken from a database or provided via some other means.







Microsoft webmatrix 3