Hi
I'm trying to fix some bug with my radgrid. I have some GridBoundColumn followed by one GridTemplateColumn with a regular Button in it. The button triggers a JavaScript function which shows a RadWindow as a popup.
My problem is when I click on the button, the RadWindow popup but also a big blank space appear in the RadGrid at top, above the header. The size of this space is about the same as the actual size of the rows shown under it.
This is most likely related to the fact that I want the grid to show an vertical scroll bar.
Anyway here is some code:
As you can see, the reason why I kinda really need scrolling to work is because I can't use paging because of the CheckBox column. I don't see how i could get to save the rows which were checked after the page is changed. So when a button under the radgrid is clicked, I can access the RadGrid and retrieve the rows that are checked. If someone can tell me a way to do this, then I might as well drop the scrolling for paging and avoid the blank space issue.
This is what i have on the button with ID="I" which cause the problem. I do this in the itemdatabound event:
Button btn = dataItem["ButtonColumn"].FindControl("I") as Button;
btn.Attributes["onclick"] = string.Format("return ShowEditForm('{0}?{1}={2}','rwEmprunteurView');",
"emprunteur_view.aspx", "commande_id", dataItem.Cells[11].Text);
btn.Attributes["onclick"] = string.Format("return ShowEditForm('{0}?{1}={2}','rwEmprunteurView');",
"emprunteur_view.aspx", "commande_id", dataItem.Cells[11].Text);
With ShowEditForm being:
function ShowEditForm(url, nomFenetre) {
window.radopen(url, nomFenetre);
return false;
}
This is on IE 6. I tried in Firefox, and I dont get the white space.. But I need it to work on IE 6.
If you need more of my code, just ask.
Thanks
I'm trying to fix some bug with my radgrid. I have some GridBoundColumn followed by one GridTemplateColumn with a regular Button in it. The button triggers a JavaScript function which shows a RadWindow as a popup.
My problem is when I click on the button, the RadWindow popup but also a big blank space appear in the RadGrid at top, above the header. The size of this space is about the same as the actual size of the rows shown under it.
This is most likely related to the fact that I want the grid to show an vertical scroll bar.
Anyway here is some code:
<telerik:RadGrid ID="RG_disponible" AlternatingItemStyle-HorizontalAlign="Center" |
Width="550px" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" |
runat="server" AllowSorting="true" HorizontalAlign="Center" AutoGenerateColumns="False" |
OnItemDataBound="RG_disponible_ItemDataBound" OnSortCommand="RG_disponible_SortCommand" |
OnItemCommand="RG_disponible_ItemCommand" OnDataBound="RG_disponible_DataBound"> |
<ClientSettings> |
<Resizing AllowColumnResize="false" /> |
<Scrolling AllowScroll="true" UseStaticHeaders="false" /> |
</ClientSettings> |
<MasterTableView CommandItemDisplay="Top" TableLayout="Fixed" Width="532px" NoMasterRecordsText="Aucune photo ne correspond à la recherche"> |
<CommandItemTemplate> |
<div style="text-align: right;"> |
<asp:LinkButton ID="btnSelectAll" runat="server" CommandName="SelectAll" Text="Désélectionner tous"></asp:LinkButton> |
</div> |
</CommandItemTemplate> |
<Columns> |
<telerik:GridBoundColumn HeaderText="Numéro du rouleau" UniqueName="Numero_rouleau" |
DataField="RouleauNumero"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn HeaderText="Numéro de la photo" UniqueName="Numero" DataField="PhotoNumero"> |
</telerik:GridBoundColumn> |
<telerik:GridTemplateColumn UniqueName="ButtonColumn" HeaderText=""> |
<ItemTemplate> |
<asp:Button ID="I" runat="server" Text="Détails"/> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
<telerik:GridBoundColumn HeaderText="Numéro de la photo" UniqueName="Numero" Visible="false" |
DataField="PhotoNumero"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn HeaderText="id photo" Visible="false" UniqueName="Id" DataField="Id"> |
</telerik:GridBoundColumn> |
<telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="" SortExpression="IsLink"> |
<ItemTemplate> |
<asp:CheckBox ID="choix" Enabled="false" runat="server" /> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
<telerik:GridBoundColumn HeaderText="" UniqueName="Id" DataField="EmprunteurId" Visible="false"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn HeaderText="" UniqueName="CommandeId" DataField="CommandeId" |
Visible="false"> |
</telerik:GridBoundColumn> |
</Columns> |
</MasterTableView> |
</telerik:RadGrid> |
</ContentTemplate> |
</asp:UpdatePanel> |
As you can see, the reason why I kinda really need scrolling to work is because I can't use paging because of the CheckBox column. I don't see how i could get to save the rows which were checked after the page is changed. So when a button under the radgrid is clicked, I can access the RadGrid and retrieve the rows that are checked. If someone can tell me a way to do this, then I might as well drop the scrolling for paging and avoid the blank space issue.
This is what i have on the button with ID="I" which cause the problem. I do this in the itemdatabound event:
Button btn = dataItem["ButtonColumn"].FindControl("I") as Button;
btn.Attributes["onclick"] = string.Format("return ShowEditForm('{0}?{1}={2}','rwEmprunteurView');",
"emprunteur_view.aspx", "commande_id", dataItem.Cells[11].Text);
btn.Attributes["onclick"] = string.Format("return ShowEditForm('{0}?{1}={2}','rwEmprunteurView');",
"emprunteur_view.aspx", "commande_id", dataItem.Cells[11].Text);
With ShowEditForm being:
function ShowEditForm(url, nomFenetre) {
window.radopen(url, nomFenetre);
return false;
}
This is on IE 6. I tried in Firefox, and I dont get the white space.. But I need it to work on IE 6.
If you need more of my code, just ask.
Thanks