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

RadGrid: UseStaticHeaders & AllowColumnResize

10 Answers 278 Views
Grid
This is a migrated thread and some comments may be shown as answers.
kpat154
Top achievements
Rank 1
kpat154 asked on 10 Oct 2008, 08:49 PM
I'm currently evaluating RadGrid (Q2 2008) and I'm finding that the column resizing behavior doesn't seem to work properly when I attempt to use the following settings:
  • AllowScroll = true
  • UseStaticHeaders = true (works properly if set to false)
  • AllowResize = true
  • EnableRealTimeResize = true (still breaks if false is set, just not as obvious)
When UseStaticHeaders is set, the column resize action seems to change the column width to a value that is exponentially greater than the user's click-and-drag operation would suggest. Also, attempting to shrink the width of a column actually makes that column wider. If UseStaticHeaders is set to false, the grid behaves as expected.

Is anyone else experiencing this problem? Is this a defect in the product or a defect in my implementation?

-K

10 Answers, 1 is accepted

Sort by
0
kpat154
Top achievements
Rank 1
answered on 10 Oct 2008, 09:39 PM
Apparently, in order to reproduce this problem, you must also make use of a GridBoundColumn with Display="false". I've pasted a stripped down control below which should reveal the problem.


<telerik:RadGrid ID="rg1" runat="server" AutoGenerateColumns="false" OnNeedDataSource="rg1_NeedDataSource"
            <MasterTableView> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="a" Display="false" UniqueName="a" HeaderText="a"/> 
                    <telerik:GridBoundColumn DataField="b" Display="true" UniqueName="b" HeaderText="a"/> 
                    <telerik:GridBoundColumn DataField="c" Display="true" UniqueName="c" HeaderText="b"/> 
                </Columns> 
            </MasterTableView> 
            <ClientSettings> 
                <Scrolling AllowScroll="true" UseStaticHeaders="true"/> 
                <Resizing AllowColumnResize="true" EnableRealTimeResize="true"/> 
            </ClientSettings> 
        </telerik:RadGrid> 

0
kpat154
Top achievements
Rank 1
answered on 13 Oct 2008, 01:56 PM
Any news on this issue?
0
Dimo
Telerik team
answered on 14 Oct 2008, 08:52 AM
Hi kpat154,

Thanks for the sample code.

Please use Visible="false" instead of Display="false", then the resizing works fine.

We will research this further and if it turns out to be a bug, will be logged for fixing. Thanks.

Greetings,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jakub Rychlik
Top achievements
Rank 1
answered on 10 Aug 2009, 03:00 PM
Has this issue been fixed?
I am experiencing the same problem.
Firefox 3 seems to be working fine with display=false but IE7 acts as described above.
If it's possible, I would like to avoid using different properties for different browsers because such browser specific 'fixes' tend to be backburners when upgrading versions.

Thanks in advance for any info.
0
Dimo
Telerik team
answered on 13 Aug 2009, 01:04 PM
Hi Jakub,

I am glad to inform you that the discussed problem will be resolved in the next release, Q2 2009 SP1, due in late August.

All the best,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jakub
Top achievements
Rank 1
answered on 14 Aug 2009, 01:06 PM
Hi Dimo,
That's great news. Thank you for replying to my query.

Best Regards,
Jakub Rychlik
0
Nguyễn Đại Dương
Top achievements
Rank 1
answered on 20 Aug 2009, 04:43 AM
I used version Q2-2009, and I'm trying to mimic yahoo mail site
but I have some problems with that UseStaticHeaders
when I debug my site with IE 7, in normal browser size, I have this, pretty good.
http://i20.photobucket.com/albums/b222/grandholy/mail1.png
when I maximize the browser size, I have this, not bad
http://i20.photobucket.com/albums/b222/grandholy/mail2.png
but when I turn browser size to normal again, oops, there's something wrong
http://i20.photobucket.com/albums/b222/grandholy/mail1.png
and I have 3 question
1- how to fix this problem?
2- I want my radgrid auto resize like yahoo mail, as you see, there's still a Horizontal scrollbar in it
3- If I try to click the link button in my radgrid and I'm using ajax, the first time it's looked like the page reloading, but the second click is fine, I wonder why?
oh, and one more thing, when I click in the link button first time, it's ok, but if I click the second time without scrolling, the radgrid's record position come back to 1st record , I wonder why?
this is my entire code
http://www.mediafire.com/?zm2zfknj4wu
and the problem in the Mails.ascx file =.=
please reply asap, thank you.





