DevExpress ASPxGrid

Posts   
1  /  2
 
    
JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 08-Mar-2005 01:34:10   

All,

I gave up on the Janus grid. It was pretty good in a lot of ways, but their on-line help was non-existent and I had to run to the forum for help constantly. They couldn't answer all my questions, like why does the grid columns act funky sometimes when I'm resizing them?

Now I'm trying ASPxGrid. First thing I see that I really like is that there's a real user's guide and I've already been able to figure out some things from it. What a refreshing change. But damn this grid seems slow!

Anyone here have quick answers to the following:

1) Add a calculated column (I guess I will be using batch mode - so this will require writing some Javascript?)

2) Make "new" row appear in grid. I know I can click on the navigation bar button to insert a row, but what about like Janus does, the way Access does it, always have the extra row at the bottom with an "*" in the row header.

3) Make a drop-down list multi-column. If not, easy way to change value displayed in cell to be the key field even when list is showing a different field (uh, more Javascript?).

I've searched their KB for these topics but have found nothing.

Jim

netclectic avatar
netclectic
User
Posts: 255
Joined: 28-Jan-2004
# Posted on: 08-Mar-2005 10:42:25   

ASPxGrid is very powerful but not intuitive in the slightest. The manual is there for a reason because it's almost impossible to work out how to do anything by yourself.

I don't have specific answers to your questions, we use lots of custom controls and went down the route of using templates to use our existing custom controls within the grid. Have you looked at the demos? I'm sure there is a demo for this.

We also found their email support to be pretty good when we were struggling.

JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 08-Mar-2005 20:34:05   

Yeah, you're not kidding about the "not intuitive" part. The only thing I can say in their defense is, every one of these custom controls seems to have some bizarre angle to the design of the API. It was fun to figure out how to put items in a drop-down list in a cell!

I don't see anything in their demos to answer my questions.

jtgooding
User
Posts: 126
Joined: 26-Apr-2004
# Posted on: 08-Mar-2005 21:04:21   

1) Can you specify what you mean by 'calculated column' there is a couple of definitions, i.e. a summary column vs a custom unbound data column.

2) To get a new row to show up in the page load use: ASPxGrid1.NewRow(null, true)

3) You need to use a LookupEdit control not a combobox

That should get you started =)

John

JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 08-Mar-2005 21:53:41   

jtgooding wrote:

3) You need to use a LookupEdit control not a combobox

Well yeah, I got that part figured out, I was just agreeing with DevilDog it wasn't very intuitive.

1) Can you specify what you mean by 'calculated column' there is a couple of definitions, i.e. a summary column vs a custom unbound data column.

I mean a column for which every cell is the result of a calculation of other cells in the same row.

I just checked out FarPoint. More expensive. Still no multi-column dropdown. You have to double-click in a cell to make the drop-down arrow appear! Geesh.....

I'm going to check out Infragistics, despite all the warnings about it. At least they have the multi-column dropdown. It's been more than 24 hours since I sent my email to DevExpress and still they haven't replied.... rage

jtgooding
User
Posts: 126
Joined: 26-Apr-2004
# Posted on: 08-Mar-2005 22:46:36   

They usually respond within 24 hours to an email, but the best option is their newsgroups: news.devexpress.com.

I believe what you want is a TemplateColumn in this case, I don't use the ASP stuff very often anymore but I use the WinForm stuff extensively, once you understand the interfaces everything implements then it becomes very easy to use all their components.

John

JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 08-Mar-2005 23:36:22   

They usually respond within 24 hours to an email, but the best option is their newsgroups: news.devexpress.com.

Thanks for pointing that out; I went to that page before but in my haste I clicked on the forum link instead of the news link.

JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 09-Mar-2005 02:15:55   

