Hello..
I am using ulrtrawebgrid with standard configuration. I am using OutlookGroupBy with multiple groupings, so often the grid is pushed to the right, and the right side of the grid is hidden under the frame.
this is happening because frame has "overflow:hidden" HARDCODED for some reason?!
i've been trying to change this style property to "overflow:visible" .. i've wasted an hour going through all properties of grid.DisplayLayout.FrameStyle but i am not seeing a way to change it.
I know that i can hard code frame width, but i do not want to do that because displayed columns are configurable by user so there is no way to predict grid with.
i could do some nasty hack like adding up all visible column widths and setting the Frame width to that.. but why should i need to do that?
why does the grid come in a frame with overflow:hidden ? is there any way i could make it a normal grid so that it stretches around the inner grid?
I really don't have a answer for your regarding why it is doing that but I will give you a little bit of advise that has saved me countless hours of debugging...
Anytime I come across a situtation with "anyones" controls due to CSS I override it instead of trying to figure out the "Why" of what they are doing.
Download IE Developer Toolbar (if you do not already have it)http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en
Open your site up and go Tools->Toolbars->Explorer Bar->IE Developer ToolbarClick Find->Select Element by ClickClick on the html area that is causing you to pull your hair out and and look at what class file it is using.
Goto your css file and or the top of your page and add.overflow: auto !important;
the !imporant will cause the css to read yours instead of the controls this works on any object that uses css. if they are not using a css file then find the id and use #idname instead.
I know it doesn't help you with trying to understand what is going on with the overflow but in my experience I have found it is better just to say ok and override them.
thanks for your reply.
yeah i've been using ie developer since it came out. personally i prefer FF developer addons but they will all do the job.
i already tried overring the CSS with !important flag but a. that didn't work for me, and b. its a terrible hack that i would try to avoid since i am using this gird in so many places.
it is just not good development practice to add such overrides, since other developers will come after me and they will have a tough time figuring out this is needed. etc etc.
i would really like to find a way to do this using grid initialization properties so i can add to the base class and never have to return to this issue again.
Well I use pipe (can be anything) because I put more than the id of the control inside the id and use js to parse the id for particular information (there is a whole other reason that I cannot go into on a public site for this as well)
I know .NET does a lot of this stuff for you but as with anything it comes with a price so for example I know I can drop a scriptmanager on a page and wrap content in a update panel and *BOOM* I have a ajax page... But at what cost I can create a simple ajax request (json) and build my own xml/innerhtml functions with about 10% of the footprint that the script manager is doing and reduce my overhead down to nothing so what it really comes down to is personal preference they all do the same thing.
I do use.ClientID for a most things but sometimes when using supporting JS files it doesn't always make sense to do that if I am injecting and/or have a script tag in the page then I use clientid just depends on what i am doing and what type of security I am dealing with.
However, I would have to agree with you on one point though and that would be Commerical Controls should follow a standard across the board because you use one control and it does things one way and you go to another control and things are done 180 degrees the other way. It can all be very annoying.
hmm i see. so there is a reason to that custom ID madness :)
i agree about update panels. they are very evil.
so you seem to be very knowlegeable in web and infragistics. maybe you could offer some advice regarding custom sort of the grid?
I recently even upgraded to infra 8.2 in hopes to get around this issue.. I've also tried to reverse engineer their code to get some answers but there is a lot of it and it wasn't clear how the regular sort is performed.
my problem is that i am binding the grid to a collection of custom objects. It is a non standard approach i agree, but it offers some other benefits and i would like to keep it that way. Lets say an object in my array has a TradeDate property. that property type is not DateTime, but Object because i am inheriting it from a common base type that offers additional functionality. As a result, i had to override IFormattable, IConvertible, IComparable interfaces to make my collection work correctly with the rest of .net framework. Infragistics however isnt playing by regular rules it seems because it doesn't seem to be using my IComparable implementation to do the sort.. (hmm never tested this claim)
The problem is that when i sort by date, it behaves in a weird way, it appears to be working for half the table, than resetting and working again. so it will sort april 1 - May 5 in first half of rows, and than go from april 12 - may 10 in latter half.
i thought i was being slick by creating my own sort mechanism which would happen on my collection before binding to the grid, and that works, BUT when i added OutlookGroupBy the grid than re-sorts the order. so the sort gets lost in all subtables in outlook mode. so it appears i cant use my own sort.
i've spent quite a bit of time trying to figure this out.. it would realy suck if the only solution was to convert my array to a datatable right before binding to the grid :(
Yes always a method to my madness :)
The web grid should use a IComparable interface with no problems, I have an application that is extremly date intensive right now and implements the same type logic you are talking about and is working fine.
I am however using the latest build of IG which might have a difference, i can put 8.2 on another machine and test it out, sounds like something is just getting lost somewhere.
Regarding being slick, yes you are I do stuff like that everywhere for example I don't let "any" control dictate paging but rather use ROWCOUNT etc. inside sql to handle (less overhead) creating custom business logic layers that handle this stuff for you is the way to go just sometimes a pain to get it all hooked up but once you do the gains you get in the long end when having to add new logic etc. far out weigh the frustration.
I will install 8.2 on a test server and play with this over the weekend it sounds like it is loosing your interfaces somewhere.
woah!
that is great that it works for you!
ok so maybe i am still not doing something correctly with my implementation because I just upgraded from 6.2 to 8.2 to see if maybe something was up with infragistics.
here is my implementation:
http://rafb.net/p/Hrw4oK11.html
does it look OK to you?
What i do, is use that base type to serve as base to all date parameters such as:
public class TradeDate : QueryDateTimeParameter {...}
and than, have a Position object:
public class PortfolioPosition { public TradeDate Date { get; set; } public InterestParameter Interest {get; set;} etc...}
than finally i use a List<PortfolioPosition> myPositions which is bound to the grid.
So maybe somewhere along the chain my implementation is a bit more different and less standard than yours?
I am using version 8.2 and I also had some problems in sorting.
After analysis I found that that different kind of sorting mechanisam is used for different case like:
(1) Load on Demand =XML
(2) Client side sort/server side sort
So you must consider your grid’s settings while implementing sort.
The code you provided seems ok. Have you tried to implement custom sort?
What is the current implementation for sorting which is giving weird results as you mentioned?
Apart from this a quick question: What if you use PositionsGrid.ClientID instead of using UniqueID and replacing?
Could you put this sorting question on new thread. There may be many people who have experienced such problem and could answer.
Also if you could attach a sample then I would like to try on it.
I am using server sort only.
PositionsGrid.Bands[0].SortedColumns.Add( myColumn ); myColumn.SortIndicator = SortIndicator.Ascending;
by Custom Sort do you mean DisplayLayout.SortImplementation? i found only 1 really crappy example of how to use that on infragistics documentation and it doesn't get triggered for me. ClientID renders id with _'s in control tree. infragistics uses x's