or
<
asp:Content
ID
=
"Content2"
ContentPlaceHolderID
=
"ContentPlaceHolder1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function UpdateItemCountField(sender, args) {
//set the footer text
sender.get_dropDownElement().lastChild.innerHTML = "A total of " + sender.get_items().get_count() + " items";
}
</
script
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
DefaultLoadingPanelID
=
"RadAjaxLoadingPanel1"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadGrid2_Search"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadAjaxPanel_Search_New"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid2_Search"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadAjaxPanel_Footer"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"txtPrdtOrderNo"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadComboBox_Plan"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
Runat
=
"server"
Skin
=
"WebBlue"
/>
<
table
cellspacing
=
"10"
width
=
"100%"
>
<
tr
>
<
td
class
=
"style20"
></
td
<td
class
=
"styleLbl"
>PrdtOrderNo: </
td
>
<
td
class
=
"styleTxtBox"
>
<
asp:TextBox
ID
=
"txtPrdtOrderNo"
runat
=
"server"
Width
=
"150px"
Visible
=
"false"
></
asp:TextBox
>
</
td
>
<
td
>
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel_Search_New"
runat
=
"server"
>
<
asp:Button
ID
=
"btnSearch"
runat
=
"server"
Text
=
"¤é¹ËÒ"
Width
=
"100px"
/>
<
asp:Button
ID
=
"btnNew"
runat
=
"server"
Text
=
"New"
Width
=
"100px"
/>
</
telerik:RadAjaxPanel
>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
"style20"
></
td
>
<
td
class
=
"styleLbl"
>Plan : </
td
>
<
td
class
=
"styleTxtBox"
>
<
telerik:RadComboBox
runat
=
"server"
ID
=
"RadComboBox_Plan"
Height
=
"150px"
Width
=
"200px"
MarkFirstMatch
=
"true"
DataSourceID
=
"SqlDataSource_Plan"
DataValueField
=
"planNo"
EnableLoadOnDemand
=
"true"
HighlightTemplatedItems
=
"true"
AppendDataBoundItems
=
"true"
OnClientItemsRequested
=
"UpdateItemCountField"
OnDataBound
=
"RadComboBox_Plan_DataBound"
OnItemDataBound
=
"RadComboBox_Plan_ItemDataBound"
OnItemsRequested
=
"RadComboBox_Plan_ItemsRequested"
Skin
=
"WebBlue"
>
<
Items
>
<
telerik:RadComboBoxItem
Text
=
"--Please Select--"
Value
=
""
Selected
=
"true"
/>
</
Items
>
<
HeaderTemplate
>
<
ul
>
<
li
class
=
"col1"
>Plan No</
li
>
<
li
class
=
"col2"
>Plan Date</
li
>
</
ul
>
</
HeaderTemplate
>
<
ItemTemplate
>
<
ul
>
<
li
class
=
"col1"
>
<%#DataBinder.Eval(Container.DataItem, "planNo")%></
li
>
<
li
class
=
"col2"
>
<%#DataBinder.Eval(Container.DataItem, "date", "{0:dd/MM/yyyy}")%></
li
>
</
ul
>
</
ItemTemplate
>
<
FooterTemplate
>
A total of
<
asp:Literal
runat
=
"server"
ID
=
"RadComboItemsCount"
/>
items
</
FooterTemplate
>
</
telerik:RadComboBox
>
<
asp:SqlDataSource
ID
=
"SqlDataSource_Plan"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:projectConnectionString %>"
SelectCommand="SELECT planNo, date FROM [Plan] ORDER BY date">
</
asp:SqlDataSource
>
</
td
>
<
td
>
<
asp:RequiredFieldValidator
runat
=
"server"
ID
=
"ReqFieldValidate_ddlPlan"
ControlToValidate
=
"RadComboBox_Plan"
ErrorMessage
=
"*"
ValidationGroup
=
"ForSave"
Display
=
"Dynamic"
InitialValue
=
"--Please Select--"
/>
</
td
>
</
tr
>
</
table
>
<
table
cellspacing
=
"10"
width
=
"100%"
>
<
tr
>
<
td
class
=
"style20"
></
td
<td
colspan
=
"2"
>
<
telerik:RadGrid
ID
=
"RadGrid2_Search"
runat
=
"server"
AllowAutomaticDeletes
=
"True"
AllowAutomaticUpdates
=
"True"
DataSourceID
=
"SqlDataSource2_Search"
AllowAutomaticInserts
=
"True"
AutoGenerateColumns
=
"False"
GridLines
=
"None"
Width
=
"100%"
Skin
=
"WebBlue"
>
<
ClientSettings
EnablePostBackOnRowClick
=
"true"
EnableRowHoverStyle
=
"true"
>
<
Selecting
AllowRowSelect
=
"true"
/>
</
ClientSettings
>
<
MasterTableView
DataKeyNames
=
"prdtOrderNo, planNo, planDate, date, productNo, productName, qtyPrdtOrder, qtyProduce, status, remark"
DataSourceID
=
"SqlDataSource2_Search"
NoMasterRecordsText
=
"No records to display."
AutoGenerateColumns
=
"false"
Name
=
"ProductionOrder_Search"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"prdtOrderNo"
DefaultInsertValue
=
""
HeaderText
=
"prdtOrderNo"
SortExpression
=
"prdtOrderNo"
UniqueName
=
"prdtOrderNo"
ReadOnly
=
"True"
Display
=
"false"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"planNo"
DefaultInsertValue
=
""
HeaderText
=
"planNo"
SortExpression
=
"planNo"
UniqueName
=
"planNo"
ReadOnly
=
"True"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"planDate"
DefaultInsertValue
=
""
HeaderText
=
"planDate"
SortExpression
=
"planDate"
UniqueName
=
"planDate"
DataFormatString
=
"{0:dd/MM/yyyy}"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"date"
DefaultInsertValue
=
""
HeaderText
=
"date"
SortExpression
=
"date"
UniqueName
=
"date"
DataFormatString
=
"{0:dd/MM/yyyy}"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"productName"
DefaultInsertValue
=
""
HeaderText
=
"productName"
SortExpression
=
"productName"
UniqueName
=
"productName"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"qtyPrdtOrder"
DefaultInsertValue
=
""
HeaderText
=
"qtyPrdtOrder"
SortExpression
=
"qtyPrdtOrder"
UniqueName
=
"qtyPrdtOrder"
ItemStyle-HorizontalAlign
=
"Right"
DataFormatString
=
"{0:N}"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"qtyProduce"
DefaultInsertValue
=
""
HeaderText
=
"qtyProduce"
SortExpression
=
"qtyProduce"
UniqueName
=
"qtyProduce"
ItemStyle-HorizontalAlign
=
"Right"
DataFormatString
=
"{0:N}"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"status"
DefaultInsertValue
=
""
HeaderText
=
"status"
SortExpression
=
"status"
UniqueName
=
"status"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"remark"
DefaultInsertValue
=
""
HeaderText
=
"remark"
SortExpression
=
"remark"
UniqueName
=
"remark"
Visible
=
"false"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
asp:SqlDataSource
ID
=
"SqlDataSource2_Search"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:projectConnectionString %>"
SelectCommand="SELECT ProductionOrder.prdtOrderNo, ProductionOrder.planNo, [Plan].date AS planDate, ProductionOrder.date, ProductionOrder.productNo, Product.productName, [Plan].qtyPlan, ProductionOrder.qtyPrdtOrder, ProductionOrder.qtyProduce, ProductionOrder.status, ProductionOrder.remark FROM [Plan] INNER JOIN Product ON [Plan].productNo = Product.productNo INNER JOIN ProductionOrder ON [Plan].planNo = ProductionOrder.planNo">
</
asp:SqlDataSource
>
</
td
>
</
tr
>
</
table
>
<
center
>
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel_Footer"
runat
=
"server"
>
<
asp:Button
ID
=
"btnSave"
runat
=
"server"
Text
=
"Save"
Width
=
"100px"
ValidationGroup
=
"ForSave"
/>
<
asp:Button
ID
=
"btnCancel"
runat
=
"server"
Text
=
"Cancel"
Width
=
"100px"
/>
</
telerik:RadAjaxPanel
>
</
center
>
<
asp:SqlDataSource
ID
=
"SqlDataSource_ddlProduct"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:projectConnectionString %>"
SelectCommand="SELECT productNo, productName FROM Product WHERE status = 'Active'">
</
asp:SqlDataSource
>
</
asp:Content
>
Protected
Sub
RadComboBox_Plan_DataBound(
ByVal
sender
As
Object
,
ByVal
e
As
EventArgs)
'set the initial footer label
CType
(RadComboBox_Plan.Footer.FindControl(
"RadComboItemsCount"
), Literal).Text = Convert.ToString(RadComboBox_Plan.Items.Count)
End
Sub
Protected
Sub
RadComboBox_Plan_ItemsRequested(
ByVal
sender
As
Object
,
ByVal
e
As
RadComboBoxItemsRequestedEventArgs)
SqlDataSource_Plan.SelectCommand =
"SELECT planNo, date FROM [Plan] ORDER BY date"
RadComboBox_Plan.DataBind()
End
Sub
Protected
Sub
RadComboBox_Plan_ItemDataBound(
ByVal
sender
As
Object
,
ByVal
e
As
RadComboBoxItemEventArgs)
'set the Text and Value property of every item
'here you can set any other properties like Enabled, ToolTip, Visible, etc.
e.Item.Text = Convert.ToDateTime(
DirectCast
(e.Item.DataItem, DataRowView)(
"date"
).ToString()).ToString(
"dd/MM/yyyy"
)
e.Item.Value = (
DirectCast
(e.Item.DataItem, DataRowView))(
"planNo"
).ToString()
End
Sub
Private
Sub
RadGrid2_Search_SelectedIndexChanged(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
RadGrid2_Search.SelectedIndexChanged
'''' set header
txtPrdtOrderNo.Text = RadGrid2_Search.SelectedItems(0).OwnerTableView.DataKeyValues(RadGrid2_Search.SelectedItems(0).ItemIndex)(
"prdtOrderNo"
)
RadComboBox_Plan.SelectedValue = RadGrid2_Search.SelectedItems(0).OwnerTableView.DataKeyValues(RadGrid2_Search.SelectedItems(0).ItemIndex)(
"planNo"
)
End
Sub
scheduler1.View = Janus.Windows.Schedule.
ScheduleView.WorkWeek;
foe telerik radscheduler how can i write please can anyone tell me regarding this i tried by using
radscheduler1.ActiveViewType property but couldnt do it
Thanks
Divya
args.NewItem.Height = 35
ExportToPDF exporter =
new
ExportToPDF(
radGridView1
);
exporter.HiddenColumnOption = Telerik.WinControls.UI.Export.HiddenOption.DoNotExport;
exporter.SummariesExportOption = SummariesOption.ExportAll;
exporter.FitToPageWidth =
false
;
exporter.Scale = 1;
exporter.FileExtension =
"pdf"
;
exporter.TableBorderThickness = 1;
exporter.PdfExportSettings.EnableCopy =
true
;
exporter.HTMLCellFormatting +=
new
Telerik.WinControls.UI.Export.HTML.HTMLCellFormattingEventHandler(exporter_HTMLCellFormatting);
exporter.ExportVisualSettings =
true
;
exporter.ExportHierarchy =
true
;
exporter.PdfExportSettings.FontType = Telerik.Apoc.Render.Pdf.FontType.Embed;
HTMLCellFormatting
event:void
exporter_HTMLCellFormatting(
object
sender, Telerik.WinControls.UI.Export.HTML.HTMLCellFormattingEventArgs e)
{
if
(
radGridView1
.Columns[e.GridColumnIndex].DataType == Type.GetType(
"System.Decimal"
))
{
// Some code to manage the format
//e.HTMLCellElement.Value = string.Format(ecc ecc)
}
}
e.HTMLCellElement
belongs to the master template in the hierarchical order. But when the current cell belongs to a child template it seems there is no way to retrieve the cell's column datatype because there is no way to retrieve what child gridview the cell belongs just starting from the "e" object.e.GridColumnIndex
refers to the MasterTemplate or if it refers to the Child Template inside the
exporter_HTMLCellFormatting
?