I'm new to Telerik. This should be easy to do but I'm struggling for some reason. I have a RadGrid on my web page. I can click the edit icon and then it displays an email address. I want to let the user change the email address. It does let the user change the email address. But I want to expand the width of the email address. I cannot figure out how to do this. Can anyone help? This should be easy but I'm missing something.
Hi,
I have a radgrid with specified template columns. I would like to enable the Excel-like filter option on the grid, but hide the icon on certain column headers.
I've tried the code below, but it's not working.
<
telerik:GridTemplateColumn
HeaderText
=
"View"
UniqueName
=
"ViewCol"
ShowFilterIcon
=
"false"
>
Any ideas to what i might be missing?
Thanks,
Jas
I would really like it if the box just displayed as much of the text as possible, like a normal text box, rather than trying to truncate it. It needs to be visible without a mouse over. Is there a property or something I can set to turn this off? See attached example image.
Bottom box has focus top box does not. Same text is in both.
Hello,
I need a grid which auto refreshes after a given period using a timer. There is an example here: http://demos.telerik.com/aspnet-ajax/ajaxmanager/application-scenarios/ajaxify-timer/defaultcs.aspx
However, I don't want the whole grid to be rebound after each refresh and instead would like it to be seamless without the animation. When creating a standard bound to a there is a refresh button top right, and when pressing this button it does exactly what I'm after - it doesn't rebind the grid and instead if there's new data it pops the new data in instead of creating an obvious refresh animation. Using a normal is there some way to simulate pressing this 'Refresh' button using a timer element and thereby avoiding the rebinding?
Thanks
Hello,
I'm having troubles getting dates to filter properly using a grid with a column. The column is bound to a (7) field in server, and regardless of what I enter it never seems to return anything in the filter. Is this due to it being bound to a rather than or datetime2? Is this supported by and If not is there a way to get filtering to work properly?
Thanks
Hi, I have this kind of problem.
I have created a small page, where there is a RadListView control and two user controls that use a RadGridView.
When I made a selection in the RadListView, one user control is updated, while the other not.
Here the code of the user control:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="BasicControl.ascx.cs" Inherits="RadGridTest.C.BasicControl" %>
<
telerik:RadGrid
RenderMode
=
"Lightweight"
ID
=
"RadGrid1"
AllowAutomaticUpdates
=
"false"
AllowAutomaticDeletes
=
"false"
AllowSorting
=
"true"
EnableViewState
=
"true"
runat
=
"server"
AllowMultiRowSelection
=
"True"
PageSize
=
"3"
AllowPaging
=
"True"
AllowCustomPaging
=
"false"
AllowMultiRowEdit
=
"True"
AllowAutomaticInserts
=
"false"
OnItemCreated
=
"RadGrid_ItemCreated"
OnUpdateCommand
=
"RadGrid1_UpdateCommand"
OnItemCommand
=
"RadGrid1_ItemCommand"
OnNeedDataSource
=
"RadGrid1_NeedDataSource"
AllowFilteringByColumn
=
"true"
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
></
PagerStyle
>
<
MasterTableView
Width
=
"100%"
CommandItemDisplay
=
"Top"
EditMode
=
"InPlace"
AutoGenerateColumns
=
"false"
>
<
CommandItemTemplate
>
<
div
style
=
"padding: 5px 5px;"
>
Custom command item template
<
telerik:RadButton
ID
=
"RadButtonAddNew"
Text
=
"Aggiungi"
runat
=
"server"
CommandName
=
"AddNew"
Visible='<%# this.CanAddNewElements %>'></
telerik:RadButton
>
<
telerik:RadButton
ID
=
"RadButtonEditAll"
Text
=
"Modifica"
runat
=
"server"
CommandName=<%# RadGrid.EditAllCommandName %> Visible="<%# this.CanEditElements %>" OnClientClicked=<%#"BtnEditAllPressed" + ClientID %> ></
telerik:RadButton
>
<
telerik:RadButton
ID
=
"RadButtonRemove"
Text
=
"Rimuovi Selezionati"
runat
=
"server"
CommandName
=
"Rimuovi"
></
telerik:RadButton
>
<
telerik:RadButton
ID
=
"RadButtonUpdate"
Text
=
"Aggiorna"
runat
=
"server"
CommandName=<%# RadGrid.UpdateCommandName %> Visible='<%# RadGrid1.EditIndexes.Count > 0 %>'></
telerik:RadButton
>
<
telerik:RadButton
ID
=
"RadButtonCancel"
Text
=
"Annulla"
runat
=
"server"
CommandName=<%# RadGrid.CancelAllCommandName %> ></
telerik:RadButton
>
<
telerik:RadButton
ID
=
"RadButtonFilter"
Text
=
"Cerca"
runat
=
"server"
CommandName=<%# RadGrid.FilterCommandName %> OnClientClicked=<%#"ToggleFilterBar" + ClientID %> AutoPostBack="false"></
telerik:RadButton
>
<
telerik:RadButton
ID
=
"RadButtonRebind"
Text
=
"Refresh"
runat
=
"server"
CommandName
=
"RebindGrid"
></
telerik:RadButton
>
</
div
>
</
CommandItemTemplate
>
</
MasterTableView
>
<
ClientSettings
>
<
Selecting
AllowRowSelect
=
"True"
EnableDragToSelectRows
=
"True"
></
Selecting
>
<
ClientEvents
OnRowDeselected
=
"ItemsRowDeselected"
OnRowSelected
=
"ItemsRowSelected"
OnGridCreated
=
"GridCreated"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
<
asp:Label
ID
=
"Label1"
runat
=
"server"
Visible
=
'false'
Text
=
"Ciao"
/>
<
telerik:RadScriptBlock
ID
=
"RadSciptBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function ItemsRowSelected(sender, args) {
console.log("ItemsRowSelected " + sender.get_id());
...
}
function ItemsRowDeselected(sender, args) {
console.log("ItemsRowDeselected " + sender);
...
}
}
function GridCreated(sender, args) {
console.log("GridCreated" + sender.get_id());
...
}
function BtnEditAllPressed<%= ClientID%>(sender, args) {
...
}
function ToggleFilterBar<%= ClientID%>(sender, args) {
console.log("ToggleFilterBar");
...
}
</
script
>
</
telerik:RadScriptBlock
>
<
telerik:RadAjaxManagerProxy
ID
=
"RadAjaxManagerProxy1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadGrid1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
></
telerik:AjaxUpdatedControl
>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>
And Here the main page:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
<%@ Register TagPrefix="uc" TagName="BasicControl" Src="~/Commons/BasicControl.ascx" %>
<!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
></
title
>
<
telerik:RadStyleSheetManager
id
=
"RadStyleSheetManager1"
runat
=
"server"
/>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
></
telerik:RadAjaxLoadingPanel
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadListViewTrattamenti"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadListViewTrattamenti"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"ProcedimentiDedicatiInTrattamentiGrid"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"ProcedimentiInTrattamentiGrid"
LoadingPanelId
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
uc:BasicControl
id
=
"ProcedimentiDedicatiInTrattamentiGrid"
runat
=
"server"
Visible
=
"true"
OnNeedDataSource
=
"ProcedimentiDedicatiInTrattamentiGrid_NeedDataSource"
>
</
uc:BasicControl
>
<
table
>
<
tr
>
<
td
style
=
"width:20%"
>
<
telerik:RadListView
RenderMode
=
"Lightweight"
runat
=
"server"
ID
=
"RadListViewTrattamenti"
DataKeyNames
=
"Id"
AllowPaging
=
"true"
AllowCustomPaging
=
"true"
PageSize
=
"5"
ItemPlaceholderID
=
"TrattamentiHolder"
OnPageIndexChanged
=
"RadListViewTrattamenti_PageIndexChanged"
OnNeedDataSource
=
"RadListViewTrattamenti_NeedDataSource"
OnSelectedIndexChanged
=
"RadListViewTrattamenti_SelectedIndexChanged"
>
<
LayoutTemplate
>
<
fieldset
style
=
"display:inline-block"
>
<
legend
>Trattamenti</
legend
>
<
asp:Panel
ID
=
"TrattamentiHolder"
runat
=
"server"
></
asp:Panel
>
</
fieldset
>
</
LayoutTemplate
>
<
ItemTemplate
>
<
asp:LinkButton
runat
=
"server"
CommandName
=
"Select"
>
<%#Eval("Nome") %>
</
asp:LinkButton
>
<
br
/>
</
ItemTemplate
>
<
SelectedItemTemplate
>
<
asp:Label
runat
=
"server"
BackColor
=
"YellowGreen"
>
<%#Eval("Nome") %>
</
asp:Label
><
br
/>
</
SelectedItemTemplate
>
</
telerik:RadListView
>
</
td
>
<
td
style
=
"width:80%"
>
<
uc:BasicControl
id
=
"ProcedimentiInTrattamentiGrid"
runat
=
"server"
Visible
=
"true"
OnNeedDataSource
=
"ProcedimentiInTrattamentiGrid_NeedDataSource"
>
</
uc:BasicControl
>
</
td
>
</
tr
>
</
table
>
<
telerik:RadScriptBlock
ID
=
"RadListBoxScripts"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function OnClientLoad(sender) {
var listBox = sender;
listBox.requestItems(listBox.get_items().get_count(), 10);
}
</
script
>
</
telerik:RadScriptBlock
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
<
Scripts
>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.Core.js"
/>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQuery.js"
/>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQueryInclude.js"
/>
</
Scripts
>
</
telerik:RadScriptManager
>
<
script
type
=
"text/javascript"
>
//Put your JavaScript code here.
</
script
>
</
div
>
</
form
>
</
body
>
</
html
>
So, ProcedimentiInTrattamentiGrid is updated, while ProcedimentiDedicatiInTrattamentiGrid is not.
What could be the problem?
The user controls are working, because if I select a new element in RadListViewTrattamenti, the ProcedimentiInTrattamentiGrid is updated with new values, ProcedimentiDedicatiInTrattamentiGrid no, but if I change the page it shows the new values, it seems the the NeedDataSource Event isn't fired for this one grid.
Thank you
I'm wondering if anyone can advise on integrating this confirmation dialog into kendo and styling it so it's more similar?
Is it even compatible? I think it should be but so far haven't had any luck getting it up and running - I've only got a few months experience in JS.
http://demos.pierrejeanparra.com/jquery-plugins/fast-confirm/test.html
http://blog.pierrejeanparra.com/jquery-plugins/fast-confirm/
I'm brand new to Telerik. I have never used it before today. I want to display a grid and then allow the user to click on the Edit icon and be presented with a textbox containing an email address. I then want to allow the user to change the email address. Here is my aspx page:
<%@ Page Title="Email Redirect Maintenance" Language="C#" MasterPageFile="~/ITSMandReports.Master" AutoEventWireup="true" CodeBehind="EmailRedirectMaint.aspx.cs" Inherits="SM_ITSRD.ITSM.ReportPortal.AC.EmailRedirectMaint" %>
<%@ Register Src="~/Controls/EmployeePicker.ascx" TagPrefix="uc1" TagName="EmployeePicker" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<h2>Email Redirect Maintenance</h2>
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"></asp:ScriptManagerProxy>
<telerik:RadAjaxManagerProxy ID="RadAjaxProxy1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadRedirectEmail">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadRedirectEmail" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManagerProxy>
<asp:Button ID="btnAddNew" runat="server" Text="Add New" OnClick="btnAddNew_Click" />
<asp:Button ID="btnUpdate" runat="server" Text="Return to Edit view" OnClick="btnUpdate_Click" Visible="false" />
<div runat="server" id="divAddNew" visible="false">
<asp:Table ID="tblAddnew" runat="server" CssClass="table">
<asp:TableHeaderRow>
<asp:TableHeaderCell ColumnSpan="4">Add New</asp:TableHeaderCell>
</asp:TableHeaderRow>
<asp:TableRow>
<asp:TableCell ColumnSpan="4">
<uc1:EmployeePicker runat="server" ID="EmployeePicker" OnEmployeeSelected="EmployeePicker_EmployeeSelected" />
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="Label1" runat="server" Font-Bold="true" Width="320">Redirect Email Address: </asp:Label>
<asp:TextBox ID="txtRedirectEmailAddress" runat="server" MaxLength="200" Width="320"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtRedirectEmailAddress" ErrorMessage="Please Enter a Valid Email Address" ForeColor="Red" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" SetFocusOnError="true" ValidationGroup="InsertGroup1"></asp:RegularExpressionValidator>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
<asp:Button ID="btnInsert" runat="server" Text="Insert employee with the above listed hours." OnClick="btnInsert_Click" ValidationGroup="InsertGroup1" />
</div>
<div runat="server" id="divUpdate">
<telerik:RadGrid ID="gvEmailRedirectMaint" runat="server" AllowFilteringByColumn="True" AllowSorting="true"
GroupPanelPosition="Top" RenderMode="Lightweight" EnableLinqExpressions="false" OnItemDataBound="gvEmailRedirectMaint_ItemDataBound"
OnNeedDataSource="gvEmailRedirectMaint_NeedDataSource" OnUpdateCommand="gvEmailRedirectMaint_UpdateCommand" OnDeleteCommand="gvEmailRedirectMaint_DeleteCommand">
<GroupingSettings CollapseAllTooltip="Collapse all groups" CaseSensitive="false"></GroupingSettings>
<ClientSettings>
<Resizing AllowColumnResize="true" AllowRowResize="true" ResizeGridOnColumnResize="false" ClipCellContentOnResize="true" EnableRealTimeResize="false" AllowResizeToFit="true" />
</ClientSettings>
<AlternatingItemStyle BackColor="#E0E0E0" />
<MasterTableView AutoGenerateColumns="false" TableLayout="Auto" CommandItemDisplay="Top" DataKeyNames="ID" EditMode="EditForms">
<CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" />
<Columns>
<telerik:GridEditCommandColumn HeaderText="Edit:" ButtonType="ImageButton">
<HeaderStyle Width="50px" />
<ItemStyle Width="50px" />
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn DataField="RedirectEmailAddress" AllowFiltering="false" HeaderText="Redirect Email Address" UniqueName="RedirectEmailAddress" ReadOnly="false">
<HeaderStyle Width="320px" />
<ItemStyle Width="320px" />
</telerik:GridBoundColumn>
<telerik:GridButtonColumn CommandName="Delete" HeaderText="Delete?" Text="Delete" ConfirmText="Are you sure you want to delete this record?" ButtonType="ImageButton" UniqueName="DeleteColumn"></telerik:GridButtonColumn>
</Columns>
</MasterTableView>
<HeaderStyle Font-Bold="True" />
<CommandItemStyle VerticalAlign="Top" />
<ItemStyle VerticalAlign="Top" />
</telerik:RadGrid>
</div>
</asp:Content>
Here is my C# code behind code:
using CommonCS;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
namespace SM_ITSRD.ITSM.ReportPortal.AC
{
public partial class EmailRedirectMaint : System.Web.UI.Page
{
private bool tableCopied = false;
private DataTable originalDataTable;
string userID = HttpContext.Current.Request.LogonUserIdentity.Name.Split('\\')[1];
string connString = ConfigurationManager.ConnectionStrings["ItsmConnectionString"].ConnectionString;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindGrid();
}
}
protected void gvEmailRedirectMaint_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
if (!tableCopied)
{
originalDataTable = ((DataRowView)e.Row.DataItem).Row.Table.Copy();
ViewState["originalValuesDataTable"] = originalDataTable;
tableCopied = true;
}
}
protected void BindGrid()
{
ACRedirectEmailAddress objACRedirectEmailAddress = new ACRedirectEmailAddress(connString);
gvEmailRedirectMaint.DataSource = objACRedirectEmailAddress.GetEmailRedirects();
}
protected void gvEmailRedirectMaint_DeleteCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
{
GridDataItem item = (GridDataItem)e.Item;
string dataKey = item.GetDataKeyValue("ID").ToString();
string strSQLconnection = ConfigurationManager.ConnectionStrings["ITSMConnectionString"].ConnectionString;
StringBuilder _query = new StringBuilder();
_query.Append("delete from AC_EmailRedirect ");
_query.Append(" Where ID = '" + dataKey);
_query.Append("'");
SqlConnection con = new SqlConnection(strSQLconnection);
con.Open();
SqlCommand comm = new SqlCommand();
comm.Connection = con;
comm.CommandType = CommandType.Text;
comm.CommandText = _query.ToString();
int rowsAffected = comm.ExecuteNonQuery();
con.Close();
}
protected void gvEmailRedirectMaint_UpdateCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
{
GridEditableItem editItem = (GridEditableItem)e.Item;
string newVIPPreferredID = (editItem["VIPPreferredID"].Controls[0] as TextBox).Text;
string newRedirectEmailAddress = txtRedirectEmailAddress.Text; // (editItem["RedirectEmailAddress"].Controls[0] as TextBox).Text;
string newCreatedBy = userID; // (editItem["CreatedBy"].Controls[0] as TextBox).Text;
string newModifiedBy = userID; // (editItem["ModifiedBy"].Controls[0] as TextBox).Text;
GridEditFormItem efi = (GridEditFormItem)e.Item;
GridDataItem dataItem = efi.ParentItem;
string dataKey = Convert.ToString(efi.GetDataKeyValue("ID"));
string strSQLconnection = ConfigurationManager.ConnectionStrings["ITSMConnectionString"].ConnectionString;
StringBuilder _query = new StringBuilder();
_query.Append("update AC_EmailRedirect set ");
_query.Append("VIPPreferredID = " + newVIPPreferredID);
_query.Append(",RedirectEmailAddress = " + txtRedirectEmailAddress.Text);
_query.Append(",CreatedBy = " + newCreatedBy);
_query.Append("',CreatedDate = GetDate()");
_query.Append(",modifiedBy = '" + userID);
_query.Append("',modifiedDate = GetDate()");
_query.Append(" Where ID = '" + dataKey);
_query.Append("'");
SqlConnection con = new SqlConnection(strSQLconnection);
con.Open();
SqlCommand comm = new SqlCommand();
comm.Connection = con;
comm.CommandType = CommandType.Text;
comm.CommandText = _query.ToString();
int rowsAffected = comm.ExecuteNonQuery();
con.Close();
}
protected void gvEmailRedirectMaint_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
ACRedirectEmailAddress objACRedirectEmailAddress = new ACRedirectEmailAddress(connString);
gvEmailRedirectMaint.DataSource = objACRedirectEmailAddress.GetEmailRedirects();
}
protected void btnAddNew_Click(object sender, EventArgs e)
{
txtRedirectEmailAddress.Text = "";
divAddNew.Visible = true;
divUpdate.Visible = false;
btnUpdate.Visible = true;
}
protected void EmployeePicker_EmployeeSelected(object sender, EmployeeSelectedEventArgs e)
{
//this takes the employees email address for the employee that was selected in the EmployeePicker
//and inserts the email address in to the text box next to the forward button.
txtPrefID.Text = e.SelectedEmployee.PreferredID.ToString();
txtPrefID.Visible = true;
lblPrefID_0.Visible = true;
}
protected void btnInsert_Click(object sender, EventArgs e)
{
string strSQLconnection = ConfigurationManager.ConnectionStrings["ITSMConnectionString"].ConnectionString;
StringBuilder _query = new StringBuilder();
_query.Append(@"
INSERT INTO AC_EmailRedirect (VIPPreferredID,
RedirectEmailAddress,
userID,
createDate,
userID,
ModifiedDate)
values (
@VIPPreferredID,
@RedirectEmailAddress,
userID,
getDate(),
userID,
getDate()
) ");
SqlConnection con = new SqlConnection(strSQLconnection);
con.Open();
SqlCommand comm = new SqlCommand();
comm.Connection = con;
comm.CommandType = CommandType.Text;
comm.CommandText = _query.ToString();
comm.Parameters.AddWithValue("@VIPPreferredID", txtPrefID.Text);
comm.Parameters.AddWithValue("@RedirectEmailAddress", txtRedirectEmailAddress.Text);
comm.Parameters.AddWithValue("@pCreatedBy", userID);
comm.Parameters.AddWithValue("@pModifiedBy", userID);
int rowsAffected = comm.ExecuteNonQuery();
con.Close();
Response.Redirect(Request.RawUrl);
}
protected void btnUpdate_Click(object sender, EventArgs e)
{
divAddNew.Visible = false;
divUpdate.Visible = true;
btnUpdate.Visible = false;
}
}
}
A few questions:
1. The delete works perfectly.
2. When I click the Edit icon, I do get txtRedirectEmailAddress with the correct value. But if I change it, and put a breakpoint in my code. I notice txtRedirectEmailAddress.Text is blank ("").
3. I tried changing the width of the email textbox but it's not working. How do I set the width?
4. So when I click the Edit icon, I do get the email address in the textbox. I also get the update and cancel icons.
5. When I click the update icon, I get this error:
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near ','.
Unclosed quotation mark after the character string ''.
I'm having trouble finding the error. Can anyone help?
I have a GridCalculatedColumn that is not summing up the values properly when there is a negative value. Currently it is giving a total that is treating the negative value as if it's positive. The negative values (p1,p2,p3..etc) are shown in brackets indicating it's negative on the grid but is not calculated as such on the total. Is there any setting on the gridcalculatedcolumn so that I can make sure it will consider negative values?
<Columns>
<telerik:GridBoundColumn DataField="RESOURCE" HeaderText="Resource Name / PO" FilterControlAltText="Filter RESOURCE column" SortExpression="RESOURCE" ReadOnly="True" UniqueName="RESOURCE" HeaderStyle-Width="100px">
<ColumnValidationSettings>
</ColumnValidationSettings>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="RESOURCE_ID" HeaderText="Cost Center / Vendor" FilterControlAltText="Filter RESOURCE_ID column" HeaderStyle-Width="200px" SortExpression="RESOURCE_ID" ReadOnly="True" UniqueName="RESOURCE_ID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LABOUR_TYPE" HeaderText="Type" FilterControlAltText="Filter LABOUR_TYPE column" SortExpression="LABOUR_TYPE" UniqueName="LABOUR_TYPE" ReadOnly="True" HeaderStyle-Width="80px">
</telerik:GridBoundColumn>
<telerik:GridNumericColumn Aggregate="Sum" FooterText=" " DataField="P1" DataType="System.Double" FilterControlAltText="Filter P1 column" HeaderStyle-Width="65px" HeaderText="P1" ReadOnly="True" SortExpression="P1" UniqueName="P1" NumericType="Currency" FooterAggregateFormatString="{0:C}">
<ColumnValidationSettings>
</ColumnValidationSettings>
</telerik:GridNumericColumn>
<telerik:GridNumericColumn Aggregate="Sum" FooterText=" " DataField="P2" DataType="System.Double" FilterControlAltText="Filter P2 column" HeaderStyle-Width="65px" HeaderText="P2" SortExpression="P2" UniqueName="P2" NumericType="Currency" FooterAggregateFormatString="{0:C}">
<ColumnValidationSettings>
</ColumnValidationSettings>
</telerik:GridNumericColumn>
<telerik:GridNumericColumn Aggregate="Sum" FooterText=" " DataField="P3" DataType="System.Double" FilterControlAltText="Filter P3 column" HeaderStyle-Width="65px" HeaderText="P3" SortExpression="P3" UniqueName="P3" NumericType="Currency" FooterAggregateFormatString="{0:C}">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridNumericColumn>
<telerik:GridNumericColumn Aggregate="Sum" FooterText=" " DataField="P4" DataType="System.Decimal" FilterControlAltText="Filter P4 column" HeaderStyle-Width="65px" HeaderText="P4" SortExpression="P4" UniqueName="P4" NumericType="Currency" FooterAggregateFormatString="{0:C}">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridNumericColumn>
<telerik:GridNumericColumn Aggregate="Sum" FooterText=" " DataField="P5" DataType="System.Decimal" FilterControlAltText="Filter P5 column" HeaderStyle-Width="65px" HeaderText="P5" SortExpression="P5" UniqueName="P5" NumericType="Currency" FooterAggregateFormatString="{0:C}">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridNumericColumn>
<telerik:GridNumericColumn Aggregate="Sum" FooterText=" " DataField="P6" DataType="System.Decimal" FilterControlAltText="Filter P6 column" HeaderStyle-Width="65px" HeaderText="P6" SortExpression="P6" UniqueName="P6" NumericType="Currency" FooterAggregateFormatString="{0:C}">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridNumericColumn>
<telerik:GridNumericColumn Aggregate="Sum" FooterText=" " DataField="P7" DataType="System.Decimal" FilterControlAltText="Filter P7 column" HeaderStyle-Width="65px" HeaderText="P7" SortExpression="P7" UniqueName="P7" NumericType="Currency" FooterAggregateFormatString="{0:C}">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridNumericColumn>
<telerik:GridNumericColumn Aggregate="Sum" FooterText=" " DataField="P8" DataType="System.Decimal" FilterControlAltText="Filter P8 column" HeaderStyle-Width="65px" HeaderText="P8" SortExpression="P8" UniqueName="P8" NumericType="Currency" FooterAggregateFormatString="{0:C}">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridNumericColumn>
<telerik:GridNumericColumn Aggregate="Sum" FooterText=" " DataField="P9" DataType="System.Decimal" FilterControlAltText="Filter P9 column" HeaderStyle-Width="65px" HeaderText="P9" SortExpression="P9" UniqueName="P9" NumericType="Currency" FooterAggregateFormatString="{0:C}">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridNumericColumn>
<telerik:GridNumericColumn Aggregate="Sum" FooterText=" " DataField="P10" DataType="System.Decimal" FilterControlAltText="Filter P10 column" HeaderStyle-Width="65px" HeaderText="P10" SortExpression="P10" UniqueName="P10" NumericType="Currency" FooterAggregateFormatString="{0:C}">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridNumericColumn>
<telerik:GridNumericColumn Aggregate="Sum" FooterText=" " DataField="P11" DataType="System.Decimal" FilterControlAltText="Filter P11 column" HeaderStyle-Width="65px" HeaderText="P11" SortExpression="P11" UniqueName="P11" NumericType="Currency" FooterAggregateFormatString="{0:C}">
</telerik:GridNumericColumn>
<telerik:GridNumericColumn Aggregate="Sum" FooterText=" " DataField="P12" DataType="System.Decimal" FilterControlAltText="Filter P12 column" HeaderStyle-Width="65px" HeaderText="P12" SortExpression="P12" UniqueName="P12" NumericType="Currency" FooterAggregateFormatString="{0:C}">
</telerik:GridNumericColumn>
<telerik:GridCalculatedColumn HeaderText="Total" HeaderStyle-Width="120px" UniqueName="TotalPrice" DataType="System.Decimal"
DataFields="P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12" Expression="{0}+{1}+{2}+{3}+{4}+{5}+{6}+{7}+{8}+{9}+{10}+{11}" FooterText=" "
Aggregate="Sum" DataFormatString="{0:$###,##0.00}">
</telerik:GridCalculatedColumn>
</Columns>