I have a grid .....
The columns appear to fill the complete row in FF but not in IE7 - Please see the attatchments.
thanks for your time.
22 Answers, 1 is accepted
| <%-- Tooltip - http://dotnetslackers.com/JavaScript/re-260035_Rich_Tooltips_With_jQuery.aspx |
| --%> |
| <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<iqMVC1Tooltip.Models.iqCompanyVM>>" %> |
| <%if (false) |
| {%> |
| <script src="../../Scripts/2010.1.309/jquery-1.4.2.min.js" type="text/javascript"></script> |
| <% }%> |
| <h3><%= Html.ActionLink((String)Resources.IQResources.iqClose, "Index", "Tooltips", new { workindex = 0 }, null)%> |
| <br /> |
| <i style="color:Red;"><%=Session["iqResult"]%> </i> </h3> |
| <%= Html.Telerik().Grid(Model) |
| .Name("CompanyGrid") |
| .Columns(columns => |
| { |
| columns.Add(o => o.cCompanyName).Width(185).Title((string)Resources.IQResources.iqCompanyName) |
| .HtmlAttributes(new { @class = "ihover cName ", @tooltip="in there"}); |
| columns.Add(o => o.cContact).Width(185).Title((string)Resources.IQResources.iqCompanyContact); |
| columns.Add(o => o.cEmail).Format(Html.Mailto("{0}", "{0}")).Encoded(false).Width(150); |
| columns.Add(o => o.cCompanyNo).Width(0) |
| .HeaderHtmlAttributes(new { style = "display:none" }) |
| .HtmlAttributes(new { @class = "cId" }); |
| }) |
| .DataBinding(dataBinding => dataBinding.Ajax().Select("_AjaxBindingCompany", "Tooltips")) |
| .Pageable() |
| .Sortable(sort => sort.SortMode(GridSortMode.MultipleColumn)) |
| .Scrollable(scrolling => scrolling.Height(253)) |
| .Filterable() |
| %> |
I think i see how this works, but I need to confirm.
FireFox is not the problem, it is IE 7. I can either ...
1 - increase the width of the last field to equal or exceed the right side of the grid. If it is equal (or close to looking ok), I will NOT get the horizontal scroll bar.
2 - As I remembered from another post, I can add an extra field and just make this hidden, but, give this hidden field ENOUGH width to have it come to very edge of the right side of the Grid so i dont get the horizontal scroll bar, or, exceed the very edge of the right side of the Grid in order TO get the horizontal scroll bar.
3 - Either way, am I correct in assuming that this is the ONLY way to keep the column headings lined up with the columns ?
Is this the current and correct stradegy for handling Telerik Grids running under IE 7 ? Or is there something else I may not no about ?
thanks as always
Instead of using .Width(0) and .HeaderHtmlAttributes(), you should use .Hidden(true). It should provide more consistent results across all browsers.
Regards,
Alex Gyoshev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Hi Atanas,
That advice helped me get rid of a couple of lines of code.
But my question remains, referring to the attatchments,
In IE, to fill in the entire row, the last column must be equal or exceed the width of the grid ?
If this is so, should it be put into the telerik HELP under Grid/Columns ?
Unless there is a better way to handle ?
My last question is, I am trying to create a "blank" column, something like
columns.bound("blank").width(100);
But it tells me that "Blank" is not a field in my ViewModel ? So, I cannot do this when using a Model ?.
thanks as always.
I guess the blank field goes in the ViewModel if I really needed it.
Still wondering about the other questions though.
thanks
You asked a lot of question and I am not sure which ones remained unanswered. Please let me know.
Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Sorry for any confusion.
It seems to me that FireFox is not the problem when the coumns do not fill the width of the grid, it is IE 7.
In IE7, if I have 3 columns that DO NOT have enough width to fill the grid, then the 3 columns appear, but the remainder of the row is blank.
In FireFox, the 3 columns will fill the width of the Grid with the header columns properly aligned and no horizontal scroll bar.
My goal is to have IE respond simillarly.
These 2 coding techniques seem to accomplish that .....
1 - increase the width of the last field to equal or come close to the width of the Grid.
(if it is equal, or close to the total width of the grid, I will NOT get the horizontal scroll bar).
2 - Add an extra field and just make this hidden, and give it enough width to equal or come close to width of the Grid.
So, my question is - am I correct in thinking that these 2 techniques are the ONLY way to fill the row and keep the column headings lined up with the data columns , or is there another, better or more official way of doing this with Telerik for this IE issue ?
Thanks again for your time Atanas
Simply leave one of the columns without a specified width, like this:
.Columns(columns =>{ columns.Bound(o => o.OrderID).Width(100); columns.Bound(o => o.ContactName).Width(200); columns.Bound(o => o.ShipAddress); columns.Bound(o => o.OrderDate).Format("{0:MM/dd/yyyy}").Width(120).Hidden(true);})It should be the one which will expand as much as it is necessary.
I'll see what we can do about this cross-browser inconsistency, thanks for pointing it out.
Sincerely yours,
Alex Gyoshev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
That didnt seem to work ....
| <%= Html.Telerik().Grid(Model) |
| .Name("CompanyGrid") |
| .Columns(columns => |
| { |
| columns.Add(o => o.cCompanyName).Width(185).Title((string)Resources.IqResource.coCompanyName) |
| .HtmlAttributes(new { @class = "ihover cName iqNameTooltip"}); |
| columns.Add(o => o.cContact).Width(185).Title((string)Resources.IqResource.coContact); |
| columns.Add(o => o.cCompanyNo) |
| .HeaderHtmlAttributes(new { style = "display:none" }) |
| .HtmlAttributes(new { @class = "cId", style = "display:none" }); |
| columns.Add(o => o.cContact) |
| .HeaderHtmlAttributes(new { style = "display:none" }) |
| .HtmlAttributes(new { @class = "gId", style = "display:none" }); |
| columns.Add(o => o.cEmail).Format(Html.Mailto("{0}", "{0}")).Encoded(false) |
| .Title(Resources.IqResource.coEmail) |
| .HtmlAttributes(new { @class = "qcId" }); |
| }) |
| .DataBinding(dataBinding => dataBinding.Ajax().Select("_AjaxBindingCompany", "Tooltips")) |
| .Pageable() |
| .Sortable(sort => sort.SortMode(GridSortMode.MultipleColumn)) |
| .Scrollable(scrolling => scrolling.Height(253)) |
| %> |
thanks for your time
Please find attached a sample project that demonstrates the approach. A bug with the hidden columns has also been addressed.
Regards,
Alex Gyoshev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
YES !! It is fixed. Thank you so much.
I noticed that the binary is for MVC2, is there one for MVC1 ? Hope I am not pushing my luck, i just have an MVC1 project I am working on.
Really, thanks for your time
Sure. Attached.
All the best,
Alex Gyoshev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Thanks !
Sorry to be a pest, but I am thinking that I should include the entire "Contents folder" into a folder as 2010.1.323, Or is there no change in the Contents folder for 2010.1.309 ?
Thanks again for your time here.
There are some fixes - I'm attaching both the Content and Scripts folders.
Best wishes,
Alex Gyoshev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Hi Alex,
I downloaded the content and script folders you sent.
I didnt test the MVC1 yesterday, but I did today and there still seems to be a problem. I even tried with the content and script from yesterday (just to see).
I am sure it is something I am not doing, but I wonder about the MVC1 DLL 2010.1.323 - For convenience, and so you can see the whole project , I submitted a support ticket. It is 294122 .
Thanks as always.
My site.css is the same thats why I mention it.
I know this post is old. But i just realized that the fix you sent did not include 2010.1.323.235 ? I just got 135 because my issue was with MVC1 ?
Is there a 235 I could have for my MVC2 ? if so, could you please include the content and script folders, I just want to make sure i have the lastest ones.
I would download the latest internal builds but the page says that these are not totally QA'ed, and not for production ?
thanks
You can download the 329 build from this forum thread. We sometimes attach a hotfix build which addresses some issues in forum threads. However this is more like an exception than a rule.
Now I want to shed some light on the latest internal builds.
- You can tell the newer build by its version. The higher the version the newer the build. Now let's "decode" a version:
2010(year).1(quarter).309(9th of March).135(MVC 1 .NET 3.5) - We release internal builds of Telerik Extensions for ASP.NET MVC only for users with commercial license.
- Both the internal builds and the hotfixes we attach to forum threads have not passed our full QA process. Use them at your own risk. We release one or two service packs between major releases which
I hope this helps,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Hi Atanas,
Yes you were very helpful. I think some of item #3 was cut off ?
thanks as always
Yes, it was cut for some unknown reason. Here is what it should have read:
Both the internal builds and the hotfixes we attach to forum threads have not passed our full QA process. Use them at your own risk. We release one or two service packs between major releases which are fully tested and accumulate the hotfixes of any interim releases (internal builds or builds attached to forum threads).
Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Thanks Atanas for your time with this.
thanks