OK, here is a bit of a weird one. I am building a mail system for a project and when I do a postback event after a double click on a row all the text in the RadGrid is highlighted.
I have a javascript function that simply clicks a image button that I have a post back event on.
I have a simple Image Button and RadGrid
The code behind
Does anyone have any ideas? What is really weird is that I can call the refreshMail() method from the parent page and it doesnt highlight any text. I'm sure this is a simple one, but it's got me baffeled :/
Thanks in advance,
Matt
I have a javascript function that simply clicks a image button that I have a post back event on.
| function refreshMail(){document.getElementById("ImageButton1").click();} |
| function RowDblClick(sender, eventArgs){parent.openMailMessage(eventArgs.getDataKeyValue("Idnum"));refreshMail();} |
I have a simple Image Button and RadGrid
| <asp:ImageButton ID="ImageButton1" runat="server" |
| ImageUrl="../graphics/refresh2.gif" onclick="ImageButton1_Click" |
| ToolTip="Refresh mail box." /> |
| <telerik:RadGrid ID="RadGrid1" runat="server" AllowCustomPaging="True" |
| AllowPaging="True" GridLines="None" Height="320px" |
| HorizontalAlign="Center" PageSize="50" ShowStatusBar="True" Skin="Vista" |
| Width="760px" AutoGenerateColumns="False" OnDeleteCommand="RadGrid1_DeleteCommand" OnItemCreated="RadGrid1_ItemCreated" |
| OnNeedDataSource="RadGrid1_NeedDataSource" ShowGroupPanel="True" |
| AllowSorting="True" EnableHeaderContextMenu="True"> |
| <MasterTableView GridLines="None"> |
| <Columns> |
| <telerik:GridButtonColumn HeaderText="Delete" ConfirmText="Delete this mail?" ButtonType="ImageButton" CommandName="Delete" Text="Delete" |
| UniqueName="DeleteColumn" HeaderStyle-Width="45px"> |
| <HeaderStyle Width="45px"></HeaderStyle> |
| <ItemStyle HorizontalAlign="Center" CssClass="delButton" /> |
| </telerik:GridButtonColumn> |
| <telerik:GridBoundColumn DataField="From" HeaderText="From"/> |
| <telerik:GridBoundColumn DataField="Title" HeaderText="Title"/> |
| <telerik:GridBoundColumn DataField="Date_" HeaderText="Date" HeaderStyle-Width="120px"> |
| <HeaderStyle Width="120px"></HeaderStyle> |
| </telerik:GridBoundColumn> |
| </Columns> |
| <PagerStyle Mode="NextPrevAndNumeric" /> |
| <RowIndicatorColumn Visible="False"> |
| <HeaderStyle Width="20px" /> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn Visible="False"> |
| <HeaderStyle Width="19px" /> |
| </ExpandCollapseColumn> |
| </MasterTableView> |
| <ClientSettings AllowColumnHide="True" AllowColumnsReorder="True"> |
| <Resizing AllowColumnResize="True" /> |
| <Scrolling AllowScroll="True" ScrollHeight="280px" UseStaticHeaders="True" /> |
| <Selecting AllowRowSelect="True"></Selecting> |
| <ClientEvents OnRowDblClick="RowDblClick" /> |
| </ClientSettings> |
| <FilterMenu> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| </FilterMenu> |
| </telerik:RadGrid> |
The code behind
| protected void ImageButton1_Click(object sender, ImageClickEventArgs e) |
| { |
| RadGrid1.Rebind(); |
| } |
Does anyone have any ideas? What is really weird is that I can call the refreshMail() method from the parent page and it doesnt highlight any text. I'm sure this is a simple one, but it's got me baffeled :/
Thanks in advance,
Matt
