0
votes

Yeah, I have the unfortunate situation of having to go into a project that makes use of ext.net.

There is a GridPanel with several columns, a couple of these are bound to datetime properties like this:

<ext:DateColumn Header="Started time" DataIndex="DateStarted" Format="yyyy-MM-dd HH:mm:ss" />

Now, I ned to run an extension method, ToUniversalTime(), on the property DateStarted.

It seems I can not change DataIndex="DateStarted" to DataIndex="DateStarted.ToUniversalTime()"

2
why not call the method when filling the data source? - Mahmoud Darwish
"Yeah, I have the unfortunate situation of having to go into a project that makes use of ext.net."... more feedback regarding that comment would be helpful. - geoffrey.mcgill
Meywd that cannot be done. The datasource is a list of objects. It's in the component you work with that you specify what information you want to show in that component. To specify an extension method, which you can do with ordinary asp.net controls, you can't do with ext.net. - Johan
geoffery.mcgill, everything I've seen about ext.net is horrible. Just start with the fact it does not integrate with visual studio. Some components properties does not work so you have to do some parts, height, width, does not work fully so you have to specify that in style sheets. Then we have the fact that it's not backwards compatible and you have to keep it up to date for it not to look to bad in new browser versions, that is not fun with a crap product that is not backwards compatible. To bad I'm stuck with this shit. - Johan
geoffery, a product that is not backwards compatible = a lot of work when you have to update that product in your applications... - Johan

2 Answers

1
votes

Forgot about this one.

I got an answer from Vladimir Ext.NET - Dev Team, support for this is to be added in version 2.3.

0
votes

You can use the Renderer tag on your column

    <ext:DateColumn Header="Started time" DataIndex="DateStarted" Format="yyyy-MM-dd HH:mm:ss" >
        <Renderer Fn="myRenderer" />
    </ext:DateColumn >

Call a Direct Method or implement your extension method in JavaScript

    var myRenderer = function (value, metadata, record, rowIndex, colIndex, store) {
            return stuff here;
        };