This is a migrated thread and some comments may be shown as answers.
Date column widths?
15 Answers 115 Views
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 05 Jan 2011, 09:49 PM
I've noticed some weird behavior with the AJAX grid control in Chrome. Whenever I bind a datasource that contains one or more date fields to the grid. Those date fields are automatically set to a ridiculously large width (over 39000px). Browsing to the same page in FireFox the date columns are displayed as you'd expect. Bug?

Grid control version: 2010.3.1215.40
Chrome version: 8.0.552.224
FireFox version: 3.6.10

15 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 06 Jan 2011, 02:09 PM
Hi Greg,

I'm afraid that I'm not sure what may caused such behavior with the given details. Can you please send us little more details about the scenario and implementation. If possible, please send us (attached to a formal ticket) small working project in which this behavior can be observed, thus we will be able to gather more details and provide you more to-the-point answer.

Kind regards,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Greg
Top achievements
Rank 1
answered on 06 Jan 2011, 02:30 PM
Pretty straight forward implementation of the grid control. A standard web forms project with a entity object class pointing at three tables. I dragged a grid control on to a page set paging, sorting, grouping, filtering, client-side row selection and the control skin set to Outlook. No design time datasource was set. In the code behind I added a simple LINQ expression to the "NeedDataSource" method of the code-behind.
The record source for the grid contains only nine fields, two of them being "datetime" fields. The database is SQL Server 2005.

Help>About info from SQL Server:

Microsoft SQL Server Management Studio 9.00.4035.00
Microsoft Analysis Services Client Tools 2005.090.4035.00
Microsoft Data Access Components (MDAC) 2000.085.1132.00 (xpsp.080413-0852)
Microsoft MSXML 2.6 3.0 5.0 6.0 
Microsoft Internet Explorer 8.0.6001.18702
Microsoft .NET Framework 2.0.50727.3615
Operating System 5.1.2600

Let me know if you need additional info.
0
Pavlina
Telerik team
answered on 11 Jan 2011, 11:01 PM
Hello Greg,

I tried replicating the problem locally, but to bo avail. Therefore, I will ask you to open a formal support ticket and provide us with a small working project, which illustrates this erroneous behavior, so that we can look into it locally. After this we will get back to you with a proper solution / fix.

Thank you!

Regards,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Greg
Top achievements
Rank 1
answered on 12 Jan 2011, 03:23 PM
I've got a ticket in on this issue already. For some reason I can only get the header to misbehave in my test project. How do you upload a project if it doesn't support "ZIP" files?
0
Pavlina
Telerik team
answered on 17 Jan 2011, 12:20 PM
Hello Greg,

In this case to avoid duplicate posts, I suggest that you continue the communication in the support ticket post.

Regards,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Alan
Top achievements
Rank 1
answered on 18 Jan 2011, 05:05 PM
I have the exact same problem. Only happens on chrome.

<telerik:RadGrid ID="timesheetGrid" runat="server" GridLines="None" Skin="Windows7"
    AllowSorting="True" ShowGroupPanel="True" AutoGenerateColumns="False" AllowPaging="True"
    PageSize="15" ShowStatusBar="True" AllowFilteringByColumn="true">
    <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" AllowDragToGroup="True">
    </ClientSettings>
    <MasterTableView>
        <RowIndicatorColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
        <Columns>
            <telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID" Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridDateTimeColumn DataField="From" DataType="System.DateTime" HeaderText="Date"
                UniqueName="DateFrom">
                <ItemStyle Width="125px" />
            </telerik:GridDateTimeColumn>
            <telerik:GridBoundColumn DataField="Description" HeaderText="Description" UniqueName="Description">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="DocketNo" HeaderText="Docket No" UniqueName="DocketNo">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="FileCode" HeaderText="File Code" UniqueName="FileCode">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CostCenter" HeaderText="Cost Center" UniqueName="CostCenter">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="TaskID" HeaderText="Task ID" UniqueName="TaskID">
            </telerik:GridBoundColumn>
            <telerik:GridCheckBoxColumn DataField="IsNegativeTimesheet" DataType="System.Boolean"
                HeaderText="Negative Timesheet" UniqueName="NegativeTimesheet">
            </telerik:GridCheckBoxColumn>
            <telerik:GridCheckBoxColumn DataField="IsOvertime" DataType="System.Boolean" HeaderText="Overtime"
                UniqueName="Overtime">
            </telerik:GridCheckBoxColumn>
        </Columns>
    </MasterTableView>
    <PagerStyle Mode="NumericPages" VerticalAlign="Bottom" />