Ha ha ha. I downloaded the Infragistics trial. After all, they do have the multi-column dropdown I'm looking for. Plus all the Winforms components that I'll need next week (Farpoint doesn't).

Immediately I find a lot of help topics in the manual that match directly to my needs, like "Add Unbound/Computed Columns to the Grid" with subtopic "Calculated Column". Perfect!

When I compile I get an error message about the license file. I tried deleting it, but then the component throws a nasty exception at runtime with no helpful info. Upon restoring the license file, I can't shake the exception.

 "External component has thrown an exception.\r\r
System.Web.HttpException: External component has thrown an exception. ---> 
System.Web.HttpCompileException: External component has thrown an exception.\r\n   
at System.Web.Compilation.BaseCompiler.ThrowIfCompilerErrors(CompilerResults results, CodeDomProvider codeProvider, CodeCompileUnit sourceData, String sourceFile, String sourceString)\r\n   
at System.Web.Compilation.BaseCompiler.GetCompiledType()\r\n   
at System.Web.Compilation.PageCompiler.CompilePageType(PageParser pageParser)\r\n   at 
System.Web.UI.PageParser.CompileIntoType()\r\n   at 
System.Web.UI.TemplateParser.GetParserCacheItemThroughCompilation()\r\n   --- 
End of inner exception stack trace ---\r\n   
at System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean fCreateIfNotFound)\r\n   
at System.Web.UI.TemplateParser.GetParserCacheItem()\r\n   
at System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String virtualPath, String inputFile, HttpContext context)\r\n   
at System.Web.UI.TemplateControlParser.GetCompiledInstance(String virtualPath, String inputFile, HttpContext context)\r\n   
at System.Web.UI.PageParser.GetCompiledPageInstanceInternal(String virtualPath, String inputFile, HttpContext context)\r\n   
at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String path)\r\n   
at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, String path, String pathTranslated, Boolean useAppConfig)\r\n   
at System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()\r\n   
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)"

I'm off to the support forums, but....any Infragistics experts out there?

JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 09-Mar-2005 04:56:41   

Ah, I must set the CopyLocal flag to true or the Infragistic assemblies don't go into \bin.

http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.Aspx?ArticleID=1932

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39801
Joined: 17-Aug-2003
# Posted on: 09-Mar-2005 09:23:42   

Yes, never copy infragistics controls locally as that will make them fail (beyond me why). What can I say, ... Infragistics controls are by far the most slowest controls I've ever seen. Their webgrid (2004.1) is also producing so much HTML... a grid with 30 rows and 20 columns resulted in over 1MB of html...

I'm not a fan of infragistics, perhaps you shouldn't listen to me in this wink . I can say that I've kicked out all the Infragistics grids in favor of janus grids and the result was great. But that's winforms, in webforms it's different I guess (reading your problems with the webgrid of janus).

I never had any problems with janus support. Their documentation is not that great, but I personally found the grids and other controls rather straightforward.

Frans Bouma | Lead developer LLBLGen Pro
Posts: 497
Joined: 08-Apr-2004
# Posted on: 09-Mar-2005 10:46:42   

I can vouch for everything Otis says about infragistics - very unimpressed !!

JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 09-Mar-2005 14:59:16   

Well I guess I could use Janus Winforms and Infragistics for web. I really want a solution from one vendor, though. All these products have problems. It's no different than when I attempted to review them 11 years ago (in their plain C versions), and I never even wrote the article because in my opinion they were all so pathetic. That was FarPoint, Protoview (one ancestor of Infragistics), and a bunch of vendors who are no longer in business (gee, I wonder why).

Crap...

alexdresko
User
Posts: 336
Joined: 08-Jun-2004
# Posted on: 09-Mar-2005 20:49:06   

JimFoye wrote:

Well I guess I could use Janus Winforms and Infragistics for web. I really want a solution from one vendor, though. All these products have problems. It's no different than when I attempted to review them 11 years ago (in their plain C versions), and I never even wrote the article because in my opinion they were all so pathetic. That was FarPoint, Protoview (one ancestor of Infragistics), and a bunch of vendors who are no longer in business (gee, I wonder why).

Crap...

Perhaps I'm the loner in the group. I've been using Infragistics with all my projects. They really made a lot of progress on the size of the HTML in 2004.3. I believe there is an automatic option now for binary serialization. The new 2005 version is even better. I've got grids with 150 rows on a single page (customer request) with most options (Grouping, sorting, etc..) turned on. It's not super fast.. total page size (excluding external css and javascript) is about 240k. Not unreasonable for the task I need it for as all my users have broadband.

JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 09-Mar-2005 21:01:00   

