This is a migrated thread and some comments may be shown as answers.

RadGrid looks different in IE9

1 Answer 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 05 Dec 2012, 08:59 PM

Hi
In my application we use radgrid controls. In this case, the grid looks different in IE9. the content of some cells looks incomplete. the grid looks fine in IE7 but It isn't in IE9.

The code apsx :

<telerik:RadGrid ID="RadGrid2" runat="server" AllowPaging="True"

 AutoGenerateColumns="False" PagerStyle-AlwaysVisible="true" AllowSorting="true"

 DataMember="Alumnos" GridLines="None" AllowMultiRowSelection="True">

 <ClientSettings EnableRowHoverStyle="true">

 <Selecting AllowRowSelect="True" />

 <Scrolling AllowScroll="True" UseStaticHeaders="true"></Scrolling>

 </ClientSettings>

 <HeaderContextMenu EnableEmbeddedSkins="False"></HeaderContextMenu>

 <PagerStyle AlwaysVisible="True"></PagerStyle>

<MasterTableView DataMember="Alumnos" CommandItemDisplay="Top" TableLayout="Auto">

<CommandItemTemplate>

</CommandItemTemplate>

<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>

<Columns>

<telerik:GridTemplateColumn HeaderStyle-Width="30px" HeaderText="">

<HeaderTemplate>

<asp:CheckBox ID="chkAll" runat="server" />

</HeaderTemplate>

<ItemTemplate>

<asp:CheckBox ID="chkSelection" runat="server"></asp:CheckBox>

</ItemTemplate>

</telerik:GridTemplateColumn>

<telerik:GridBoundColumn DataField="MatriculaFichaId" UniqueName="MatriculaFichaId" Visible="false">

</telerik:GridBoundColumn>

<telerik:GridTemplateColumn HeaderStyle-Width="65px" HeaderText="Matricula No." SortExpression="MatriculaFichaNo">

<ItemTemplate>

<a id="lnkMatriculaFicha" href="javascript:showMatriculaFicha(<%# Eval("MatriculaFichaId") %>)">

 

<%

 

# Eval("MatriculaFichaNo")%></a>

</ItemTemplate>

</telerik:GridTemplateColumn>

 <telerik:GridTemplateColumn HeaderStyle-Width="50px" HeaderText="Codigo Alumno" SortExpression="CodigoAlumnoNo">

 <ItemTemplate>

 <a id="lnkAlumno" href="javascript:showAlumno(<%# Eval("CodigoAlumnoId") %>)">

 <%

 

 

# Eval("CodigoAlumnoNo")%></a>

  </ItemTemplate>

 </telerik:GridTemplateColumn>

 <telerik:GridBoundColumn DataField="Departamento" HeaderText="Departamento" HeaderStyle-Width="60px"

 UniqueName="column1">

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn DataField="Provincia" HeaderText="Provincia" HeaderStyle-Width="115px"

 UniqueName="column2">

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn DataField="FechaMatricula" HeaderText="Fecha de Matricula" HeaderStyle-Width="65px"

 UniqueName="FechaMatricula">

 </telerik:GridBoundColumn>

 <telerik:GridTemplateColumn HeaderStyle-Width="130px" HeaderText="Alumno" SortExpression="Alumno">

 <ItemTemplate>

  <a id="lnkAlumno" href="javascript:showAlumno(<%# Eval("CodigoAlumnoId") %>)">

 <%

 

 

# Eval("Alumno")%></a>

 </ItemTemplate>

 </telerik:GridTemplateColumn>

 <telerik:GridBoundColumn DataField="Apoderado" HeaderText="Apoderado" HeaderStyle-Width="115px"

 UniqueName="column5">

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn DataField="Departamento" HeaderText="Departamento" HeaderStyle-Width="60px"

 UniqueName="column6">

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn DataField="Grado" HeaderText="Grado" HeaderStyle-Width="45px"

 UniqueName="column7">

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn DataField="Seccion" HeaderStyle-Width="45px"

 HeaderText="Seccion" UniqueName="column9">

 </telerik:GridBoundColumn>

 <telerik:GridTemplateColumn HeaderText="Repitente" HeaderStyle-Width="30px" SortExpression="Repitente" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Center">

 <ItemTemplate>

 <asp:CheckBox ID="chkRepitente" runat="server" Checked='<%# Eval("Repitente")=="1"?true:false %>' Enabled="false"/>

 </ItemTemplate>

 </telerik:GridTemplateColumn>

 <telerik:GridTemplateColumn HeaderText="DNI" HeaderStyle-Width="75px" SortExpression="DNI">

 <ItemTemplate>

 <a id="lnkDNI" href="javascript:showDNI(<%# Eval("DNIID") %>)">

 

<%

 