</telerik:RadGrid>


See attached images.

If I remove css attributes in capture 2 and 3, the grid is fixed (see capture 4).

If this is not enough I will provide more info.

Thanks,
Daryl
0
Pavlina
Telerik team
answered on 18 Jan 2011, 05:53 PM
Hi Greg,

Please set the FilterControlWidth property of the GridDateTimeColumn to some pixel value, as in the following demo:

http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx

The problem is caused by incorrect browser behavior.

Greetings,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Alan
Top achievements
Rank 1
answered on 18 Jan 2011, 06:05 PM
That fixed my problem.

Thanks,
Daryl
0
Greg
Top achievements
Rank 1
answered on 18 Jan 2011, 06:14 PM
The demo appears to be working correctly in Chrome. Thanks.
0
TSM
Top achievements
Rank 1
answered on 06 Apr 2011, 12:18 PM
Hi All,
            I have the same issue mentioned above by Daryl's attached Caputure.png.And i cant solve it because all my columns and rows are added in runtime and based on the  datatable's column type my grid is setting RadGrid's column type as GridDateTimeColumn.How can i set the FilterControlWidth property of the GridDateTimeColumn
at runtime as the above mentioned fix.Will this solve my issue ???.I had problems only in Chrome and Safari,While in IE,Firefox and Opera my grid works fine.Only the problem is caused by columns which had DateTime values.

Plz help me out.This is urgent.

Regards and Thanks,
Titti Skaria.
0
TSM
Top achievements
Rank 1
answered on 07 Apr 2011, 05:01 AM
Hi ,

      No one there to help me out..

  Regards and Thanks,
         Titti Skaria.
0
Alan
Top achievements
Rank 1
answered on 07 Apr 2011, 09:14 AM
Hi Titti,

Can't you set the property when creating the columns? 

If they're auto-generated you can bind to the ColumnCreating event, checking the ColumnType property and setting the FilterControlWidthproperty if it's of type GridDateTimeColumn.

So you'll have something like this (I hope I understood your problem).

protected void Page_Load(object sender, EventArgs e)
{
    radGridView1.AutoGenerateColumns = true;
    radGridView1.ColumnCreated += new GridColumnCreatedEventHandler(radGridView1_ColumnCreated);
}
 
void radGridView1_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
{
    if (e.Column.ColumnType.Equals("GridDateTimeColumn"))
    {
        e.Column.FilterControlWidth = Unit.Pixel(100);
    }
}


Regards,
Daryl
0
TSM
Top achievements
Rank 1
answered on 07 Apr 2011, 01:21 PM
Hi Daryl,
               Thanks for your solution.It works as expected..Is there any other workaround for this,Because only for Chrome and Safari i have to do like this.And Telerik people will you fix this problem caused by DateTimeColumn in Chrome and Safari.....????
Thanks And Regards,
  Titti Skaria.
0
Eric Garrison
Top achievements
Rank 1
answered on 03 Jul 2012, 08:52 PM
+1 for a request to fix this issue. It took a long time to figure this out. We have a large application with many grids that use datetime columns that now need to be fixed.
0
Andrey
Telerik team
answered on 06 Jul 2012, 12:01 PM
Hello,

We have logged this bug and it will be fixed in one of our future releases. You could monitor the release notes of the future releases.

Greetings,
Andrey
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Greg
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Greg
Top achievements
Rank 1
Alan
Top achievements
Rank 1
TSM
Top achievements
Rank 1
Eric Garrison
Top achievements
Rank 1
Andrey
Telerik team
Share this question
or