0
Support
Top achievements
Rank 1
answered on 21 Jul 2011, 08:18 PM
I am currently on v.2010.3.1317.35

When I undock and redock my leftpane the radgrid in the right pane does not resize properly in IE only.
I have attached screenshots for each click of the leftpane docking
Please help? :)

Here is the grid code:

<

 

telerik:RadGrid ID="gvScorecard" runat="server" AutoGenerateColumns="False" Skin="Office2007" GridLines="Both" Width="99%" >

<HeaderContextMenu EnableImageSprites="True"></HeaderContextMenu>

<ClientSettings>

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

<Resizing AllowColumnResize="true" AllowResizeToFit="true" />

<ClientEvents OnGridCreated="GridCreated" />

</ClientSettings>

<MasterTableView>

<HeaderStyle />

<ItemStyle BorderWidth="1px" />

<AlternatingItemStyle BorderWidth="1px" />

<Columns>

<telerik:GridBoundColumn DataField="scorecardnodeid" HeaderText="ID" UniqueName="ID">

<HeaderStyle Width="40" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="scorecardnodename" HeaderText="Objective" UniqueName="Objective">

<HeaderStyle Width="300" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Target" HeaderText="Target" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Target">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="scorecardnodeid" HeaderText="Owner" UniqueName="Owner">

<ItemStyle Wrap="false" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="calendarname" HeaderText="Frequency For Review" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="CalendarName">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal24" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal24">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal23" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal23">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal22" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal22">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal21" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal21">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal20" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal20">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal19" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal19">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal18" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal18">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal17" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal17">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal16" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal16">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal15" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal15">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal14" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal14">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal13" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal13">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal12" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal12">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal11" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal11">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal10" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal10">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal9" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal9">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal8" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal8">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal7" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal7">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal6" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal6">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal5" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal5">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal4" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal4">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal3" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal3">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal2" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal2">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Cal1" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Cal1">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="YTDValue" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="YTDValue">

<HeaderStyle HorizontalAlign="Center" />

<ItemStyle HorizontalAlign="Center" />

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="datatype" Visible="false" UniqueName="DataType">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="isGoal" Visible="false" UniqueName="IsGoal">

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

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

</telerik:GridBoundColumn>

</Columns>

</MasterTableView>

</telerik:RadGrid>


0
david
Top achievements
Rank 1
answered on 02 Nov 2020, 01:33 AM
[quote]kpat154 said:I'm currently evaluating RadGrid (Q2 2008) and I'm finding that the column resizing behavior doesn't seem to work properly when I attempt to use the following settings:
  • AllowScroll = true
  • UseStaticHeaders = true (works properly if set to false)
  • AllowResize = true
  • EnableRealTimeResize = true (still breaks if false is set, just not as obvious)

When UseStaticHeaders is set, the column resize action seems to change the column width to a value that is exponentially greater than the user's click-and-drag operation would suggest. Also, attempting to shrink the width of a column actually makes that column wider. If UseStaticHeaders is set to false, the grid behaves as expected.

Is anyone else experiencing this problem? Is this a defect in the product or a defect in my implementation?

-K

[/quote]

 

I am having the exact same issues even today! When is this due to be fixed?

As original post states UseStaticHeaders = False fixes my issue and I columns appear as expected.

However I then lose the static header which I require.

Any suggestions?

Thanks,

David

0
Attila Antal
Telerik team
answered on 04 Nov 2020, 06:22 PM

Hello David,

In the attached screenshots I see that RadSplitter is used, not RadDock.

I would like to note that we recommend using the latest version of Telerik Controls because they deliver fixes, improvements, and new features the earlier versions were lacking. If you're using an old version, please upgrade and test the application again. See Old Versions Support Policy in UI for ASP.NET AJAX

I have tried to replicate the issue with current versions but to no avail.

Attached to this message, you will find a Visual Studio Solution used I used for testing.

Could you take a look at it and let me know if there are any differences at your end, which I may be leaving out?

Regards,
Attila Antal
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
kpat154
Top achievements
Rank 1
Answers by
kpat154
Top achievements
Rank 1
Dimo
Telerik team
Jakub Rychlik
Top achievements
Rank 1
Jakub
Top achievements
Rank 1
Nguyễn Đại Dương
Top achievements
Rank 1
Support
Top achievements
Rank 1
david
Top achievements
Rank 1
Attila Antal
Telerik team
Share this question
or