<Columns>
<telerik:GridClientSelectColumn>
</telerik:GridClientSelectColumn>
</Columns>
<ItemTemplate>
<Table......
</ItemTemplate>
My problem is the "RowClick" & "RowDBClick" events didn't fire if I click the row content, I need to click the First Column (select checkbox) in order to fire the events.Any advise?
Thanks.
I have an issue where the combobox renders without a bottom border (see attached image) and the right down arrow doesn't work (it doesn't cause anything to happen when clicked). Here's the .aspx:
<div runat="server" id="pnlAdvancedSearch">
<table width="100%" cellspacing="1" cellpadding="1" border="0">
<tr>
<td valign="middle" style="width: 110px;">
<asp:Label runat="server" ID="lblProject" Text="Project:" />
</td>
<td valign="middle" style="width: 250px;">
<telerik:RadComboBox runat="server" ID="ddProject" NoWrap="True" EmptyMessage="Please enter value"
ShowDropDownOnTextboxClick="true" EnableLoadOnDemand="true" ShowMoreResultsBox="true"
RegisterWithScriptManager="true" AppendDataBoundItems="False" EnableVirtualScrolling="true"
Height="200px" Width="100%" OnItemsRequested="ddProject_ItemsRequested" />
</td>
...
Any suggestions?
<
asp:UpdatePanel ID="upInterimComments" runat="server">
<radG:RadGrid
......
</
radG:RadGrid>
</asp:UpdatePanel>
<telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource" OnColumnCreated="RadGrid1_ColumnCreated" OnItemCreated="RadGrid1_ItemCreated" OnItemDataBound="RadGrid1_ItemDataBound" OnInsertCommand="RadGrid1_InsertCommand" OnUpdateCommand="RadGrid1_UpdateCommand" OnDeleteCommand="RadGrid1_DeleteCommand" AllowFilteringByColumn="True" GridLines="None" > <HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu> <MasterTableView HierarchyDefaultExpanded="false" HierarchyLoadMode="ServerBind" AllowSorting="true" AutoGenerateColumns="false" CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage" DataKeyNames="SICItemID" > <Columns> <telerik:GridEditCommandColumn ButtonType="ImageButton" /> <telerik:GridBoundColumn DataField="SICItemID" HeaderText="ID" UniqueName="SICItemID" SortExpression="SICItemID" Visible="false" ReadOnly="true" Display="false" /> <telerik:GridBoundColumn DataField="ItemName" HeaderText="Question" UniqueName="ItemName" ItemStyle-Wrap="true" ItemStyle-Width="300" SortExpression="ItemName" MaxLength="2000" ReadOnly="false" Display="true" /> <telerik:GridDropDownColumn FooterText="SIC Code" UniqueName="ddlSICCodes" ReadOnly="false" ListTextField="SICCode1" ListValueField="SICID" DataSourceID="ddsGetSICCodes" HeaderText="SIC Code" DataField="SICCode.SICID" AllowSorting="true" DefaultInsertValue=""> </telerik:GridDropDownColumn>
</Columns> <EditFormSettings> <EditColumn UniqueName="EditCommandColumn1"></EditColumn> </EditFormSettings> </MasterTableView> <ClientSettings AllowExpandCollapse="true" EnableRowHoverStyle="true" /> </telerik:RadGrid> <cc1:DomainDataSource runat="server" ID="ddsGetSICCodes" DomainServiceTypeName="ID.DomainServices.ListTypesDomainService" SelectMethod="GetSicCodes" EnableUpdate="true" EnableInsert="false" EnableDelete="false" > <SelectParameters> <asp:SessionParameter Name="Scope" SessionField="MyScope" DefaultValue="" ConvertEmptyStringToNull="true" DbType="Guid" /> </SelectParameters> </cc1:DomainDataSource>protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e) { GridEditableItem editedItem = e.Item as GridEditableItem; try { ListTypesDomainService lds = new ListTypesDomainService(); Guid sicItemID = new Guid(editedItem.GetDataKeyValue("SICItemID").ToString()); var updateSicItem = lds.GetSicItem(sicItemID); if (updateSicItem != null) { editedItem.UpdateValues(updateSicItem); lds.SaveChanges(); } } catch (Exception ex) { ProcessException(RadGrid1, ex); e.Canceled = true; } }There doesn't seem to be a good solution for printing the control itself.
So, one solution would just be to show a pop-up and write the contents of the control out to html. I would need to do this for Day, Week, Month and Multi-Day views available in the control. It's not a difficult task but time consuming if you figure in formatting etc.
By any chance did anyone do this already and what to share the code?
Can someone suggest a better solution?
<
rad:RadAjaxManager ID="RadAjaxManager1" runat="server"></rad:RadAjaxManager>
<
rad:RadAjaxPanel ID="RadAjaxPanel" runat="server" HorizontalAlign="NotSet" LoadingPanelID="AjaxLoadingPanel1" ScrollBars="None">
<div style="display:none;">
<asp:Button ID="btnRebind" runat="server" onclick="btnRebind_Click" />
</div>
<asp:Repeater ID="lstRefs" runat="server" OnItemDataBound="lstRefs_ItemDataBound" OnItemCreated="lstRefs_ItemCreated"></asp:Repeater>
<asp:PlaceHolder ID="ph" runat="server"></asp:PlaceHolder>
<uc:SubWin ID="winRefEdit" runat="server" TargetPage="RefEdit.aspx" />
</
rad:RadAjaxPanel>
<
rad:AjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server" Transparency="0">
<table style="height:100%;width:100%;" border="0">
<tr style="vertical-align:middle">
<td style="text-align:center;">
<img src='timer.gif' alt='Timer' />
</td>
</tr>
</table>
</
rad:AjaxLoadingPanel>
When I define ItemTemplate inside component - everything works well. However, there is a special requirement to make template editable by simple tools (texteditor). That is why I am defining template as ITemplate control in code and assign it to Repeater. In aspx page user places something like:
<table>
<uc:SpecialCompoment ID="sp1" runat="server>
<MyItemTemplate>
<tr>
<td>Name:<ItemData Field="Name"></td><td style="font-weight:bold">Last name:<ItemData Field="Surname"></td>
</tr>
</MyItemTemplate>
</uc:SpecialCompoment>
</table>
Then I am parsing the content of template at ItemDataBound event and replacing artificial tags <ItemData> with real values.
Now I need to add controls to issue command to update/delete records. I am catching ItemCreated event and parsing the template for <ItemAction Action="Edit"> and <ItemAction Action="Delete"> and replacing them by Button controls, settings unique ID, and CommandName.
Without RadAjaxManager everything works.
With RadAjaxManager it work but result it strange. When loaded it looks like that:
Name:John Last name:Doe Edit Delete
Name:Bill Last name:Smith Edit Delete
Name:Erik Last name:Peters Edit Delete
After editing (by command a subwindow opens and after completion of edit javascript call server to rebind repeater) it looks following:
Name:Joanna Last name:Doe Edit Delete
Name:Bill Last name:Smith Edit Delete
Name:Erik Last name:Peters Edit Delete
Name:John Last name:Doe Edit Delete
Name:Bill Last name:Smith Edit Delete
Name:Erik Last name:Peters Edit Delete
As you can see, it replicated the content (except HTML) of edited repeater ABOVE the original, that stays untouched.
Any idea why it is and how to fix it ?