Build 20100207 fixes alignment of header's and table cell's width of CoolGridView
41 Comments Published by John Eric Sobrepena on Feb 7, 2010
A new build release (Build 20100207) of CoolControls is now available at codeplex. Build 20100207 contains the following changes:
- COLGROUP and COL is back! These are generated for the header, table content and footer. This feature can align the header and table cell's width of CoolGridView.
- AllowResizeColumn property is added to CoolGridView. Set this property to true to enable user to resize the columnns manually, set it to false to disable. The default value of this property if true.
Labels: ASP.NET 2.0, CoolControls, CoolGridView, GridView
COLGROUP and COL is back! This look like a regregression to me. There will be a workaround for those using diplay:none css properties?
Dario, Yes, there will be a property that will be introduced to CoolGridView to hide even the COL element. I will be posting on this soon.
Good to known.
Many thanks
it's a great object, unfortunnely i need to use it inside a container and has a problem.
if my .aspx has a master page and i put this object inside the asp:content then gives me an error.
i'm not a great developer and i can't find a solution..
and escuse my english please.
Thaks in advance
Hi Raul Mata, I tried it and it worked fine for me. Could you tell me the exact error you are getting? You can post it here.
I am using it and it works great. Saved me a lot of time and headaches, keep up the good work its excellent.
How can I have the column width auto adjust the the data row's contents?
This is not going well with resolution 1280 * 768 here it is showing empty space between scroll and columns.
can please give me any suggestion for this.......
Hi Anonymouse, can you provide the browser you are using? Is it IE 6, IE 7, IE 8, Firefox 3.6, Firefox 3.1 or Chrome 4? Email me a screen shot. That will be helpful.
Hi John,
Is there a way to specify an exact width to a specific column?
This function seems not work?
Am I missing anything?
Hi,
how i can attach event pageindexchanging inside this gridiview controls, so we no need to delegate event in page init (event sorting too)
Hi John,
Great control, small issue:
The table width of an empty data template or text is 0 meaning only the first character is shown.
Excellent Control John, works great in runtime, however during design time it will not render the control.
Error is:
There was an error rendering the control.
Object reference not set to an instance of an object.
Any hints?
Doc
Hi Dagdason, Can you tell me the Visual Studio version and the OS version you are using. Send me a sample project showing the issue, that will be a great help for me to help you out. Thanks for using the control :-)
VS 2008, XP SP 3 (Soon to be Win 7)
Do you have an email address to forward code and screen prints?
My gmail is dagdason@gmail.com
Update -
So John - I played with the component a bit and found the following to be true.
First try -
I created a new web project, added references for Ajax and CoolControls.
On default page I added ScriptManager, then UpdatePanel and CoolGridView controls. CoolGridView rendered perfectly in design mode.
second try -
Created new web project and added references for Ajax and Cool Controls
Created Master Page
Created Default Page (Child to Master)
Added ScriptManager, UpdatePanel and CoolGridView to ContentPlaceHolder1 section of Default Page
CoolGridView control would not render
Hope this helps
:D
I cannot move to gridview. I am using Datagrid. Can i integrate your code in my datagrid ? is that easy ?
do let me know
thanks
more...more...
we need more...
Hi,
I want to fix the column, when i scroll the bottom right in the table.. for all browser how can i do. But, i have done with IE. I need other browser, i have used in this,
position:relative;
left:expression(this.offsetParent.scrollLeft);
z-index:1;
Thanks in Advance,
Maniraj
No matter what I do, the header is always a little to the right to the columns. I'm using IE8/Chrome/Firefox.
Many thanks to this! Awesome work!!!!
Does anyone know the trick: in IE6 the header of coolGridView isn't scrolling horizontally as it does in almost all other browsers. Does anyone have a fix for that?
@John Eric Sobrepena: Is this project still in progress? Will you have the time to do some next releases? I would strongly appreciate it. This is just the best thing I found in 2010. Keep it up.
Bye
John,
First, I wanted to thank you for this little gem. When I suddenly had to replace an ancient grid in order for it to work in non-IE browsers, this was my lifeline.
However, I had a little trouble with the embedded resources: I actually subclassed the CoolGridView (to add standard styling and a bit of client-side behaviour) and suddenly the embedded resources threw an error "This is an invalid webresource request".
This, of course, happened because my subclassed CoolWebGrid was in a different assembly from the resources. I solved the problem overriding CoolWebGrid.OnLoad thus:
protected override void OnLoad(System.EventArgs e)
{
String _url;
if (! Page.ClientScript.IsClientScriptIncludeRegistered(this.GetType(), "CoolCore.js"))
{
_url = Page.ClientScript.GetWebResourceUrl(this.GetType().BaseType, "IdeaSparx.CoolControls.Web.CoolCore.js");
Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "CoolCore.js", _url);
}
if (! Page.ClientScript.IsClientScriptIncludeRegistered(this.GetType(), "CoolGridView.js"))
{
_url = Page.ClientScript.GetWebResourceUrl(this.GetType().BaseType, "IdeaSparx.CoolControls.Web.CoolGridView.js");
Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "CoolGridView.js", _url);
}
base.OnLoad(e);
}
I just wanted to put the code here for anyone who has the same problem I did. It's not a bug, so there's nothing to fix in the assembly proper; it's just a gotcha. Also, excuse the messy formatting; I can't format the code with a <code> tag.
Cheers!
John,
Very nice job with this user control! The functionality was exactly what I was looking for in the GridView and not finding. I will probably use this object throughout our entire web project! Thanks!
Jason
Hello!
Is there any possibility to set column width in percent?
Thank you so much for sharing this cool control John!
I have a little problem though, the postback caused the gridview back to the original position, even after I set:
MaintainScrollPositionOnPostback="true", any idea how to keep current position after postback?
Thank you so much again for your excellent job!
Melania
This is a great solution to my problem. Thank you very much. The only question I would have is if it's going to implement fixed Columns. So you could add a parameter of number columns fixed and that number from the left would be fixed.
I am really enjoying he speed of this control. thank you again.
Jason
One problem, I've got a tab panel with two tabs.
The scrollable grid view is on one of the tabs. If the tab with the gridview is not the first tab, then scrollable part does not work. If you tab to the other tab and back, then the scroll does not work.
Any suggestions??
chuck
I get the same result as MrWoodChuck, having multiple panels and the control not rendering in design mode. Any suggestions? Otherwise very useful control.
Great Tools! Thanks,
Just simply great work, many thanks sir!
Does this control (CoolGridView) not work with part of a project that contains a site.master? It seems when I add it to a page that has a master page, it fails.
You are a generous and beautiful person for creating and sharing this control. Brand new to .Net, I am enjoying the learning experience, though the experience has been mixed with frustrations--like getting fixed column widths and vertical scrolling with the standard GridView. Your CoolGrid control has saved my sanity and allowed me to continue enjoying .Net programming.
Hi John,
The plugin is great and exactly what I want but I'm having trouble getting the compnenet to register in a server 64 bit 2008 environment. I was wondering if you could poiunt me in the right direction. When I'm registering it using regserv I'm getting a entry point error.
Thanks David
Hi David, you can download the source code from CodePlex and compile it for 64-bit.
Hi John,
Thanks for the quick reply I'll download it and give it a bash. The plugin is great by the way
Thanks again David
Hey John congrats for such a great control!
I want to know how to render the control in design mode using master page.
The error I'm having: There was an error rendering the control. Object reference not set to an instance of an object.
but it works perfect in runtime.
First try - I created a new web project, added references for Ajax and CoolControls.
On default page I added ScriptManager, then UpdatePanel and CoolGridView controls. CoolGridView rendered perfectly in design mode.
second try - Created new web project and added references for Ajax and Cool Controls Created Master Page Created Default Page (Child to Master) Added ScriptManager, UpdatePanel and CoolGridView to ContentPlaceHolder1 section of Default Page CoolGridView control would not render
Thanks!
Greetings,
Any command reference to fix scroll on first column of coolgridview? Thanks in advance.
I love this control. Awesome job! I'm toggling AutoGenerateEditButton on/off with another button near the view, but every time I go there and back, another column from left reverts to default width, and the programmed widths of all columns seem to slide to their neighboring column where they don't belong. If there's not an easier answer, I guess I could use two CGV's, one with edit and one without and just toggle to hide one or the other.
Hi John,
Everything else working fine. but how come my Linkbutton stopped triggering after apply your control.. is it possible or am i making any mistake
please help!!
otherwise your control is the best so far
Sir please help me.. my boss is after me..
after applying your coolGridview "asp:LinkButton" under "" not working..
please please reply me quickly
Sir please help me.. my boss is after me..
after applying your coolGridview "asp:LinkButton" under "ItemTemplate" not working..
please please reply me quickly