.RadPanelBar ul.rpGroup {
list-style-type
:
circle
!important
;
}
<
telerik:RadComboBox
ID
=
"Address_LocationRadComboBox"
runat
=
"server"
SelectedValue='<%# Bind("Address_Location") %>'
Text='<%# Bind("Address_Location") %>' Width="150px">
<
Items
>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"Florida"
Value
=
"Florida"
/>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"New Jersey"
Value
=
"New Jersey"
/>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"New York"
Value
=
"New York"
/>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"Ohio"
Value
=
"Ohio"
/>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"Wisconsin"
Value
=
"Wisconsin"
/>
</
Items
>
</
telerik:RadComboBox
>
.........
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
string[] retrievedLocations = (string[])Session["LocationData"];
Array.Sort(retrievedLocations);
// Assuming Array retrievedLocations has following Values:
// New Jersey
// New York
// Wisconsin
if (e.Item is GridEditableItem && e.Item.IsInEditMode)
{
GridEditableItem item = (GridEditableItem)e.Item;
// Beginning of Loop each row in array retrievedLocations until no rows in array
RadComboBox combo = (RadComboBox)item.FindControl("Address_LocationRadComboBox");
foreach (RadComboBoxItem ComboItem in combo.Items)
{
if (ComboItem.Value != row value of array retrievedLocations)
{
ComboItem.Visible = false;
}
else
{
ComboItem.Visible = true;
}
}
// End of Loop each row in array retrievedLocations until no rows in array
}
}
<
telerik:RadAjaxPanel
ID
=
"apnlPayments"
runat
=
"server"
LoadingPanelID
=
"ajaxLoadingPanel"
>
<
telerik:RadGrid
ID
=
"gridPayments"
runat
=
"server"
AllowAutomaticDeletes
=
"true"
AllowAutomaticUpdates
=
"true"
AllowAutomaticInserts
=
"true"
AllowFilteringByColumn
=
"false"
AllowPaging
=
"false"
AllowSorting
=
"true"
AllowMultiRowSelection
=
"true"
CellSpacing
=
"0"
CellPadding
=
"0"
PageSize
=
"500"
ShowGroupPanel
=
"false"
AllowCustomPaging
=
"false"
EnableLinqExpressions
=
"false"
GridLines
=
"Both"
HeaderStyle-Wrap
=
"false"
AutoGenerateColumns
=
"false"
BorderColor
=
"Black"
BorderStyle
=
"Solid"
BorderWidth
=
"1px"
OnItemDataBound
=
"grid_ItemDataBound"
OnPageIndexChanged
=
"grid_PageIndexChanged"
OnPageSizeChanged
=
"grid_PageSizeChanged"
OnNeedDataSource
=
"grid_NeedDataSource"
OnInsertCommand
=
"gridPayments_InsertCommmand"
OnUpdateCommand
=
"gridPayments_UpdateCommand"
OnDeleteCommand
=
"gridPayments_DeleteCommand"
OnPreRender
=
"gridPayments_PreRender"
>
<
ClientSettings
allowautoscrollondragdrop
=
"false"
allowexpandcollapse
=
"false"
allowgroupexpandcollapse
=
"false"
>
<
Selecting
AllowRowSelect
=
"true"
UseClientSelectColumnOnly
=
"true"
/>
<
Scrolling
AllowScroll
=
"false"
UseStaticHeaders
=
"true"
FrozenColumnsCount
=
"4"
/>
<
ClientEvents
OnGridCreated
=
"grid_GridCreated"
/>
<
Resizing
AllowResizeToFit
=
"true"
EnableRealTimeResize
=
"true"
/>
</
ClientSettings
>
<
MasterTableView
EditMode
=
"EditForms"
CommandItemDisplay
=
"Top"
AutoGenerateColumns
=
"false"
DataKeyNames
=
"LoanPaymentID"
InsertItemPageIndexAction
=
"ShowItemOnCurrentPage"
>
<
ItemStyle
CssClass
=
"Row0"
/>
<
AlternatingItemStyle
CssClass
=
"Row1"
/>
<
RowIndicatorColumn
FilterControlAltText
=
"Filter RowIndicator column"
><
HeaderStyle
Width
=
"20px"
/></
RowIndicatorColumn
>
<
ExpandCollapseColumn
FilterControlAltText
=
"Filter ExpandColumn column"
><
HeaderStyle
Width
=
"20px"
/></
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
UniqueName
=
"EditCommandColumn"
Visible
=
"true"
>
<
ItemStyle
HorizontalAlign
=
"Center"
Wrap
=
"false"
VerticalAlign
=
"Middle"
/></
telerik:GridEditCommandColumn
>
<
telerik:GridButtonColumn
ConfirmText
=
"Delete this Payment?"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"Delete"
ButtonType
=
"ImageButton"
ImageUrl
=
"~/Images/icon_delete.png"
CommandName
=
"Delete"
Text
=
"Delete"
UniqueName
=
"DeleteColumn"
>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridButtonColumn
>
<
telerik:GridBoundColumn
DataField
=
"LoanPaymentPS_ACCT_NO"
MaxLength
=
"50"
FilterControlAltText
=
"Filter LoanPaymentPS_ACCT_NO column"
HeaderStyle-Wrap
=
"false"
HeaderText
=
"PS ACCT NO"
SortExpression
=
"LoanPaymentPS_ACCT_NO"
UniqueName
=
"PS_ACCT_NO"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridDateTimeColumn
DataField
=
"LoanPaymentDateDue"
DataFormatString
=
"{0:MM/dd/yyyy}"
FilterControlAltText
=
"Filter LoanPaymentDateDue column"
HeaderStyle-Wrap
=
"false"
HeaderText
=
"DATE DUE"
SortExpression
=
"LoanPaymentDateDue"
UniqueName
=
"LoanPaymentDateDue"
ReadOnly
=
"true"
>
</
telerik:GridDateTimeColumn
>
<
telerik:GridDateTimeColumn
DataField
=
"LoanPaymentDatePaid"
DataFormatString
=
"{0:MM/dd/yyyy}"
FilterControlAltText
=
"Filter LoanPaymentDatePaid column"
HeaderStyle-Wrap
=
"false"
HeaderText
=
"DATE PAID"
SortExpression
=
"LoanPaymentDatePaid"
UniqueName
=
"LoanPaymentDatePaid"
DataType
=
"System.DateTime"
>
</
telerik:GridDateTimeColumn
>
<
telerik:GridNumericColumn
DataField
=
"LoanPaymentAmount"
NumericType
=
"Currency"
FilterControlAltText
=
"Filter LoanPaymentAmount column"
HeaderStyle-Wrap
=
"false"
HeaderText
=
"AMOUNT"
SortExpression
=
"LoanPaymentAmount"
UniqueName
=
"LoanPaymentAmount"
>
</
telerik:GridNumericColumn
>
<
telerik:GridBoundColumn
DataField
=
"LoanPaymentDescription"
MaxLength
=
"50"
FilterControlAltText
=
"Filter LoanPaymentDescription column"
HeaderStyle-Wrap
=
"false"
HeaderText
=
"DESCRIPTION"
SortExpression
=
"LoanPaymentDescription"
UniqueName
=
"LoanPaymentDescription"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"LoanPaymentUserReference"
MaxLength
=
"50"
FilterControlAltText
=
"Filter LoanPaymentUserReference column"
HeaderStyle-Wrap
=
"false"
HeaderText
=
"USER REFERENCE"
SortExpression
=
"LoanPaymentUserReference"
UniqueName
=
"LoanPaymentUserReference"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"LoanPaymentMethodNo"
MaxLength
=
"50"
FilterControlAltText
=
"Filter LoanPaymentMethodNo column"
HeaderStyle-Wrap
=
"false"
HeaderText
=
"METHOD NO"
SortExpression
=
"LoanPaymentMethodNo"
UniqueName
=
"LoanPaymentMethodNo"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"LoanPaymentMethodReference"
MaxLength
=
"50"
FilterControlAltText
=
"Filter LoanPaymentMethodReference column"
HeaderStyle-Wrap
=
"false"
HeaderText
=
"METHOD REFERENCE"
SortExpression
=
"LoanPaymentMethodReference"
UniqueName
=
"LoanPaymentMethodReference"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"LoanPaymentType"
MaxLength
=
"50"
FilterControlAltText
=
"Filter LoanPaymentType column"
HeaderStyle-Wrap
=
"false"
HeaderText
=
"TYPE"
SortExpression
=
"LoanPaymentType"
UniqueName
=
"LoanPaymentType"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
<
FilterMenu
EnableImageSprites
=
"false"
/>
<
HeaderContextMenu
CssClass
=
"GridContextMenu GridContextMenu_Default"
/>
</
telerik:RadGrid
>
</
telerik:RadAjaxPanel
>
<
div id="dvResult" style="min-width: 64%; width: 64%; height: 98%; float: right;">
<fieldset>
<legend>Result</legend>
<asp:UpdatePanel ID="updReportData" runat="server">
<ContentTemplate>
<asp:Label ID="lblMetricsInfo" runat="server"></asp:Label></Br>
<asp:Label ID="lblMetricsBusinessInfo" runat="server"></asp:Label>
<div style="text-align: right">
<asp:LinkButton ID="lnkShowAll" Text="Show All" ToolTip="Toggle grid paging" runat="server"
CommandName="CurrentGrid" CommandArgument="ReportData"></asp:LinkButton>
<asp:ImageButton ID="imgToExcel" runat="server" ImageUrl="../images/excel_16x16.png"
AlternateText="Export data to Excel" ToolTip="Export grid data to Excel." Style="width: 16px;
height: 16px; cursor: pointer;" CommandName="CurrentGrid" CommandArgument="ReportData" />
</div>
<div class="gridWrapper">
<telerik:RadGrid ID="grdReportData" runat="server" PageSize="20" AllowSorting="True"
AllowPaging="True" AutoGenerateColumns="True" ShowGroupPanel="True" CssClass="grid"
ClientSettings-Resizing-AllowColumnResize="true" ClientSettings-Resizing-ResizeGridOnColumnResize="true"
ShowFooter="true">
<PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
<GroupPanel Text="">
</GroupPanel>
<MasterTableView Width="100%" TableLayout="Fixed">
<NoRecordsTemplate>
No records exist for the given criteria.
</NoRecordsTemplate>
</MasterTableView>
<ClientSettings AllowGroupExpandCollapse="True" AllowDragToGroup="True">
<Resizing AllowColumnResize="True" ResizeGridOnColumnResize="True"></Resizing>
</ClientSettings>
</telerik:RadGrid>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="imgToExcel" />
</Triggers>
</asp:UpdatePanel>
</fieldset>
</div>
Public sub LoadReport()
Dim Ds as dataset = nothing
Ds = Obj.GetDate()
grdReportData.DataSource = ds
grdReportData.DataBind()
End Sub
Thank You In Advance,
Satish.
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" |
DataSourceID="LogBookODS" GridLines="None" AllowFilteringByColumn="True" |
AllowPaging="True" AllowSorting="True" AllowAutomaticDeletes="True" |
AllowAutomaticInserts="True" AllowAutomaticUpdates="True" |
Skin="Office2007"> |
<MasterTableView DataKeyNames="LogBookID" DataSourceID="LogBookODS" |
CommandItemDisplay="Top"> |
<RowIndicatorColumn> |
<HeaderStyle Width="20px"></HeaderStyle> |
</RowIndicatorColumn> |
<ExpandCollapseColumn> |
<HeaderStyle Width="20px"></HeaderStyle> |
</ExpandCollapseColumn> |
<Columns> |
<telerik:GridBoundColumn DataField="LogBookID" DataType="System.Int32" |
HeaderText="LogBookID" ReadOnly="True" SortExpression="LogBookID" |
UniqueName="LogBookID" Visible="False"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="PatientID" DataType="System.Int32" |
HeaderText="PatientID" SortExpression="PatientID" UniqueName="PatientID" |
Visible="False" ReadOnly="True"> |
</telerik:GridBoundColumn> |
<telerik:GridTemplateColumn DataField="LogEntryDate" DataType="System.DateTime" |
HeaderText="Entry Date" SortExpression="LogEntryDate" |
UniqueName="LogEntryDate"> |
<EditItemTemplate> |
<asp:Label ID="CurrDateLbl" runat="server"></asp:Label> |
<asp:TextBox ID="CurrDateTxtBx" runat="server" Visible="false" Text='<%# Bind("LogEntryDate") %>'></asp:TextBox> |
</EditItemTemplate> |
<ItemTemplate> |
<asp:Label ID="LogEntryDateLabel" runat="server" |
Text='<%# Eval("LogEntryDate","{0:d}") %>'></asp:Label> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
<telerik:GridBoundColumn DataField="LogDescription" HeaderText="Description " |
MaxLength="100" UniqueName="LogDescription"> |
</telerik:GridBoundColumn> |
<telerik:GridTemplateColumn DataField="LogEntry" HeaderText="Log Entry" |
SortExpression="LogEntry" UniqueName="LogEntry" AllowFiltering="False"> |
<EditItemTemplate> |
<br /> |
<telerik:RadEditor ID="RadEditor1" Runat="server" |
Content='<%# Bind("LogEntry") %>'> |
<Content> |
</Content> |
</telerik:RadEditor> |
</EditItemTemplate> |
<ItemTemplate> |
<asp:ImageButton ID="ImageButton1" runat="server" CommandName="Edit" ImageUrl="~/images/Edit.gif" ToolTip="Click to view the log entry" /> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
<telerik:GridButtonColumn ConfirmText="Delete this Entry?" ConfirmDialogType="RadWindow" |
ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" |
UniqueName="DeleteColumn"> |
<ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> |
</telerik:GridButtonColumn> |
</Columns> |
<EditFormSettings> |
<EditColumn UniqueName="EditCommandColumn1" ButtonType="ImageButton"></EditColumn> |
</EditFormSettings> |
</MasterTableView> |
</telerik:RadGrid> |
What I would like is for CurrDateLbl to have the current date in it when the user clicks "Add New Record"
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="test.master.cs" Inherits="abc.pages.MasterPage.test" ClientIDMode="AutoID" %>
<!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
>
<
asp:ContentPlaceHolder
ID
=
"head"
runat
=
"server"
></
asp:ContentPlaceHolder
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManagerMasterPage"
runat
=
"server"
/>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager_Master"
runat
=
"server"
OnAjaxRequest
=
"RadAjaxManager1_AjaxRequest"
></
telerik:RadAjaxManager
>
<
asp:ContentPlaceHolder
ID
=
"ContentPlaceHolder1"
runat
=
"server"
/>
</
form
>
</
body
>
</
html
>
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
}
<
telerik:RadAjaxManagerProxy
ID
=
"AjaxManagerProxy1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"Button1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"Label1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"Button2"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"Label1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>
<
telerik:radajaxloadingpanel
id
=
"RadAjaxLoadingPanel1"
runat
=
"server"
skin
=
"Windows7"
/>
<
telerik:RadCodeBlock
ID
=
"RadScriptBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function test() {
var manager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");
var textBoxId = "RowSelected";
if (manager && textBoxId) {
manager.ajaxRequest("RowSelected");
}
}
</
script
>
</
telerik:RadCodeBlock
>
<
asp:Button
ID
=
"Button1"
runat
=
"server"
Text
=
"test 1"
onclick
=
"Button1_Click"
/><
br
/>
<
asp:Button
ID
=
"Button2"
runat
=
"server"
CausesValidation
=
"false"
OnClientClick
=
"javascript:test();return false;"
Text
=
"test 2"
/><
br
/>
<
asp:Label
ID
=
"Label1"
runat
=
"server"
Text
=
""
></
asp:Label
>
protected void Page_Load(object sender, EventArgs e)
{
RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(manager_AjaxRequest);
}
protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = "A" + DateTime.Now.Ticks.ToString();
}
protected void manager_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
if (e.Argument == "RowSelected")
{
Label1.Text = "B" + DateTime.Now.Ticks.ToString();
}
}