Hi everybody,
my radgrid shows records from my DB, using inline editing with custom template such as a textbox "tbNT" and a checkbox "cbA".
I catch the RadGrid1_UpdateCommand event for update data on my DB.
I have found no way to get values from the "tbNT" textBox and "cbA" checkBox in the event function.
I would also like to know how to get the record (line in radgrid) that need updated data.
I have searched and tried quite a few methods from radgrid examples with no luck.
Thank you very much
Here is aspx code (part of):
| <telerik:RadGrid ID="RadGrid1" runat="server" Width="98%" |
| AllowPaging="True" AllowSorting="True" DataSourceID="SqlDataSource1" |
| CellPadding="1" Height="700px" BorderStyle="Solid" GridLines="Both" |
| AutoGenerateColumns="False" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True"> |
| <MasterTableView EditFormSettings-EditFormType="Template" DataSourceID="SqlDataSource1" |
| DataKeyNames="ArtID" Width="100%"> |
| <Columns> |
| <telerik:GridBoundColumn DataField="RssID" HeaderText="RssID" SortExpression="RssID" HeaderStyle-Width="50" UniqueName="RssID" DataType="System.Int32"> |
| <HeaderStyle Width="50px"></HeaderStyle> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Title" HeaderText="Titolo" |
| SortExpression="Title" |
| UniqueName="Title"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="PubDate" HeaderText="Data Pubblicazione" HeaderStyle-Width="100" |
| SortExpression="PubDate" |
| UniqueName="PubDate" DataType="System.DateTime"> <HeaderStyle Width="100px"></HeaderStyle> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="InsDate" DataType="System.DateTime" HeaderStyle-Width="100" |
| HeaderText="Data Inserimento" |
| SortExpression="InsDate" UniqueName="InsDate"> <HeaderStyle Width="100px"></HeaderStyle> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="NewTitle" HeaderText="Titolo Sito" HeaderStyle-Width="200" |
| SortExpression="NewTitle" |
| UniqueName="NewTitle"> |
| <HeaderStyle Width="200px"></HeaderStyle> |
| </telerik:GridBoundColumn> |
| <telerik:GridCheckBoxColumn DataField="Active" DataType="System.Boolean HeaderStyle-Width="50" |
| HeaderText="Attivo" |
| SortExpression="Active" UniqueName="Active"> <HeaderStyle Width="50px"></HeaderStyle> |
| </telerik:GridCheckBoxColumn> |
| <telerik:GridBoundColumn DataField="ActDate" HeaderText="ActDate" HeaderStyle-Width="100" |
| SortExpression="Data Attivazione" |
| UniqueName="ActDate" DataType="System.DateTime"> <HeaderStyle Width="100px"></HeaderStyle> |
| </telerik:GridBoundColumn> |
| </Columns> |
| <EditFormSettings EditFormType="Template"> |
| <FormTemplate> |
| <table id="Table5" cellspacing="2" |
| cellpadding="1" width="100%" border="0" rules="none" |
| style="border-collapse: |
| collapse; background: white;"> |
| <tr> |
| <td> |
| Nuovo Titolo: |
| <asp:TextBox ID="tbNT" runat="server" Text='<%# Bind( "NewTitle") %>' |
| Width="400" /> |
| |
| Attivo: <asp:CheckBox ID="cbA" runat="server" Text="" Checked='<%# Bind( "Active") %>' /> |
| |
| <asp:Button ID="btnUpdate" text="Aggiorna" runat="server" CommandName="Update"> |
| </asp:Button> |
| |
| <asp:Button ID="btnCancel" Text="Annulla" runat="server" CausesValidation="False" |
| CommandName="Cancel"> |
| </asp:Button> |
| </td> |
| </tr> |
| </table> |
| </FormTemplate> |
| </EditFormSettings> |
| </MasterTableView> |
| <ClientSettings> |
| <Scrolling AllowScroll="True" |
| UseStaticHeaders="True" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
<
telerik:GridNumericColumn DataField="MyField" HeaderText="My Numeric Data" UniqueName="MyNumericData"
Resizable="true" HeaderTooltip="Sort by 'My Numeric Data'" DataType="System.Double" DataFormatString="{0:##,###0.00}" ItemStyle-HorizontalAlign="Right" FilterControlWidth="75%" HeaderStyle-Width="10%">
</telerik:GridNumericColumn>
This part is working fine and my data is formatted automatically when i change the Browser Language.
But filter on that data is leading to issue.
As this is numeric column while perfoming filtering i am only allowed to enter the numeric value with culture specific decimal seperator , which is great.But when i perform the search it does not work except for ENGLISH(EN-US).So if i select Germany the same filter operation is failing.
Is this a bug in Telerik and is there any workaround for this.
Regards,
Aayam
Hi All,
I have a dropdown column called "Year" in grid.
I am getting an "access denied" error when using the RadEditor for Ajax when using the Link Manager and the Table Wizard. Initially I got this with the Image manager but have since resolved the issue by setting the folder paths. However, I remain stumped with the other problems.
My XML definition for the editor is (no code script written):
<rad:radeditor runat="server" ID="RadEditor2" Width="550px" Height="390px" Skin="Web20" ToolsFile="~/App_Data/EditorTools.xml" BackColor="White">
<ImageManager ViewPaths="~/Users/TBA/Images" DeletePaths="~/Users/TBA/Images" UploadPaths="~/Users/TBA/Images" />
<DocumentManager ViewPaths="~/Users/TBA/" />
<content>
<
h1>This is the editor</h1></content>
</rad:radeditor>
My web.config looks like:
<
system.webServer>
<
handlers>
...
<add name="Telerik.Web.UI.SpellCheckHandler.axd_*" path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode,runtimeVersionv2.0"/>
<
add name="Telerik.Web.UI.DialogHandler.aspx_*" path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode,runtimeVersionv2.0"/>
<
add name="Telerik.RadUploadProgressHandler.ashx_*" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" preCondition="integratedMode,runtimeVersionv2.0"/>
<
add name="Telerik.Web.UI.WebResource.axd_*" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" preCondition="integratedMode,runtimeVersionv2.0"/>
</
handlers>
</system.webServer>
<
system.web>
<
httpHandlers>
...
<add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.1.415.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />
<
add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.1.415.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />
</httpHandlers>
</system.web>
Thanks...
Andrew
Hi guys,
I'm having a problem with RadPanelBar. It is refreshing the whole page when I'm using it in SharePoint.
I did a sample test application without using SharePoint and it is working properly (not refreshing the whole page).
Below is the sample I create: (Note that this sample is the asp.net, not the SharePoint code as it will be the same).
Kindly highlight or specify what I did wrong or what I need to do in able to make it work on SharePoint.
Please be kind as I am not a frequent forum poster. Thanks in advance for the help/support.
### Navigation Control: START ###
=== ASCX: START ===
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="navigation.ascx.cs" Inherits="AJAXEnabledWebApplication1.navigation" %>
<%@ Register Assembly="Telerik.Web.UI, Version=2008.2.826.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
Namespace="Telerik.Web.UI" TagPrefix="rad" %>
<rad:RadPanelBar runat="server" ID="radPanelBar1" Skin="Office2007" ExpandMode="SingleExpandedItem" Width="100%">
</rad:RadPanelBar>
=== ASCX: END ===
=== ASCX.CS: START ===
namespace AJAXEnabledWebApplication1
{
public partial class navigation : System.Web.UI.UserControl
{
public EventHandler OnItemClick;
protected void Page_Load(object sender, System.EventArgs e)
{
if (!this.IsPostBack)
{
radPanelBar1.DataSource = this.GetData();
radPanelBar1.DataTextField = "Desc";
radPanelBar1.DataValueField = "Id";
radPanelBar1.DataBind();
}
}
protected override void OnInit(System.EventArgs e)
{
radPanelBar1.ItemClick += radPanelBar1_ItemClick;
}
private void radPanelBar1_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)
{
if (OnItemClick != null)
{
OnItemClick(this, new navigation.NavigationEventArgs(e.Item.Value));
}
}
private DataTable GetData()
{
DataTable dt = new DataTable();
dt.Columns.Add("Id");
dt.Columns.Add("Desc");
for (int i = 0; i < 5; i++)
{
DataRow newRow = dt.NewRow();
newRow["Id"] = i.ToString();
newRow["Desc"] = i.ToString() + " Description";
dt.Rows.Add(newRow);
}
return dt;
}
#region <<<EventHandler>>>
public delegate void EventHandler(object sender, NavigationEventArgs e);
public class NavigationEventArgs : System.EventArgs
{
private string _id = string.Empty;
public NavigationEventArgs()
{
_id = string.Empty;
}
public NavigationEventArgs(string id)
{
_id = id;
}
public string Id
{
get { return _id; }
set { _id = value; }
}
}
#endregion
}
}
=== ASCX.CS: END ===
### Navigation Control: END ###
### ACTUAL PAGE: START ###
=== ASPX: START ===
<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Default.aspx.cs" Inherits="AJAXEnabledWebApplication1._Default" %>
<%@ Register Src="navigation.ascx" TagName="Navigation" TagPrefix="navigationUC" %>
<%--<%@ Register Src="~/layouts/_controltemplates/navigation.ascx" TagName="Navigation" TagPrefix="navigationUC" %>--%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div>
<table style="width: 100%; height=100%">
<tr>
<td>
<navigationUC:Navigation runat="server" ID="navigationUC1"></navigationUC:Navigation>
</td>
</tr>
<tr>
<td height="100%">
<asp:ListBox runat="server" ID="listBox" Height="400px"></asp:ListBox>
</td>
</tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
=== ASPX: END===
=== ASPX.CS: START===
namespace AJAXEnabledWebApplication1
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected override void OnInit(EventArgs e)
{
navigationUC1.OnItemClick += navigationUC1_OnItemClick;
}
private void navigationUC1_OnItemClick(object sender, navigation.NavigationEventArgs e)
{
listBox.Items.Add(e.Id);
}
}
}
=== ASPX.CS: END ===
### ACTUAL PAGE: END ###