This is a strange issue i have and i can't figure out what's happening
Visual studio 2010 webpart for Sharepoint foundation 2010.
ii have a repeater in a webPart and a button in the repeater that adds a row to the repeater. each time i click "Add", the width of the webpart goes over 100% of the screen which make it scrollable. i want to avoid that. Any ideas ??
When i load the site, it is peferct, no scrollbar and the width is actually 100% of the screen.
i tried to wrap all in a <div> and nothing same issue.
<asp:repeater id="rpt" EnableViewState="true" runat="server" width="100%">
<table cellspacing="0" width="100%" style="font-size:xx-small;font-weight:bolder;" border="0">
<asp:Button id="bntAdd" CommandName="Add" Runat="server" Text="Add"></asp:Button></td>
May be the issue is with the structure you follow.
as in the last tr of the table (containing button) has only one td, try to map it with columns in other rows / by setting its colspan.
secondly when you add the new row use firebug to see the structure may be there is some html break or the number columns are mismatched
I did figure it out. the issue was that the textboxes on my new row were too large (width) and therefore pushing all the controls to the right.
Once i set a width to the textbox, no more issue.
- 回答の候補に設定 servy42Microsoft community contributor 2012年4月16日 16:52