I'm glad to hear you're having a good experience.

Do you know how do I turn off auto column creation?

I noticed that the header columns will scroll off, I guess that's why we've got to have paging on any grid in ASP.NET. Tell you what, I've got one customer convinced to let me do the front end as a Winforms client and use .NET remoting to pull the data over (of course it must go over HTTP and port 80 - what was the point of ports anyway? but at least it can be binary). That is really cool. I'm going to try to push that more with my customers, unless they need to be on the WWW, because I think the architecture for doing WWW apps (your favorite combination of different server and client models on top of HTML on top of HTTP) is a big giant load of crap. God it really does suck. I hope people aren't doing this 50 years from now. It was never designed for this.

Anyway...I tried this setting UseFixedHeaders to true just to see what it would do, and it made the top 80% of my column headers disappear. HA HA HA, boy that is a useful property, isn't it?

I'm thinking now that using the built-in .NET grid with its goofy Edit/Delete/Update/Cancel buttons is not really much worse than this.

JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 09-Mar-2005 21:55:44   

JimFoye wrote:

Do you know how do I turn off auto column creation?

I think I've answered my own question. From their KB:

 Summary
By default all columns of a data source are added to the grid during a databind operation. In order to remove columns in the datasource that are not to appear on the page, set the Hidden property to true. 

Additional Information
Columns can also be eliminated from a database bound grid by modifiying the select statement for the query or by using a System.Data.DataTable class to construct the exact view of the data that you want.

In Visual Basic:



e.Layout.Bands(0).Columns.FromKey("Salary").Hidden = True 


In C#:



e.Layout.Bands[0].Columns.FromKey("Salary").Hidden = True;


So, let's say I want to see all the columns in design mode, but I'm binding in code (typical when using LLBLGenPro). Hmmm...no columns in designer! How can I change the column captions? Guess I will have to do that in code. This is really wonderful (large truckload of sarcasm intended).

I guess I need to start my own blog, "Why I hate 3rd party controls". rage

netclectic avatar
netclectic
User
Posts: 255
Joined: 28-Jan-2004
# Posted on: 10-Mar-2005 10:25:27   

By default all columns of a data source are added to the grid during a databind operation. In order to remove columns in the datasource that are not to appear on the page, set the Hidden property to true.

Wow! That's so bad. How could they possibly have decided upon that as a default behaviour???

I guess I need to start my own blog, "Why I hate 3rd party controls". rage

I noticed webgridnightmares.com was still available wink

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39801
Joined: 17-Aug-2003
# Posted on: 10-Mar-2005 10:55:37   

netclectic wrote:

By default all columns of a data source are added to the grid during a databind operation. In order to remove columns in the datasource that are not to appear on the page, set the Hidden property to true.

Wow! That's so bad. How could they possibly have decided upon that as a default behaviour???

"For backwards compatibility".

That's the answer I got when I asked them about this. Then I said: "Why don't you offer a setting, to flip this behavior, so I can set it to 'true' and my grid works the way I want it, default is for example false, so users who rely on this keep working code".

Their answer? "If you want to have that, please mail to <emailaddress for feature requests"...

But, as I didn't have a subscription, no way I was going to experience that setting anyway. And I was pretty stunned that they didn't think of that setting in the first place. It's a simple setting, and it could help out developers a lot.

Frans Bouma | Lead developer LLBLGen Pro
alexdresko
User
Posts: 336
Joined: 08-Jun-2004
# Posted on: 10-Mar-2005 16:44:56   

Turning off auto generate columns isn't at all that hard. I can swear there's a property for that. I'll check in a few minutes when I get back to my laptop. It's almost like the standard asp.net grid though.

I think it's pretty nice how it works. I drop a grid on my page. I set the width and height to 0 and the 'table-layout' property to 'auto'. This gets rid of the schtewpid iframe (my preference). Of course, fixed headers won't work like this, but I have verified that fixed headers works. The Infragistics grid has a nice feature that allows you to load the configuration settings from an xml file. I wrote a small utiltity to let me adjust the settings in the VS.NET designer and then use an ASPX page to save the changes to the server. I use that XML file for all of my grids and it contains a setting that prevents the columns from autogenerating. The band/column editor works pretty well from there on out. You can specify the header caption, source column, and column key easily.

