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

Scroll +Static Headers + GridEditMode.EditForms

3 Answers 206 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lasly
Top achievements
Rank 1
Lasly asked on 04 Jan 2012, 06:55 PM
HI,
I have a  RadGrid , the RadGrid has  scrolling enabled and UseStaticHeaders=True.
When UseStaticHeaders is True, the header row is still visible, even when the grid is scrolled. (perfect)

But  When I generated ItemCommand "initinsert"  with GridEditMode.EditForms  don't works (image 1) [problem]
       When I generated ItemCommand "edit"  with GridEditMode.EditForms  it works (image 2)
grdANAAGG.MasterTableView.EditMode = GridEditMode.EditForms;
grdANAAGG.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;
grdANAAGG.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = true;
grdANAAGG.MasterTableView.PagerStyle.Mode = GridPagerMode.NumericPages;
grdANAAGG.ClientSettings.Scrolling.AllowScroll = true;
grdANAAGG.ClientSettings.Scrolling.EnableVirtualScrollPaging = true;
grdANAAGG.ClientSettings.Scrolling.UseStaticHeaders = true;
grdANAAGG.ClientSettings.Scrolling.SaveScrollPosition = true;



thank you very much
P.S.
without  "ClientSettings.Scrolling.UseStaticHeaders = true;" always works.

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 05 Jan 2012, 03:58 PM
Hello,

Indeed the described behaviour can be observed, because when static headers are enabled for the grid ClientSettings.Scrolling.ScrollHeight property is set to 300px by default for the MasterTableView. Therefore, when you open EditForm vertical scrollbar appear. Other than this when you open InsertForm the grid is automatically resized to fit the content. This is so, because grid InsertForm is positioned outside the mastertableview( inside header or pager).

However,  one possible solution for your case is to set Height property of the grid to some fixed value as demonstrated in the attached project. Give it a try and see if its useful for you. Another option is to set EditMode property to InPlace or disable static headers(set UseStaticHeaders to false).

For more information about height vs ScrollHeight you can refer to the help article below.
http://www.telerik.com/help/aspnet-ajax/grid-height-vs-scrollheight.html

All the best,
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
0
Lasly
Top achievements
Rank 1
answered on 09 Jan 2012, 09:31 AM
Thanks for the reply.
The  solution for our case is  disable static headers when the ItemCommand  is initinsert.
0
Lasly
Top achievements
Rank 1
answered on 20 Jan 2012, 04:01 PM
Hello,
I thought I had solved the problems with static columns. disable static headers when the ItemCommand  is initinsert.
But if I disable the static columns in a form where are  firing the required file validator  I get the Ajax exception:
"Sys.WebForms.PageRequestManagerServerErrorException: Exception thrown by the target of a call."
(I add the required file validator all'item_created.)

thanks
Tags
Grid
Asked by
Lasly
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Lasly
Top achievements
Rank 1
Share this question
or