| <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm6.aspx.cs" Inherits="WebApplication1.WebForm6" %> | |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> | |
| <!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> | |
| </head> | |
| <body> | |
| <form id="form1" runat="server"> | |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> | |
| </telerik:RadScriptManager> | |
| <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" GridLines="None" Skin="WebBlue" Width="100%"> | |
| <MasterTableView DataSourceID="SqlDataSource1" CommandItemDisplay="Top" DataKeyNames="ProductID"> | |
| <CommandItemTemplate> | |
| <telerik:RadToolBar runat="server" ID="GridCommandItemToolbar" AutoPostBack="false" Skin="Office2007" Style="width: 100%" Visible="true"> | |
| <CollapseAnimation Duration="200" Type="OutQuint" /> | |
| <Items> | |
| <telerik:RadToolBarButton runat="server" Enabled="false" ToolTip="Add Document" Value="AddDocument" CommandName="InitInsert" ImageUrl="~/Images/Office/document_file/png/16/document_add_16x16.png"> | |
| </telerik:RadToolBarButton> | |
| <telerik:RadToolBarButton runat="server" Enabled="false" ToolTip="Edit Document" Value="EditDocument" ImageUrl="~/Images/Office/document_file/png/16/document_edit_16x16.png"> | |
| </telerik:RadToolBarButton> | |
| <telerik:RadToolBarButton runat="server" Enabled="false" ToolTip="Delete Document" Value="DeleteDocument" ImageUrl="~/Images/Office/document_file/png/16/document_delete_16x16.png"> | |
| </telerik:RadToolBarButton> | |
| </Items> | |
| </telerik:RadToolBar> | |
| </CommandItemTemplate> | |
| <RowIndicatorColumn> | |
| <HeaderStyle Width="20px"></HeaderStyle> | |
| </RowIndicatorColumn> | |
| <ExpandCollapseColumn> | |
| <HeaderStyle Width="20px"></HeaderStyle> | |
| </ExpandCollapseColumn> | |
| <Columns> | |
| <telerik:GridBoundColumn DataField="ProductID" DataType="System.Int32" HeaderText="ProductID" ReadOnly="True" SortExpression="ProductID" UniqueName="ProductID"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="ProductName" HeaderText="ProductName" SortExpression="ProductName" UniqueName="ProductName"> | |
| </telerik:GridBoundColumn> | |
| </Columns> | |
| </MasterTableView> | |
| <ClientSettings> | |
| <Scrolling AllowScroll="True" UseStaticHeaders="True" /> | |
| </ClientSettings> | |
| </telerik:RadGrid> | |
| <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NORTHWIND.MDFConnectionString %>" SelectCommand="SELECT [ProductID], [ProductName] FROM [Current Product List]"></asp:SqlDataSource> | |
| </form> | |
| </body> | |
| </html> | |