I know Infragistics gets a bad rap a lot of times, but I've managed to make it work pretty well. I won a free year subscription for the 2004 suite a little less than a year ago at my local INETA meeting.

I wish it were easier to find a quick piece of code... anyone ever notice that XP's file search doesn't appear to look in the contents of source files?

Answer
User
Posts: 363
Joined: 28-Jun-2004
# Posted on: 10-Mar-2005 19:10:05   

I have a infragistics subscription. They certainly have their problems. There is a an option for turning off auto generated columns. If i remember correctly its located under displaylayout???

Once you learn how to use their stuff, which does take a bit, its not to bad. There new web grids use xml and are much slimmer Otis from my understanding. HOWEVER, i have not personally used it so i cant vouch if the statement is true or not.

For the money, i think you get a lot. A when i have had to email them. They did respond fairly quick. Make sure you read the help files though, it helps ;P

JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 11-Mar-2005 17:28:29   

Answer wrote:

I have a infragistics subscription. They certainly have their problems. There is a an option for turning off auto generated columns. If i remember correctly its located under displaylayout???

Right you are! They must have added this after Frans' subscription expired! You see Frans, you have to get the subscription. You need to go to a subsrcription model on LLBLGenPro and make us all fork up money every year to even get on this forum and ask something. sunglasses

JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 11-Mar-2005 20:45:33   

I got the webgrid combo (multi-column dropdown list) working inside a cell. When I double-click on the cell the dropdown appears and all the other dropdowns on the HTML page disappear. They reappear when I click off the cell.

webgridnightmares.com opening for business soon....

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39801
Joined: 17-Aug-2003
# Posted on: 13-Mar-2005 12:29:28   

JimFoye wrote:

Answer wrote:

I have a infragistics subscription. They certainly have their problems. There is a an option for turning off auto generated columns. If i remember correctly its located under displaylayout???

Right you are! They must have added this after Frans' subscription expired! You see Frans, you have to get the subscription. You need to go to a subsrcription model on LLBLGenPro and make us all fork up money every year to even get on this forum and ask something. sunglasses

haha smile . I'm really surprised they added it, but it is a great thing to have, that option. Though I'm not sure if I'll ever go back to infragistics. With the control suits I've now at my disposal I'm pretty much set, but then again, I'm not a webdeveloper, so I don't run into the limits of the suits. On the other hand, I'm very pragmatic, so if some grid doesn't do what I want, but can do something else which is almost as good I'll settle for that (most of the time wink )

Frans Bouma | Lead developer LLBLGen Pro
JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 13-Mar-2005 17:14:21   

I've been looking now at pure Javascript grids. Of course a lot of what's happening with these ASP.NET grids is Javascript, so it's not a real good distinction. A good example is at http://www.activewidgets.com/. It doesn't support editing, though (supposed to be soon). And I have to "hook it up" myself to data on the server side. I'm also starting to see how these folks accomplish some of their tricks. If I had the time, I think I would enjoy doing my own grid. But I've never wanted to be in the software business. I enjoy taking other people's components and using them in my applications.

At this point I'm actually thinking about going back to Janus, because I abandoned it in search of something better. I found different, but not better. I could do something better, I think, but I don't have the time for that.

omar avatar
omar
User
Posts: 569
Joined: 15-Oct-2004
# Posted on: 13-Mar-2005 17:53:45   

Did you guys try WebGrid from http://www.intersoftpt.com/Default.aspx?redirect=WebGrid/Overview.aspx

their grid looks greet but they are way expensive compared to the rest.

I am using DevExpress suite for my winForms development and I am very happy with it (except for the lack of Right-To-Left support). DevExpress grid plays very nicly with Entity collections and entity objects.

I am still looking around for a Web controls suite and DevExpress is still on top of my list..

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39801
Joined: 17-Aug-2003
# Posted on: 13-Mar-2005 18:15:45   

~~I also see the r.a.d. webcontrols mentioned a lot. Never used them, but perhaps worth a try.

http://www.mcmscontrols.com/~~ Forget them, they don't have a grid! smile

Frans Bouma | Lead developer LLBLGen Pro
1  /  2