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

radGrid is shaking

6 Answers 123 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Balamurali Venkatesan
Top achievements
Rank 1
Balamurali Venkatesan asked on 11 Mar 2009, 01:31 PM
Hi,

I have a radgrid that is created dynamically. But when i click on the rows in the grid.The grid is shaking and the column seem to adjust.
Any help on this would be greatly appreciated.

Below is the code for the radgrid

RadGrid

grid = new RadGrid();

 

grid.ID =

"radGridProducts";

 

grid.AutoGenerateColumns =

false;

 

grid.AllowSorting =

true;

 

grid.AllowMultiRowSelection =

true;

 

grid.AllowMultiRowEdit =

true;

 

grid.GridLines =

GridLines.None ;

 

 

//grid.Width = Unit.Percentage(100);

 

 

//grid.MasterTableView.TableLayout = GridTableLayout.Fixed;

 

grid.Height =

Unit.Pixel(380);

 

 

 

String htmlColor = "#EDEFF1";

 

 

Color backColor = ColorTranslator.FromHtml(htmlColor);

 

grid.AlternatingItemStyle.BackColor = backColor;

 

//grid.BorderColor = Color.Blue;

 

grid.MasterTableView.AllowPaging =

true;

 

grid.MasterTableView.PagerStyle.AlwaysVisible =

true;

 

grid.MasterTableView.PagerStyle.Position =

GridPagerPosition.TopAndBottom;

 

grid.MasterTableView.PagerStyle.Mode =

GridPagerMode.NextPrevNumericAndAdvanced;

 

grid.ClientSettings.AllowKeyboardNavigation =

true;

 

grid.ClientSettings.Selecting.AllowRowSelect=

true;

 

grid.ClientSettings.Scrolling.AllowScroll =

true;

 

grid.ClientSettings.Scrolling.UseStaticHeaders =

true;

 

grid.ClientSettings.Scrolling.ScrollHeight =

Unit.Pixel(300);

 

 

grid.FilterMenu.EnableTheming=

true;

 

grid.FilterMenu.CollapseAnimation.Duration = 200;

grid.FilterMenu.CollapseAnimation.Type =

AnimationType.OutQuint;

 

 

 

//Add Products Master table

 

grid.MasterTableView.Name =

"ProductParent";

 

grid.MasterTableView.PageSize = 30;

grid.MasterTableView.DataKeyNames =

new string[] { "Id", "ParentId","ProductLevel","Tag"};

 

grid.MasterTableView.EditMode =

GridEditMode.InPlace;

 

 

//grid.MasterTableView.TableLayout = GridTableLayout.Fixed;

 

 

 

GridEditCommandColumn col0 = new GridEditCommandColumn();

 

col0.ButtonType =

GridButtonColumnType.ImageButton;

 

col0.UpdateImageUrl =

"../images/Update.gif";

 

col0.EditImageUrl =

"../images/Edit.gif";

 

col0.InsertImageUrl =

"../images/Insert.gif";

 

col0.CancelImageUrl =

"../images/Cancel.gif";

 

col0.UniqueName =

"EditCommandColumn";

 

grid.MasterTableView.Columns.Add(col0);

 

//grid.MasterTableView.Columns[0].HeaderStyle.Width = Unit.Percentage(4);

 

 

//grid.MasterTableView.Columns[0].HeaderStyle.Width = Unit.Pixel(30);

 

 

GridButtonColumn col1 = new GridButtonColumn();

 

col1.Text =

"Delete";

 

col1.ConfirmText =

"Delete this product?";

 

col1.ButtonType =

GridButtonColumnType.ImageButton;

 

col1.ImageUrl =

"../images/Delete.gif";

 

col1.CommandName =

"Delete";

 

col1.UniqueName =

"DeleteColumn";

 

grid.MasterTableView.Columns.Add(col1);

 

//grid.MasterTableView.Columns[1].HeaderStyle.Width = Unit.Percentage(3);

 

 

//grid.MasterTableView.Columns[1].HeaderStyle.Width = Unit.Pixel(30);

 

 

GridClientSelectColumn col2 = new GridClientSelectColumn();

 

col2.UniqueName =

"checkBoxColumn";

 

grid.MasterTableView.Columns.Add(col2);

 

//grid.MasterTableView.Columns[2].HeaderStyle.Width = Unit.Percentage(4);

 

 

//grid.MasterTableView.Columns[2].HeaderStyle.Width = Unit.Pixel(30);

 

 

GridBoundColumn col3 = new GridBoundColumn();

 

col3.DataField =

"Tag";

 

col3.UniqueName = grid.MasterTableView.Name +

"colTag";

 

col3.HeaderText =

"Tag";

 

 

//col3.ReadOnly = true;

 

grid.MasterTableView.Columns.Add(col3);

 

//grid.MasterTableView.Columns[3].HeaderStyle.Width = Unit.Percentage(15);

 

 

GridBoundColumn col4 = new GridBoundColumn();

 

col4.DataField =

"ShortDescription";

 

col4.UniqueName = grid.MasterTableView.Name +

"colShortDescription";

 

col4.HeaderText =

"Short Description";

 