# Eval("DNI")%></a>

 </ItemTemplate>

 </telerik:GridTemplateColumn>

  <telerik:GridBoundColumn DataField="Departamento" HeaderText="Departamento" HeaderStyle-Width="70px"

 UniqueName="column10">

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn DataField="Estado" HeaderText="Estado" HeaderStyle-Width="60px"

 UniqueName="column">

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn DataField="Fecha1" HeaderText="Fecha 1" HeaderStyle-Width="65px"

 UniqueName="AssignedDate">

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn DataField="Fecha2" HeaderText="Fecha 2" HeaderStyle-Width="65px"

 UniqueName="OutgateDate">

 </telerik:GridBoundColumn>

  <telerik:GridBoundColumn DataField="Fecha3" HeaderText="Fecha 3" HeaderStyle-Width="65px"

 UniqueName="ExpirationDate">

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn DataField="Profesor" HeaderText="Profesor" HeaderStyle-Width="50px"

 UniqueName="column14">

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn DataField="Price" HeaderText="Precio" HeaderStyle-Width="40px"

 UniqueName="column15">

 </telerik:GridBoundColumn>

 <telerik:GridTemplateColumn HeaderText="Contacto" HeaderStyle-Width="80px" SortExpression="Contacto">

 <ItemTemplate>

 <a href="#" onclick="showCustomerContactDetails('<%# Eval("Contacto")%>')">

 <%# Eval("Contacto")%></a>

 </ItemTemplate>

 </telerik:GridTemplateColumn>

 <telerik:GridBoundColumn DataField="Usuario" HeaderText="Usuario" HeaderStyle-Width="80px"

 UniqueName="column17">

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn DataField="NumeroReferencia" HeaderText="Numero de Referencia." HeaderStyle-Width="70px"

 UniqueName="column18">

 </telerik:GridBoundColumn>

 </Columns>

 <EditFormSettings>

 <EditColumn InsertImageUrl="Update.gif" UpdateImageUrl="Update.gif" EditImageUrl="Edit.gif" CancelImageUrl="Cancel.gif"></EditColumn>

 </EditFormSettings>

 <PagerStyle AlwaysVisible="True"></PagerStyle>

 </MasterTableView>

 <FilterMenu EnableEmbeddedSkins="False"></FilterMenu>

 </telerik:RadGrid>


C#:

 

DataTable

 

dtTable2 = new DataTable("Alumnos");

 

dtTable2.Columns.Add(

 

"MatriculaFichaId", typeof(int));

 

dtTable2.Columns.Add(

 

 

"MatriculaFichaNo", typeof(string));

 

dtTable2.Columns.Add(

 

 

"CodigoAlumnoId", typeof(int));

 

dtTable2.Columns.Add(

 

 

"CodigoAlumnoNo", typeof(string));

 

dtTable2.Columns.Add(

 

 

"DNI", typeof(string));

 

dtTable2.Columns.Add(

 

 

"Departamento", typeof(string));

 

dtTable2.Columns.Add(

 

 

"Provincia", typeof(string));

 

dtTable2.Columns.Add(

 

 

"FechaMatricula", typeof(DateTime));

 

dtTable2.Columns.Add(

 

 

"Alumno", typeof(string));

 

dtTable2.Columns.Add(

 

 

"AlumnoId", typeof(int));

 

dtTable2.Columns.Add(

 

 

"Apoderado", typeof(string));

 

dtTable2.Columns.Add(

 

 

"Grado", typeof(string));

 

dtTable2.Columns.Add(

 

 

"Seccion", typeof(string));

 

dtTable2.Columns.Add(

 

 

"Repitente", typeof(string));

 

dtTable2.Columns.Add(

 

 

"DNIID", typeof(int));

 

dtTable2.Columns.Add(

 

 

"Estado", typeof(string));

 

dtTable2.Columns.Add(

 

 

"Fecha1", typeof(DateTime));

 

dtTable2.Columns.Add(

 

 

"Fecha2", typeof(DateTime));

 

dtTable2.Columns.Add(

 

 

"Fecha3", typeof(DateTime));

 

dtTable2.Columns.Add(

 

 

"Profesor", typeof(string));

 

dtTable2.Columns.Add(

 

 

"Precio", typeof(string));

 

dtTable2.Columns.Add(

 

 

"Contacto", typeof(string));

 

dtTable2.Columns.Add(

 

 

"Usuario", typeof(int));

 

dtTable2.Columns.Add(

 

 

"NumeroReferencia", typeof(string));

 

dtTable2.Rows.Add(88,

 

 

"TO0001069", 45, "965","08454584","LIMA", "LIMA",

 

 

 

DataHelper.GetDateTime("01/01/2012"),

 

 

 

"Jorge Ramos", 2, "Julio Cesar Uribe","5to", "A", "1", 1234,

 

 

 

"xxxxx", DataHelper.GetDateTime("15/01/2012"),

 

 

 

DataHelper.GetDateTime("20/01/2012"),

 

 

 

DataHelper.GetDateTime("25/01/2012"),

 

 

 

"Hugo Velazquez", "789", "Ximena Lino", 23, "75454-4454");

 

 

 

DataSet dstAlumnos= new DataSet();

 

 dstAlumnos.Tables.Add(dtTable2);

RadGrid2.DataSource = dstAlumnos;

RadGrid2.DataBind();

Nota: We use 2012.1.411.35


1 Answer, 1 is accepted

Sort by
0
Accepted
Pavlina
Telerik team
answered on 10 Dec 2012, 02:03 PM
Hi Alan,

The described behaviour is expected, because the columns in IE 7 are wider than specified(this is a browser specific behaviour). Therefore to avoid the problem in IE 9 you should increase the column widths.

Regards,
Pavlina
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
Alan
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or