| protected void RadToolTipManager1_AjaxUpdate(object sender, Telerik.Web.UI.ToolTipUpdateEventArgs e) |
| { |
| Label l = new Label(); |
| switch (e.TargetControlID) |
| { |
| case "dpCreateDate": |
| case "dpPublicationDate": |
| case "dpReviewDate": |
| RadToolTipManager1.Position = Telerik.Web.UI.ToolTipPosition.MiddleRight; |
| break; |
| default: |
| RadToolTipManager1.Position = Telerik.Web.UI.ToolTipPosition.BottomCenter; |
| break; |
| } |
| } |
(
RadSplitter)(myMaster.FindControl("RadSplitterBuilding"))).Height = Unit.Percentage(100);
But it does not work. Please let me know a way to deteremine the Page height on client-side before it is rendered to the browser, and set the radsplitter height to the same.
Thanks
Anil
| public static string ItemUpdated(object source, GridUpdatedEventArgs e, RadGrid RadGrid1) |
| { |
| GridEditableItem item = (GridEditableItem)e.Item; |
| string displayMsg = string.Empty; |
| string name = item.OwnerTableView.Name; |
| foreach(string dataKeyName in RadGrid1.MasterTableView.DataKeyNames) |
| { |
| string id = item.GetDataKeyValue(dataKeyName).ToString(); |
| if (e.Exception != null) |
| { |
| e.KeepInEditMode = true; |
| e.ExceptionHandled = true; |
| displayMsg = string.Format("{0} with ID " + id + " cannot be updated. Reason: " + e.Exception.Message, name); |
| } |
| else |
| { |
| displayMsg = string.Format("{0} with ID " + id + " is updated!", name); |
| } |
| } |
| return displayMsg; |
| } |
protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
{
...
if (Request.Params["__EVENTTARGET"].Contains("UpdateButton"))
{
int index = e.Item.DataSetIndex;
int locationID = CurrentClub.Locations[index].LocationId;
ValidateUpdatedItem(locationID, Request.Params.Get(
"ctl00$ctl00$phBody$phBody$ucEditEventLoc$rgLocations$ctl00$ctl09$ctl00"));
}
else
if (Request.Params["__EVENTTARGET"].Contains("PerformInsertButton"))
ValidateNewItem(Request.Params.Get(
"ctl00$ctl00$phBody$phBody$ucEditEventLoc$rgLocations$ctl00$ctl02$ctl02$ctl00"));
}
----------------------------------- ascx page
<
telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="rgLocations">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="rgLocations" />
<telerik:AjaxUpdatedControl ControlID="lblErrorMessage" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManagerProxy>
<ajaxToolkit:ModalPopupExtender ID="mdlPopupLocation" runat="server" PopupControlID="pnLocation"
BackgroundCssClass="modalBackground" TargetControlID="btnAddLocation">
</ajaxToolkit:ModalPopupExtender>
<asp:Panel runat="server" ID="pnLocation" CssClass="pnlPop" Style="display: none;" EnableViewState="true">
<telerik:RadGrid ID="rgLocations" runat="server" GridLines="None" AllowPaging="True" AllowSorting="False" DataSourceID="objDSLocations" AutoGenerateColumns="False" AllowAutomaticDeletes="True"
AllowAutomaticInserts="True" AllowAutomaticUpdates="True" HorizontalAlign="NotSet"
ShowStatusBar="false" OnItemDataBound="RadGrid1_ItemDataBound" OnItemCommand="RadGrid1_ItemCommand">
<MasterTableView DataKeyNames="LocationId" CommandItemDisplay="Bottom" CommandItemSettings-RefreshImageUrl=""
CommandItemSettings-RefreshText="" GridLines="None" Width="100%" EditMode="InPlace">
<Columns>
<telerik:GridBoundColumn UniqueName="LocationName" EditFormColumnIndex="0" HeaderText="Location Name" DataField="Name"> </telerik:GridBoundColumn>
<telerik:GridEditCommandColumn UniqueName="editcmdColumnLoc">
</telerik:GridEditCommandColumn>
<telerik:GridButtonColumn Text="Delete" CommandName="Delete" UniqueName= "DeleteColumn"></telerik:GridButtonColumn>
</Columns>
<ExpandCollapseColumn ButtonType="ImageButton" Visible="False" UniqueName="ExpandColumn">
<HeaderStyle Width="19px"></HeaderStyle>
</ExpandCollapseColumn>
</MasterTableView>
<PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
</telerik:RadGrid>
<asp:ObjectDataSource ID="objDSLocations" runat="server" SelectMethod="SelectLocations"
InsertMethod="InsertLocations" UpdateMethod="UpdateLocations" TypeName="CHO.Next.WebUI.UserControls.Events.EditEventLocation">
<UpdateParameters>
<asp:Parameter Name="LocationId" Type="Int32" />
<asp:Parameter Name="Name" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="Name" Type="String" />
</InsertParameters>
</asp:ObjectDataSource>
Thank you
<
telerik:RadTreeView ID="targetTreeView"
TriStateCheckBoxes="true"
CheckChildNodes="true"
Skin="Web20"
CheckBoxes="true"
DataSourceID="odsLanguages"
DataFieldID="ID"
DataFieldParentID="Language"
DataTextField="Language"
runat="server">
</telerik:RadTreeView>
The combination DataFieldID, DataFieldParentID, DatatextField is not working.
Any help please?