2
  1. I have a table with 3 tds, 1st td with 1% width and a image button control(Pin image) in it. 2nd with 98% and DevExpress GridView in it and the 3rd is also 1% width and a image button control.

  2. When the user clicks on the Pin image, I do change Grid's Td width to 79% but the Grid's width do not resize accordingly until I re-size any column in the grid.

  3. After manually resizing a column the grid is adjusted to the TD's width.

  4. I do not want to manually do that action instead it should be done programmatically while I click image button control which is in other TD.

2 Answers 2

3

Try calling ASPxClientGridView.AdjustControls after changing Td width.

3
  • How to use this method (ASPxClientGridView.AdjustControls) ? Jan 2, 2012 at 7:36
  • Can I have any example for that method Calling?? Jan 2, 2012 at 7:36
  • Set grid ClientInstanceName attribute to some value, for instance grid1. Then call grid1.AdjustControls().
    – Filip
    Jan 2, 2012 at 8:28
2

Set the width of the grid at client side as per the td width and use the columns width in %age by using the Datarowtemplate.

myGrid.SetWidth(e.pane.GetClientWidth());

check these links.. may help you ..

http://www.devexpress.com/Support/Center/p/B142928.aspx
http://www.devexpress.com/Support/Center/e/E2381.aspx
http://www.devexpress.com/Support/Center/p/Q130353.aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.