DataSource=
IQuery query = session.GetNamedQuery("sp_Sample");
IList<Sample>result = query.List<
Sample>();
How do i get the updated values from the PopUp screen in RadGrid1_ItemCommand()
I have used below code to get the updated values but it is not working.
if (e.CommandName == RadGrid.UpdateCommandName)
{
GridEditableItem editedItem = e.Item as GridEditableItem;
Hashtable
newValues = new Hashtable();
newValues[
"Name"] = (editedItem.FindControl("txtName") as TextBox).Text;
newValues[
"Address1"] = (editedItem.FindControl("txtAddress1") as TextBox).Text;
newValues[
"Address2"] = (editedItem.FindControl("txtAddress2") as TextBox).Text;
newValues[
"Address3"] = (editedItem.FindControl("txtAddress3") as TextBox).Text;
newValues[
"PhoneNumber"] = (editedItem.FindControl("txtPhoneNumber") as TextBox).Text;
}
RadGrid.aspx Code:
<
telerik:RadPanelBar ID="RadPanelBar2" runat="server" OnClientItemCollapse="OnClientItemCollapsed" Skin="Telerik" Width="100%" >
<Items >
<telerik:RadPanelItem Text="RadGrid With Data" runat="server">
<Items>
<telerik:RadPanelItem runat="server" />
</Items>
<ItemTemplate>
<!-- Empty template to suppress global template -->
</ItemTemplate>
</telerik:RadPanelItem>
</Items >
<ItemTemplate>
<div class="module" style="width:100%;float:left">
<br />
<
asp:Panel ID="GridViewPanel1" runat="server">
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True"
AllowPaging="True" AllowSorting="True" GridLines="None"
ShowGroupPanel="True" Skin="Hay" AllowAutomaticUpdates="true" OnItemCommand="RadGrid1_ItemCommand" >
<MasterTableView EditMode="PopUp" >
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"><HeaderStyle Width="20px"></HeaderStyle></RowIndicatorColumn>
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"><HeaderStyle Width="20px"></HeaderStyle></ExpandCollapseColumn>
<EditFormSettings EditFormType="AutoGenerated" >
<FormTemplate>
<table id="Table1" cellspacing="1" cellpadding="1" width="250" border="0">
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
Name:
</td>
<td>
<asp:TextBox ID="txtName" Text='<%# Bind( "Name") %>' runat="server">
</asp:TextBox>
</td>
</tr>
<tr>
<td>
Number:
</td>
<td>
<asp:TextBox ID="txtClientNumber" Text='<%# Bind( "Number") %>' runat="server">
</asp:TextBox>
</td>
</tr>
<tr>
<td>
Address1:
</td>
<td>
<asp:TextBox ID="txtAddress1" Text='<%# Bind( "Address1") %>' runat="server">
</asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2">
<hr />
</td>
</tr>
<tr>
<td>
Address2:
</td>
<td>
<asp:TextBox ID="txtAddress2" runat="server" Text='<%# Bind( "Address2" ) %>'>
</asp:TextBox>
</td>
</tr>
<tr>
<td>
Address3:
</td>
<td>
<asp:TextBox ID="txtAddress3" runat="server" Text='<%# Bind( "Address3") %>'>
</asp:TextBox>
</td>
</tr>
<tr>
<td>
PhoneNumber:
</td>
<td>
<asp:TextBox ID="txtPhoneNumber" runat="server" Text='<%# Bind( "PhoneNumber") %>'>
</asp:TextBox>
</td>
</tr>
</table>
<table style="width: 100%">
<tr>
<td align="right" colspan="2">
<asp:Button ID="Button1" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' OnClick="Button1_Click">
</asp:Button>
<asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">
</asp:Button>
</td>
</tr>
</table>
</FormTemplate>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
<Columns>
<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" Visible="false" />
</Columns>
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>
</EditFormSettings>
</MasterTableView>
<ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True">
<ClientEvents OnRowContextMenu="RowContextMenu"></ClientEvents>
<Selecting AllowRowSelect="true" />
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
<%
--<FilterMenu EnableImageSprites="False"></FilterMenu>--%>
<
HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
</
telerik:RadGrid>
</asp:Panel>
<telerik:RadContextMenu ID="RadMenu1" runat="server" OnItemClick="RadMenu1_ItemClick" EnableRoundedCorners="true" EnableShadows="true">
<Items>
<telerik:RadMenuItem Text="Add" />
<telerik:RadMenuItem Text="Edit" />
<telerik:RadMenuItem Text="Delete" />
</Items>
</telerik:RadContextMenu>
</div>
</ItemTemplate>
</
telerik:RadPanelBar>
<telerik:RadTreeView runat="server" ID="RadTreeView1" DataSourceID="SqlRegionEcole" DataFieldID="id" DataFieldParentID="parentId" CheckBoxes="true" TriStateCheckBoxes="true" CheckChildNodes="true" DataValueField="Luc" Skin="Sunset"> <DataBindings> <telerik:RadTreeNodeBinding TextField="Name" /> </DataBindings> </telerik:RadTreeView>Protected Sub ShowCheckedNodes(ByVal treeView As RadTreeView) Dim message As String = String.Empty Dim nodeCollection As IList(Of RadTreeNode) = treeView.CheckedNodes For Each node As RadTreeNode In nodeCollection message += node.FullPath + "<br/>" Next Label4.Text = message End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click ShowCheckedNodes(RadTreeView1) End SubHi there –
This is Carlos Mendoza from Accenture, US.
I’m not sure if this is also the same email address for requesting technical assistance so I’d appreciate it if you just forward to the correct group if so.
Our project purchased Telerik’s HTML editor product, and implemented it on our corporate web site, www.accenture.com
That web site is built on MOSS 2007. We have another web site, microsite.accenture.com, built in MOSS 2007 too, in which Telerik’s HTML editor is implemented in there too.
On the Microsite web site, Telerik’s toolbar is able to retrieve the site’s alternate CSS file (.css), and display the CSS classes defined inside the CSS file on the Style dropdown of Telerik’s toolbar, so they can be used by our end users. See screenshot below, or see my attached images.
On the www.accenture.com web site, this is not happening on Telerik’s Style dropdown section.
Our clients would like the same behavior of the Style dropdown as the Microsites web site. Is there any configuration or line of code we should implement on the www.accenture.com platform so additional CSS classes defined on the site’s alternate CSS would appear on the Style dropdown of Telerik’s HTML editor toolbar?
Please advise.
I’d be glad to hop into a call if needed. Just tell me the telephone number of your technical support team.
Looking forward to hearing from you!
