Hi,
I just want to change color for "Week,Day,Month,Year" buttons to white because its unreadable. I couldn't find any property to change them please find the attached image of RadGantt and here is my code
<telerik:RadGantt ID="RadGantt1" runat="server" Height="245px" Width="1122px"
AutoGenerateColumns="false" ReadOnly="true" SelectedView="MonthView">
<YearView UserSelectable="true" />
<Columns>
<telerik:GanttBoundColumn DataField="Title" DataType="String"></telerik:GanttBoundColumn>
</Columns>
<DataBindings >
<TasksDataBindings IdField="ID" TitleField="Title" StartField="Start" EndField="End"
PercentCompleteField="PercentComplete" OrderIdField="OrderID" SummaryField="Summary" ParentIdField="ParentID" />
<DependenciesDataBindings IdField="ID" PredecessorIdField="PredecessorID"
SuccessorIdField="SuccessorID" TypeField="Type" />
</DataBindings>
</telerik:RadGantt>
I have hierarchy grid. I am able to edit\delete parent grid but not child grid (second grid). I using the same code behind and subs for both the grids. When I click on edit button for row of second grid, it enables edit mode but when I click on update button, it is not changing values on UI nor in database tables. And build is correct, it is not giving any error. Following is my code. If anybody can please help me!
<%@ Page Language="vb" AutoEventWireup="false" Inherits="WebApplication1.invoice_details" CodeBehind="invoice_details.aspx.vb" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<div>
<telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server" ShowStatusBar="true"
AutoGenerateColumns="False" AllowSorting="True" AllowMultiRowSelection="False"
AllowAutomaticDeletes="True"
AllowAutomaticUpdates="True" OnItemUpdated="RadGrid1_ItemUpdated" OnItemDeleted="RadGrid1_ItemDeleted">
<PagerStyle Mode="NumericPages"></PagerStyle>
<MasterTableView DataSourceID="SqlDataSource1" EditMode = "InPlace" DataKeyNames="case_id" AllowMultiColumnSorting="True"
Width="100%" CommandItemDisplay="Top" Name="Cases">
<DetailTables>
<telerik:GridTableView EditMode = "InPlace" DataKeyNames="item_id" DataSourceID="SqlDataSource2" Width="100%"
runat="server" CommandItemDisplay="Top" Name="Items">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="case_id" MasterKeyField="case_id"></telerik:GridRelationFields>
</ParentTableRelation>
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn2">
<HeaderStyle Width="20px"></HeaderStyle>
<ItemStyle CssClass="MyImageButton"></ItemStyle>
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn SortExpression="grp_id" HeaderText="Group" HeaderButtonType="TextButton"
DataField="grp_id" UniqueName="grp_id" ReadOnly = "True">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="item_id" HeaderText="Item ID" HeaderButtonType="TextButton"
DataField="item_id" UniqueName="item_id" ReadOnly = "True" Visible = "False">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="inv_item_desc" HeaderText="Item Description" HeaderButtonType="TextButton"
DataField="inv_item_desc" UniqueName="inv_item_desc">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="inv_item_rate" HeaderText="Rate" HeaderButtonType="TextButton"
DataField="inv_item_rate" UniqueName="inv_item_rate">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="inv_item_qty" HeaderText="Quantity" HeaderButtonType="TextButton"
DataField="inv_item_qty" UniqueName="inv_item_qty">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="total" HeaderText="Total" HeaderButtonType="TextButton"
DataField="total" UniqueName="total" ReadOnly = "True">
</telerik:GridBoundColumn>
<telerik:GridButtonColumn ConfirmText="Delete these details record?" ButtonType="ImageButton"
CommandName="Delete" Text="Delete" UniqueName="DeleteColumn2">
<HeaderStyle Width="20px"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
</telerik:GridButtonColumn>
</Columns>
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
<HeaderStyle Width="20px"></HeaderStyle>
<ItemStyle CssClass="MyImageButton"></ItemStyle>
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn SortExpression="case_id" HeaderText="Case ID" HeaderButtonType="TextButton"
DataField="case_id" UniqueName="case_id" MaxLength="5" ReadOnly = "True">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="case_file_nbr" HeaderText="Case File Number" HeaderButtonType="TextButton"
DataField="case_file_nbr" UniqueName="case_file_nbr">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="case_desc" HeaderText="Case Description" HeaderButtonType="TextButton"
DataField="case_desc" UniqueName="case_desc">
</telerik:GridBoundColumn>
<telerik:GridButtonColumn ConfirmText="Delete this case?" ButtonType="ImageButton"
CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
<HeaderStyle Width="20px"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
</telerik:GridButtonColumn>
</Columns>
<SortExpressions>
<telerik:GridSortExpression FieldName="case_desc"></telerik:GridSortExpression>
</SortExpressions>
</MasterTableView>
</telerik:RadGrid>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="Server=172.18.1.11;Database=ent64ast;user id=entqalogin;password=en7qal8g1n5"
DeleteCommand="DELETE FROM tbl_inv_case WHERE org_id= 'Oindem' and inv_no=31 and case_id = @case_id"
SelectCommand="SELECT case_id,case_file_nbr,case_desc from tbl_inv_case where org_id='Oindem' and inv_no=31"
UpdateCommand="UPDATE tbl_inv_case SET case_file_nbr = @case_file_nbr, case_desc = @case_desc WHERE org_id= 'Oindem' and inv_no=31 and case_id = @case_id">
<DeleteParameters>
<asp:Parameter Name="case_id" Type="String"></asp:Parameter>
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="org_id" Type="String"></asp:Parameter>
<asp:Parameter Name="inv_no" Type="String"></asp:Parameter>
<asp:Parameter Name="case_id" Type="String"></asp:Parameter>
<asp:Parameter Name="case_file_nbr" Type="String"></asp:Parameter>
<asp:Parameter Name="case_desc" Type="String"></asp:Parameter>
<asp:Parameter Name="case_amnt" Type="String"></asp:Parameter>
<asp:SessionParameter Name="login_id" Type="string" SessionField="loginid" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="case_id" Type="String"></asp:Parameter>
<asp:Parameter Name="case_file_nbr" Type="String"></asp:Parameter>
<asp:Parameter Name="case_desc" Type="String"></asp:Parameter>
</UpdateParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="Server=172.18.1.11;Database=ent64ast;user id=entqalogin;password=en7qal8g1n5"
DeleteCommand="DELETE FROM tbl_inv_case_items WHERE org_id= 'Oindem' and inv_no=31 and case_id = @case_id and item_id = @item_id"
SelectCommand="SELECT grp_id,case_id,item_id,inv_item_desc,inv_item_rate,inv_item_qty, cast(inv_item_rate*inv_item_qty as decimal(18,2)) 'total' FROM tbl_inv_case_items WHERE org_id='Oindem' AND inv_no=31 AND case_id = @case_id ORDER BY grp_id,case_id, inv_item_seqn"
UpdateCommand="UPDATE tbl_inv_case_items SET inv_item_desc = @inv_item_desc, inv_item_rate = @inv_item_rate, inv_item_qty = @inv_item_qty WHERE org_id= 'Oindem' AND inv_no=31 AND case_id = @case_id AND item_id = @item_id">
<DeleteParameters>
<asp:Parameter Name="item_id" Type="Int32"></asp:Parameter>
<asp:Parameter Name="case_id" Type="String"></asp:Parameter>
</DeleteParameters>
<SelectParameters>
<asp:Parameter Name="case_id" Type="String"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="inv_item_desc" Type="String"></asp:Parameter>
<asp:Parameter Name="inv_item_rate" Type="Double"></asp:Parameter>
<asp:Parameter Name="inv_item_qty" Type="Double"></asp:Parameter>
<asp:Parameter Name="item_id" Type="String"></asp:Parameter>
<asp:Parameter Name="case_id" Type="String"></asp:Parameter>
</UpdateParameters>
</asp:SqlDataSource>
</form>
</body>
</html>
Hey guys,
im trying to follow the example from http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx but i am unable to follow. I removed the datasource part becuase im not having the demo database installed and tried to use some static data instead but it seems like somehow neither my events nor the ajax stuff is fired. Anyone
Codebehind:
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
System.Data;
using
Telerik.Web.UI;
namespace
WebApplication2
{
public
partial
class
_Default : System.Web.UI.Page
{
protected
void
Page_Load(
object
sender, EventArgs e)
{
DataTable dt =
new
DataTable();
DataColumn dc1 =
new
DataColumn();
dc1.ColumnName =
"ProductID"
;
dc1.Caption =
"ProductID"
;
dc1.DataType =
typeof
(
int
);
dt.Columns.Add(dc1);
DataColumn dc2 =
new
DataColumn();
dc2.ColumnName =
"ProductName"
;
dc2.Caption =
"ProductName"
;
dc2.DataType =
typeof
(
string
);
dt.Columns.Add(dc2);
DataColumn dc3 =
new
DataColumn();
dc3.ColumnName =
"CategoryID"
;
dc3.Caption =
"CategoryID"
;
dc3.DataType =
typeof
(
int
);
dt.Columns.Add(dc3);
DataColumn dc4 =
new
DataColumn();
dc4.ColumnName =
"CategoryName"
;
dc4.Caption =
"CategoryName"
;
dc4.DataType =
typeof
(
string
);
dt.Columns.Add(dc4);
DataColumn dc5 =
new
DataColumn();
dc5.ColumnName =
"UnitPrice"
;
dc5.Caption =
"UnitPrice"
;
dc5.DataType =
typeof
(
decimal
);
dt.Columns.Add(dc5);
DataColumn dc6 =
new
DataColumn();
dc6.ColumnName =
"Discontinued"
;
dc6.Caption =
"Discontinued"
;
dc6.DataType =
typeof
(
bool
);
dt.Columns.Add(dc6);
DataColumn dc7 =
new
DataColumn();
dc7.ColumnName =
"UnitsInStock"
;
dc7.Caption =
"UnitsInStock"
;
dc7.DataType =
typeof
(
int
);
dt.Columns.Add(dc7);
dt.Rows.Add(1,
"name"
, 1,
"cname"
, 20,
false
, 20);
RadGrid1.DataSource = dt;
}
protected
void
RadGrid1_BatchEditCommand(
object
sender, Telerik.Web.UI.GridBatchEditingEventArgs e)
{
SavedChangesList.Visible =
true
;
}
protected
void
RadGrid1_ItemUpdated(
object
source, Telerik.Web.UI.GridUpdatedEventArgs e)
{
GridEditableItem item = (GridEditableItem)e.Item;
String id = item.GetDataKeyValue(
"ProductID"
).ToString();
if
(e.Exception !=
null
)
{
e.KeepInEditMode =
true
;
e.ExceptionHandled =
true
;
NotifyUser(
"Product with ID "
+ id +
" cannot be updated. Reason: "
+ e.Exception.Message);
}
else
{
NotifyUser(
"Product with ID "
+ id +
" is updated!"
);
}
}
protected
void
RadGrid1_ItemInserted(
object
source, GridInsertedEventArgs e)
{
if
(e.Exception !=
null
)
{
e.ExceptionHandled =
true
;
NotifyUser(
"Product cannot be inserted. Reason: "
+ e.Exception.Message);
}
else
{
NotifyUser(
"New product is inserted!"
);
}
}
protected
void
RadGrid1_ItemDeleted(
object
source, GridDeletedEventArgs e)
{
GridDataItem dataItem = (GridDataItem)e.Item;
String id = dataItem.GetDataKeyValue(
"ProductID"
).ToString();
if
(e.Exception !=
null
)
{
e.ExceptionHandled =
true
;
NotifyUser(
"Product with ID "
+ id +
" cannot be deleted. Reason: "
+ e.Exception.Message);
}
else
{
NotifyUser(
"Product with ID "
+ id +
" is deleted!"
);
}
}
protected
void
RadGrid1_PreRender(
object
sender, EventArgs e)
{
//RadNumericTextBox unitsNumericTextBox = (RadGrid1.MasterTableView.GetBatchColumnEditor("UnitsInStock") as GridNumericColumnEditor).NumericTextBox;
//unitsNumericTextBox.Width = Unit.Pixel(60);
}
private
void
NotifyUser(
string
message)
{
RadListBoxItem commandListItem =
new
RadListBoxItem();
commandListItem.Text = message;
SavedChangesList.Items.Add(commandListItem);
}
}
}
Markup:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication2._Default" %>
<%@ Register Assembly="Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<
html
xmlns
=
'http://www.w3.org/1999/xhtml'
>
<
head
id
=
"Head1"
runat
=
"server"
>
<
title
>Telerik ASP.NET Example</
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
runat
=
"server"
ID
=
"RadScriptManager1"
/>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadGrid1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"SavedChangesList"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxLoadingPanel
runat
=
"server"
ID
=
"RadAjaxLoadingPanel1"
>
</
telerik:RadAjaxLoadingPanel
>
<
div
id
=
"demo"
class
=
"demo-container no-bg"
>
<
telerik:RadListBox
runat
=
"server"
ID
=
"SavedChangesList"
Width
=
"600px"
Height
=
"200px"
Visible
=
"false"
>
</
telerik:RadListBox
>
<
telerik:RadGrid
ID
=
"RadGrid1"
GridLines
=
"None"
runat
=
"server"
AllowAutomaticDeletes
=
"True"
AllowAutomaticInserts
=
"True"
PageSize
=
"10"
OnItemDeleted
=
"RadGrid1_ItemDeleted"
OnItemInserted
=
"RadGrid1_ItemInserted"
OnItemUpdated
=
"RadGrid1_ItemUpdated"
OnPreRender
=
"RadGrid1_PreRender"
AllowAutomaticUpdates
=
"True"
AllowPaging
=
"True"
AutoGenerateColumns
=
"False"
OnBatchEditCommand
=
"RadGrid1_BatchEditCommand"
>
<
MasterTableView
CommandItemDisplay
=
"TopAndBottom"
DataKeyNames
=
"ProductID"
HorizontalAlign
=
"NotSet"
EditMode
=
"Batch"
AutoGenerateColumns
=
"False"
>
<
BatchEditingSettings
EditType
=
"Cell"
/>
<
SortExpressions
>
<
telerik:GridSortExpression
FieldName
=
"ProductID"
SortOrder
=
"Descending"
/>
</
SortExpressions
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"ProductName"
HeaderStyle-Width
=
"210px"
HeaderText
=
"ProductName"
SortExpression
=
"ProductName"
UniqueName
=
"ProductName"
>
<
ColumnValidationSettings
EnableRequiredFieldValidation
=
"true"
>
<
RequiredFieldValidator
ForeColor
=
"Red"
Text
=
"*This field is required"
Display
=
"Dynamic"
>
</
RequiredFieldValidator
>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
<
telerik:GridNumericColumn
DataField
=
"UnitsInStock"
HeaderStyle-Width
=
"80px"
HeaderText
=
"Units In Stock"
SortExpression
=
"UnitsInStock"
UniqueName
=
"UnitsInStock"
>
</
telerik:GridNumericColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"Discontinued"
HeaderStyle-Width
=
"80px"
HeaderText
=
"Discontinued"
SortExpression
=
"Discontinued"
UniqueName
=
"Discontinued"
>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"UnitPrice"
HeaderStyle-Width
=
"80px"
SortExpression
=
"UnitPrice"
UniqueName
=
"TemplateColumn"
DataField
=
"UnitPrice"
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblUnitPrice"
Text='<%# Eval("UnitPrice", "{0:C}") %>'></
asp:Label
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
span
>
<
telerik:RadNumericTextBox
Width
=
"55px"
runat
=
"server"
ID
=
"tbUnitPrice"
>
</
telerik:RadNumericTextBox
>
<
span
style
=
"color: Red"
>
<
asp:RequiredFieldValidator
ID
=
"RequiredFieldValidator1"
ControlToValidate
=
"tbUnitPrice"
ErrorMessage
=
"*Required"
runat
=
"server"
Display
=
"Dynamic"
>
</
asp:RequiredFieldValidator
>
</
span
></
span
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridButtonColumn
ConfirmText
=
"Delete this product?"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"Delete"
HeaderText
=
"Delete"
HeaderStyle-Width
=
"50px"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
Text
=
"Delete"
UniqueName
=
"DeleteColumn"
>
</
telerik:GridButtonColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
AllowKeyboardNavigation
=
"true"
>
</
ClientSettings
>
</
telerik:RadGrid
>
</
div
>
</
form
>
</
body
>
</
html
>
Hi,
We have a RadGrid control called "RadGrid1" and have it defined as follows in our ASPX page
<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="Both">
</telerik:RadGrid>
In our Vb.Net codebehind, we are using an aggregate function as follows to display the sum in the footer of the grid.
boundcol(index).Aggregate() = GridAggregateFunction.Sum
We do not want all the row items to be included in this sum.
Is there a way to only include the last 2 records in the summation?
I tried to configure RadGrid1_CustomAggregate using the follow code in the ASPX file
<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="Both" Aggregate="Custom" OnCustomAggregate="RadGrid1_CustomAggregate">
</telerik:RadGrid>
The vb.net file looks like the following for CustomAggregate configuration:
Protected Sub RadGrid1_CustomAggregate(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCustomAggregateEventArgs) Handles RadGrid1.CustomAggregate
End Sub
However, this event is not being fired.
I am using Telerik DevCraft version 2013.3 1014
Please advise how we can only include the last 2 records in the summation.
Thanks!
Avo
For grid - update\delete\insert hierarchy I am not able edit\update child grid. I am able to edit\update parent grid but not the child grid though both are using the same code behind. I checked with the sql queries too. For child grid, when I click on edit button, it enables editing but when I click on update after changing the values, it is not updating in UI nor in database table. It is not giving any error though. Below is my code behind. Please if anybody can help me!
<%@ Page Language="vb" AutoEventWireup="false" Inherits="WebApplication1.invoice_details" CodeBehind="invoice_details.aspx.vb" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<div>
<telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server" ShowStatusBar="true"
AutoGenerateColumns="False" AllowSorting="True" AllowMultiRowSelection="False"
AllowAutomaticDeletes="True"
AllowAutomaticUpdates="True" OnItemUpdated="RadGrid1_ItemUpdated" OnItemDeleted="RadGrid1_ItemDeleted">
<PagerStyle Mode="NumericPages"></PagerStyle>
<MasterTableView DataSourceID="SqlDataSource1" EditMode = "InPlace" DataKeyNames="case_id" AllowMultiColumnSorting="True"
Width="100%" CommandItemDisplay="Top" Name="Cases">
<DetailTables>
<telerik:GridTableView EditMode = "InPlace" DataKeyNames="item_id" DataSourceID="SqlDataSource2" Width="100%"
runat="server" CommandItemDisplay="Top" Name="Items">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="case_id" MasterKeyField="case_id"></telerik:GridRelationFields>
</ParentTableRelation>
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn2">
<HeaderStyle Width="20px"></HeaderStyle>
<ItemStyle CssClass="MyImageButton"></ItemStyle>
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn SortExpression="grp_id" HeaderText="Group" HeaderButtonType="TextButton"
DataField="grp_id" UniqueName="grp_id" ReadOnly = "True">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="item_id" HeaderText="Item ID" HeaderButtonType="TextButton"
DataField="item_id" UniqueName="item_id" ReadOnly = "True" Visible = "False">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="inv_item_desc" HeaderText="Item Description" HeaderButtonType="TextButton"
DataField="inv_item_desc" UniqueName="inv_item_desc">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="inv_item_rate" HeaderText="Rate" HeaderButtonType="TextButton"
DataField="inv_item_rate" UniqueName="inv_item_rate">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="inv_item_qty" HeaderText="Quantity" HeaderButtonType="TextButton"
DataField="inv_item_qty" UniqueName="inv_item_qty">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="total" HeaderText="Total" HeaderButtonType="TextButton"
DataField="total" UniqueName="total" ReadOnly = "True">
</telerik:GridBoundColumn>
<telerik:GridButtonColumn ConfirmText="Delete these details record?" ButtonType="ImageButton"
CommandName="Delete" Text="Delete" UniqueName="DeleteColumn2">
<HeaderStyle Width="20px"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
</telerik:GridButtonColumn>
</Columns>
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
<HeaderStyle Width="20px"></HeaderStyle>
<ItemStyle CssClass="MyImageButton"></ItemStyle>
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn SortExpression="case_id" HeaderText="Case ID" HeaderButtonType="TextButton"
DataField="case_id" UniqueName="case_id" MaxLength="5" ReadOnly = "True">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="case_file_nbr" HeaderText="Case File Number" HeaderButtonType="TextButton"
DataField="case_file_nbr" UniqueName="case_file_nbr">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="case_desc" HeaderText="Case Description" HeaderButtonType="TextButton"
DataField="case_desc" UniqueName="case_desc">
</telerik:GridBoundColumn>
<telerik:GridButtonColumn ConfirmText="Delete this case?" ButtonType="ImageButton"
CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
<HeaderStyle Width="20px"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
</telerik:GridButtonColumn>
</Columns>
<SortExpressions>
<telerik:GridSortExpression FieldName="case_desc"></telerik:GridSortExpression>
</SortExpressions>
</MasterTableView>
</telerik:RadGrid>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="Server=172.18.1.11;Database=ent64ast;user id=entqalogin;password=en7qal8g1n5"
DeleteCommand="DELETE FROM tbl_inv_case WHERE org_id= 'Oindem' and inv_no=31 and case_id = @case_id"
SelectCommand="SELECT case_id,case_file_nbr,case_desc from tbl_inv_case where org_id='Oindem' and inv_no=31"
UpdateCommand="UPDATE tbl_inv_case SET case_file_nbr = @case_file_nbr, case_desc = @case_desc WHERE org_id= 'Oindem' and inv_no=31 and case_id = @case_id">
<DeleteParameters>
<asp:Parameter Name="case_id" Type="String"></asp:Parameter>
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="org_id" Type="String"></asp:Parameter>
<asp:Parameter Name="inv_no" Type="String"></asp:Parameter>
<asp:Parameter Name="case_id" Type="String"></asp:Parameter>
<asp:Parameter Name="case_file_nbr" Type="String"></asp:Parameter>
<asp:Parameter Name="case_desc" Type="String"></asp:Parameter>
<asp:Parameter Name="case_amnt" Type="String"></asp:Parameter>
<asp:SessionParameter Name="login_id" Type="string" SessionField="loginid" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="case_id" Type="String"></asp:Parameter>
<asp:Parameter Name="case_file_nbr" Type="String"></asp:Parameter>
<asp:Parameter Name="case_desc" Type="String"></asp:Parameter>
</UpdateParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="Server=172.18.1.11;Database=ent64ast;user id=entqalogin;password=en7qal8g1n5"
DeleteCommand="DELETE FROM tbl_inv_case_items WHERE org_id= 'Oindem' and inv_no=31 and case_id = @case_id and item_id = @item_id"
SelectCommand="SELECT grp_id,case_id,item_id,inv_item_desc,inv_item_rate,inv_item_qty, cast(inv_item_rate*inv_item_qty as decimal(18,2)) 'total' FROM tbl_inv_case_items WHERE org_id='Oindem' AND inv_no=31 AND case_id = @case_id ORDER BY grp_id,case_id, inv_item_seqn"
UpdateCommand="UPDATE tbl_inv_case_items SET inv_item_desc = @inv_item_desc, inv_item_rate = @inv_item_rate, inv_item_qty = @inv_item_qty WHERE org_id= 'Oindem' AND inv_no=31 AND case_id = @case_id AND item_id = @item_id">
<DeleteParameters>
<asp:Parameter Name="item_id" Type="Int32"></asp:Parameter>
<asp:Parameter Name="case_id" Type="String"></asp:Parameter>
</DeleteParameters>
<SelectParameters>
<asp:Parameter Name="case_id" Type="String"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="inv_item_desc" Type="String"></asp:Parameter>
<asp:Parameter Name="inv_item_rate" Type="Double"></asp:Parameter>
<asp:Parameter Name="inv_item_qty" Type="Double"></asp:Parameter>
<asp:Parameter Name="item_id" Type="String"></asp:Parameter>
<asp:Parameter Name="case_id" Type="String"></asp:Parameter>
</UpdateParameters>
</asp:SqlDataSource>
</form>
</body>
</html>
Hi,
Please check the attached image. I need conditional format for line series. Please suggest me how to achieve this one.
Thanks in advance.
Thanks & Regards
Baji
Hi Team,
While i'm trying to bind the string data to the Rad Grid it is not binding exact value which i have pulled from Data Base.
For Example i'm pulling the Data : - "A BC E F G" and binding the same data to the Rad Grid, the problem here is the rad grid column is trimming out all the spaces and displaying like :- "A BC EFG"
Here i need to bind the exact data which i'm pulling from Database.
Could you please help me out from this issue.
Thanks in Advance
A.Shrujan
I am trying to keep the latency to a minimum when using a Radlistview which grabs it's data from sql with linq. Example of how data is currently retrieved is as follows:-
<
telerik:RadDropDownList
ID
=
"RadDropDownListSort"
runat
=
"server"
Skin
=
"MetroTouch"
CssClass
=
"sortCtrl"
DefaultMessage
=
"Sort by..."
Width
=
"175px"
AutoPostBack
=
"False"
OnClientItemSelecting
=
"sortSelecting"
>
<
Items
>
<
telerik:DropDownListItem
Text
=
"Sort by Price"
Value
=
"SalePrice"
/>
<
telerik:DropDownListItem
Text
=
"Sort by Year"
Value
=
"YearOfMan"
/>
<
telerik:DropDownListItem
Text
=
"Sort by Location"
Value
=
"Location"
/>
<
telerik:DropDownListItem
Text
=
"Sort by Make/Model"
Value
=
"Make"
/>
<
telerik:DropDownListItem
Text
=
"Sort by Category"
Value
=
"Category"
/>
</
Items
>
</
telerik:RadDropDownList
>
<
telerik:RadListView
ID
=
"RadListView1"
runat
=
"server"
DataKeyNames
=
"ListingID,GstOptionID"
ItemPlaceholderID
=
"ListingsContainer"
AllowPaging
=
"True"
PageSize
=
"10"
AllowMultiFieldSorting
=
"True"
CanRetrieveAllData
=
"True"
>
<
LayoutTemplate
>
<
asp:Panel
ID
=
"ListingsContainer"
runat
=
"server"
/>
<
table
class
=
"pagerTable pagertiles"
>
<
tr
>
<
td
>
<
telerik:RadDataPager
ID
=
"RadDataPager1"
runat
=
"server"
PagedControlID
=
"RadListView1"
PageSize
=
"10"
Skin
=
"MetroTouch"
CssClass
=
"dataPager"
>
<
Fields
>
<
telerik:RadDataPagerButtonField
FieldType
=
"FirstPrev"
/>
<
telerik:RadDataPagerButtonField
FieldType
=
"Numeric"
/>
<
telerik:RadDataPagerButtonField
FieldType
=
"NextLast"
/>
<
telerik:RadDataPagerPageSizeField
PageSizeText
=
"Tiles per page: "
PageSizeComboWidth
=
"62"
PageSizes
=
"20 30"
/>
<
telerik:RadDataPagerGoToPageField
CurrentPageText
=
"Page: "
TotalPageText
=
"of"
SubmitButtonText
=
"Go"
TextBoxWidth
=
"20"
/>
<
telerik:RadDataPagerTemplatePageField
>
<
PagerTemplate
>
<
div
style
=
"float: right"
>
<
b
>Items
<
asp:Label
runat
=
"server"
ID
=
"CurrentPageLabel"
Text="<%# Container.Owner.StartRowIndex+1%>" />
to
<
asp:Label
runat
=
"server"
ID
=
"TotalPagesLabel"
Text="<%# IIF(Container.Owner.TotalRowCount > (Container.Owner.StartRowIndex+Container.Owner.PageSize), Container.Owner.StartRowIndex+Container.Owner.PageSize, Container.Owner.TotalRowCount) %>" />
of
<
asp:Label
runat
=
"server"
ID
=
"TotalItemsLabel"
Text="<%# Container.Owner.TotalRowCount%>" />
<
br
/>
</
b
>
</
div
>
</
PagerTemplate
>
</
telerik:RadDataPagerTemplatePageField
>
</
Fields
>
</
telerik:RadDataPager
>
</
td
>
</
tr
>
</
table
>
</
LayoutTemplate
>
<
ItemTemplate
>
....
</
ItemTemplate
>
<
EmptyDataTemplate
>
...
</
EmptyDataTemplate
>
</
telerik:RadListView
>
Private
Sub
RadListView1_NeedDataSource(sender
As
Object
, e
As
Telerik.Web.UI.RadListViewNeedDataSourceEventArgs)
Handles
RadListView1.NeedDataSource
Dim
dsTiles
As
IQueryable(Of ListingResults) = GetLinqListingData
RadListView1.DataSource = dsTiles
End
Sub
Having looked through the documentation and demos for the RadListview, I'm struggling to understand what amount of data is retrieved from sql and/or the server when the page first loads and on subsequent page change or sort on ajax call back. When using Iqueryable does the Radlistview grab only the data for the page shown to the user? IE 10 rows for page size of 10 retrieved from sql OR perhaps: All rows retrieved to server, but only 10 rows sent to client (user).
Presuming that it only grabs the rows for displayed items on the page, if I try to implement the usage of a shared (and/or local) cache as follows, the full set of rows would need to be retrieved from sql for first save to the cache. And on each and every page change or sort, the full set of rows is again retrieved from the cache. A suggested example of using cache:
Private
Sub
RadListView1_NeedDataSource(sender
As
Object
, e
As
Telerik.Web.UI.RadListViewNeedDataSourceEventArgs)
Handles
RadListView1.NeedDataSource
Dim
dsTiles
As
List(Of ListingResults) = GetCacheData
If
dsTiles is nothing
dsTiles = GetLinqListingData
SaveCacheData(dsTiles)
End
If
RadListView1.DataSource = dsTiles
End
Sub
Would greatly appreciate any explanation on how data is retrieved and any suggestion of whether cache is beneficial for short-term single user usage and longer term subsequent visitors seeking the same data.
Thank you
We have a commercial SharePoint 2013 web part application for which we license the Telerik.Web.UI dll, etc.
We build the dlls with our own .snk file (e.g. unique PublicKeyToken) and custom initialization (so noone else can use the dlls).
The dlls are installed in the GAC
At a customer site, they have our web part app and that of another company who also installs their version of the Telerik.Web.UI dlls, etc.
Problem - either one app or the other will work, but not both.
While it is possible to specify a specific version of the dll (including PublicKeyToken) in the SharePoint web.config file, there can only be one web.config file for all web part apps (for that SP site collection) and in that web.config only qualifiedEntry element for the dll with the name Telerik.Web.UI.
How to resolve (dynamic load of the specific dll?, build a "private" version of the Telerik dlls, rename the dll file/assembly name? Some other magic we don't know about?)