col3.MaxLength = 40;

grid.MasterTableView.Columns.Add(col4);

 

//grid.MasterTableView.Columns[4].HeaderStyle.Width = Unit.Percentage(15);

 

 

GridBoundColumn col5 = new GridBoundColumn();

 

col5.DataField =

"LongDescription";

 

col5.UniqueName = grid.MasterTableView.Name +

"colLongDescription";

 

col5.HeaderText =

"Long Description";

 

col5.MaxLength = 80;

grid.MasterTableView.Columns.Add(col5);

 

//grid.MasterTableView.Columns[5].HeaderStyle.Width = Unit.Percentage(25);

 

 

GridBoundColumn col6 = new GridBoundColumn();

 

col6.DataField =

"ShortDescription2";

 

col6.UniqueName = grid.MasterTableView.Name +

"colShortDescription2";

 

col6.HeaderText =

"Short Description 2";

 

col6.MaxLength = 40;

grid.MasterTableView.Columns.Add(col6);

 

//grid.MasterTableView.Columns[6].HeaderStyle.Width = Unit.Percentage(15);

 

 

GridHyperLinkColumn col7 = new GridHyperLinkColumn();

 

col7.UniqueName = grid.MasterTableView.Name +

"colCharacteristics2";

 

col7.HeaderText =

"Characteristics";

 

col7.DataNavigateUrlFields =

new string[] { "Id", "LongDescription" };

 

col7.DataNavigateUrlFormatString =

"javascript:ShowCharacteristics('{0}', '{1}');";

 

col7.Text =

"View";

 

grid.MasterTableView.Columns.Add(col7);

grid.MasterTableView.Columns[7].HeaderStyle.Width =

Unit.Percentage(10);

 

 

//grid.MasterTableView.Columns[7].HeaderStyle.Width = Unit.Pixel(50);

 

 

GridHyperLinkColumn col8 = new GridHyperLinkColumn();

 

col8.UniqueName = grid.MasterTableView.Name +

"colSRP";

 

col8.HeaderText =

"Quality Checks";

 

col8.DataNavigateUrlFields =

new string[] { "Id", "LongDescription" };

 

col8.DataNavigateUrlFormatString =

"javascript:ShowSRPs('{0}','{1}');";

 

col8.DataTextField =

"SRPViewText";

 

 

//col8.Text = "View";

 

grid.MasterTableView.Columns.Add(col8);

grid.MasterTableView.Columns[8].HeaderStyle.Width =

Unit.Percentage(10);

 

 

//grid.MasterTableView.Columns[8].HeaderStyle.Width = Unit.Pixel(50);

 

 

grid.NeedDataSource +=

new GridNeedDataSourceEventHandler(this.RadGridProducts_NeedDataSource);

 

grid.DetailTableDataBind +=

new GridDetailTableDataBindEventHandler(this.RadGridProducts_DetailTableDataBind);

 

grid.DeleteCommand +=

new GridCommandEventHandler(this.radGridProducts_DeleteCommand);

 

grid.UpdateCommand +=

new GridCommandEventHandler(this.RadGridProducts_UpdateCommand);

 

grid.InsertCommand +=

new GridCommandEventHandler(this.RadGridProducts_InsertCommand);

 

grid.ItemDataBound +=

new GridItemEventHandler(this.RadGridProducts_ItemDataBound);

 

grid.MasterTableView.CommandItemTemplate =

new ProductCommandItemTemplate();

 

grid.MasterTableView.CommandItemDisplay =

GridCommandItemDisplay.Top;

 

 

// Add the grid to the placeholder

 

 

this.PlaceHolder1.Controls.Add(grid);

 

6 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 11 Mar 2009, 01:50 PM
Hi Balamurali,

Which RadGrid skin are you using and which RadControls version? Have you added any custom styles related to RadGrid? What is the parent container of RadGrid on the web page?

Sincerely yours,
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
Balamurali Venkatesan
Top achievements
Rank 1
answered on 11 Mar 2009, 02:20 PM
Yes we have added our custom styles by changing the images specified by telerik.
The gris is shaking bcoz of the following statement

grid.AllowMultiRowSelection = true;



when i comment this line its not shaking


0
Balamurali Venkatesan
Top achievements
Rank 1
answered on 11 Mar 2009, 02:26 PM
The placeholder is a RadajaxPanel
0
Balamurali Venkatesan
Top achievements
Rank 1
answered on 11 Mar 2009, 02:37 PM
when i click on the Checkbox its not shaking but when i click on the rows its shaking
0
Balamurali Venkatesan
Top achievements
Rank 1
answered on 12 Mar 2009, 07:13 AM
Hi,
Any information on this issue would beof great help.

Thanks and Regards,
Bala
0
Dimo
Telerik team
answered on 13 Mar 2009, 04:25 PM
Hello Balamurali,

I am afraid I cannot reproduce the issue by using your code. Please open a support ticket and send a complete runnable web project, which exhibits the unwanted behavior. Thanks.

Regards,
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.
Tags
Grid
Asked by
Balamurali Venkatesan
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Balamurali Venkatesan
Top achievements
Rank 1
Share this question
or