<%
@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%
@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head runat="server">
<title>Untitled Page</title>
</
head>
<
body>
<form id="form1" runat="server">
<div>
<telerik:RadScriptManager ID="rsm" runat="server" >
</telerik:RadScriptManager>
<telerik:RadSplitter ID="RadSplitter1" Skin="WebBlue" runat="server" BackColor="#f0f0f0"
Height="535px" Width="100%">
<telerik:RadPane ID="RadPane1" runat="server" Font-Bold="true" Font-Size="50px" >
</telerik:RadPane>
<telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Forward" />
<telerik:RadPane ID="RadPane2" Scrolling="None" runat="server"
BackColor="#f0f0f0" >
<telerik:RadGrid ID="ExcelSheetGrid" Skin="Vista" runat="server" AutoGenerateColumns="true"
BackColor="Transparent" GridLines="None" PageSize="10" ShowFooter="false" Width="99.8%"
AllowPaging="True" Height ="500px" OnNeedDataSource="ExcelSheetGrid_NeedDataSource" HeaderStyle-Wrap="true">
<HeaderStyle Width ="150px" />
<ClientSettings>
<Scrolling AllowScroll="True" SaveScrollPosition="true" FrozenColumnsCount="1" UseStaticHeaders="True" />
<Selecting AllowRowSelect="True" />
</ClientSettings>
</telerik:RadGrid>
</telerik:RadPane>
</telerik:RadSplitter>
</div>
</form>
</
body>
</
html>
| <telerikInput:RadComboBox x:Name="rcbTercero" Width="212" MaxDropDownHeight="250" FontFamily="Trebuchet MS" FontSize="10.667" |
| Background="#FFD6E9F2" IsHighlighted="True" IsReadOnly="True" Height="25" Canvas.Left="145" Canvas.Top="-1" > |
| <telerikInput:RadComboBox.ItemTemplate > |
| <DataTemplate> |
| <Grid Margin="3,3,3,3" Width="750"> |
| <Grid.ColumnDefinitions> |
| <ColumnDefinition Width="40" /> |
| <ColumnDefinition Width="120" /> |
| <ColumnDefinition Width="100" /> |
| <ColumnDefinition Width="60" /> |
| <ColumnDefinition Width="60" /> |
| <ColumnDefinition Width="100" /> |
| <ColumnDefinition Width="80" /> |
| <ColumnDefinition Width="20" /> |
| <ColumnDefinition Width="40" /> |
| <ColumnDefinition Width="80" /> |
| <ColumnDefinition Width="40" /> |
| <ColumnDefinition Width="40" /> |
| <ColumnDefinition Width="40" /> |
| </Grid.ColumnDefinitions> |
| <TextBlock Grid.Column="0" Foreground="Black" FontFamily="Verdana" FontSize="8" Text="{Binding codPersona}" HorizontalAlignment="Right" Margin="0,0,10,0"/> |
| <TextBlock Grid.Column="1" Foreground="Black" FontFamily="Verdana" FontSize="8" Text="{Binding RazonSocial}" HorizontalAlignment="Left" Margin="3,0,0,0"/> |
| <TextBlock Grid.Column="2" Foreground="Black" FontFamily="Verdana" FontSize="8" Text="{Binding Nombre}" HorizontalAlignment="Left" Margin="3,0,0,0"/> |
| <TextBlock Grid.Column="3" Foreground="Black" FontFamily="Verdana" FontSize="8" Text="{Binding Telefono}" HorizontalAlignment="Left" Margin="3,0,0,0"/> |
| <TextBlock Grid.Column="4" Foreground="Black" FontFamily="Verdana" FontSize="8" Text="{Binding Direccion}" HorizontalAlignment="Left" Margin="3,0,0,0"/> |
| <TextBlock Grid.Column="5" Foreground="Black" FontFamily="Verdana" FontSize="8" Text="{Binding numDocIdentificacion}" HorizontalAlignment="Left" Margin="3,0,0,0"/> |
| <TextBlock Grid.Column="6" Foreground="Black" FontFamily="Verdana" FontSize="8" Text="{Binding Nit}" HorizontalAlignment="Left" Margin="3,0,0,0"/> |
| <CheckBox Grid.Column="7" Height="20" Width="20" Content="x" IsChecked="{Binding Vigente}" HorizontalAlignment="Left" Margin="3,0,0,0"/> |
| <TextBlock Grid.Column="8" Foreground="Black" FontFamily="Verdana" FontSize="8" Text="{Binding Celular}" HorizontalAlignment="Left" Margin="3,0,0,0"/> |
| <TextBlock Grid.Column="9" Foreground="Black" FontFamily="Verdana" FontSize="8" Text="{Binding Abrev}" HorizontalAlignment="Left" Margin="3,0,0,0"/> |
| <TextBlock Grid.Column="10" Foreground="Black" FontFamily="Verdana" FontSize="8" Text="{Binding Mini}" HorizontalAlignment="Left" Margin="3,0,0,0"/> |
| <TextBlock Grid.Column="11" Foreground="Black" FontFamily="Verdana" FontSize="8" Text="{Binding PaginaWeb}" HorizontalAlignment="Left" Margin="3,0,0,0"/> |
| <TextBlock Grid.Column="12" Foreground="Black" FontFamily="Verdana" FontSize="8" Text="{Binding eMail}" HorizontalAlignment="Left" Margin="3,0,0,0"/> |
| <TextBlock Grid.Column="11" Visibility="Collapsed" Text="{Binding FactorDstoCliente}" /> |
| <TextBlock Grid.Column="12" Visibility="Collapsed" Text="{Binding FactorDstoProv}" /> |
| </Grid> |
| </DataTemplate> |
| </telerikInput:RadComboBox.ItemTemplate> |
| <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1"> |
| <asp:UpdatePanel ID="UpdatePanel2" runat="server"> |
| <ContentTemplate> |
| <telerik:RadGrid ID="gviewProjectwisetask" runat="server" Width="100%" AutoGenerateColumns="False" |
| GridLines="None" CellPadding="2" |
| onrowcommand="gviewProjectwisetask_RowCommand" |
| onpageindexchanging="gviewProjectwisetask_PageIndexChanging" |
| BackImageUrl="~/images/grad_l2.gif" BorderColor="#66CCFF" |
| BorderStyle="Solid" BorderWidth="1px" |
| onrowdatabound="gviewProjectwisetask_RowDataBound" |
| onrowediting="gviewProjectwisetask_RowEditing" |
| onrowdeleting="gviewProjectwisetask_RowDeleting" Skin="Vista" |
| onitemcommand="gviewProjectwisetask_ItemCommand" |
| onitemdatabound="gviewProjectwisetask_ItemDataBound"> |
| <MasterTableView> |
| <Columns> |
| <telerik:GridTemplateColumn HeaderText="Resource Name"> |
| <ItemTemplate> |
| <asp:LinkButton ID="ResourceName" runat="server" CommandName="Select" Text='<%#DataBinder.Eval(Container.DataItem,"Resource Name") %>'></asp:LinkButton> |
| </ItemTemplate> |
| <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" |
| Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" |
| Wrap="True" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridBoundColumn DataField="Resource ID" HeaderText="ResourceId" |
| ItemStyle-CssClass="columnHidden" HeaderStyle-CssClass="columnHidden" > |
| <HeaderStyle CssClass="columnHidden" /> |
| <ItemStyle CssClass="columnHidden" Font-Bold="False" Font-Italic="False" |
| Font-Overline="False" Font-Strikeout="False" Font-Underline="False" |
| HorizontalAlign="Left" Wrap="True" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridTemplateColumn HeaderText="Task/Module Name"> |
| <ItemTemplate> |
| <asp:Label ID="lblTaskmane" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Task Name") %>'></asp:Label> |
| </ItemTemplate> |
| <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" |
| Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" |
| Wrap="True" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn HeaderText="Task Description"> |
| <ItemTemplate> |
| <asp:Label ID="lblDesc" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Description") %>'></asp:Label> |
| </ItemTemplate> |
| <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" |
| Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" |
| Wrap="True" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn HeaderText="Assigned By"> |
| <ItemTemplate> |
| <asp:Label ID="lblAssignedBy" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Assigned By") %>'></asp:Label> |
| </ItemTemplate> |
| <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" |
| Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" |
| Wrap="True" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn HeaderText="ModifiedBy"> |
| <ItemTemplate> |
| <asp:Label ID="lblModifiedBy" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Modified By") %>'></asp:Label> |
| </ItemTemplate> |
| <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" |
| Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" |
| Wrap="True" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn HeaderText="Phase"> |
| <ItemTemplate> |
| <asp:Label ID="lblphase" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"phase") %>'></asp:Label> |
| </ItemTemplate> |
| <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" |
| Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" |
| Wrap="True" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn HeaderText="ETA(Hrs)"> |
| <ItemTemplate> |
| <asp:Label ID="lblETA" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Estimated Hours") %>'></asp:Label> |
| </ItemTemplate> |
| <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" |
| Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" |
| Wrap="True" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn HeaderText="Date"> |
| <ItemTemplate> |
| <asp:Label ID="lblDate" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Date") %>'></asp:Label> |
| </ItemTemplate> |
| <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" |
| Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" |
| Wrap="True" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridBoundColumn DataField="Task ID" HeaderText="TaskID" |
| > |
| <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" |
| Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" |
| Wrap="True" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Document ID" HeaderText="DocumentID" |
| > |
| <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" |
| Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" |
| Wrap="True" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridTemplateColumn HeaderText="Document"> |
| <ItemTemplate> |
| <asp:LinkButton ID="lnkDocument" runat="server" CommandName="Select2" Text='<%#DataBinder.Eval(Container.DataItem,"File Name") %>'></asp:LinkButton> |
| </ItemTemplate> |
| <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" |
| Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" |
| Wrap="True" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn HeaderText="Remove Att. File"> |
| <ItemTemplate> |
| <asp:ImageButton ID="imgbtnRemoveDocument" runat="server" ToolTip="Remove Attached File" |
| ImageUrl="~/images/delete-file-icon.gif" CommandName="Select3" OnClientClick="return confirm('Are you sure you want to remove att. file?');"/> |
| </ItemTemplate> |
| <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" |
| Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" |
| Wrap="True" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn HeaderText="Add More"> |
| <ItemTemplate> |
| <asp:ImageButton ID="imgbtnAddmore" runat="server" ToolTip="Add More Tasks" |
| ImageUrl="~/images/AddMore.gif" CommandName="Select4"/> |
| </ItemTemplate> |
| <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" |
| Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" |
| Wrap="True" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridBoundColumn DataField="status" HeaderText="Status" |
| > |
| <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" |
| Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" |
| Wrap="True" /> |
| </telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> |
| <PagerStyle |
| ForeColor="Black" HorizontalAlign="Center" Height="30px" Font-Bold="True" Font-Names="Arial" |
| Font-Size="Smaller" CssClass="footerbg" /> |
| </telerik:RadGrid> |
| </ContentTemplate> |
| </asp:UpdatePanel> |
| </telerik:RadAjaxPanel> |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" |
| Width="75px" Skin="Sunset"> |
| </telerik:RadAjaxLoadingPanel> |
<CommandItemTemplate>
<div id="list_countries" onmouseover="mouseover()" onmouseout="mouseout()" >
<asp:CheckBoxList ID="CheckBoxList1" runat="server" OnSelectedIndexChanged="CheckBoxList1_SelectedIndexChanged">
</asp:CheckBoxList>
</div>
<CommandItemTemplate>
which runs this
protected
void CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e)
{
CheckBoxList cbList = sender as CheckBoxList;
foreach
(ListItem listItem in cbList.Items)
RadGrid1.MasterTableView.Columns[cbList.Items.IndexOf(listItem)].Display = listItem.Selected;
}
<
div id="list_countries" onmouseover="mouseover()" onmouseout="mouseout()" >
<asp:CheckBoxList ID="CheckBoxList1" runat="server" >
</asp:CheckBoxList>
</div>
<div class="commandmiddle">
<asp:Button ID="Button5" runat="server" Text="Show/Hide Columns" OnClick="CheckBoxList1_SelectedIndexChanged"> />
</div>
</CommandItemTemplate>
but I cant get the checkboxlist control in the CheckBoxList1_SelectedIndexChanged function if its from the button
what should I do?
| <telerik:RadTreeView ID="RadTreeView1" Runat="server" |
| DataSourceID="LinqDataSource1" DataFieldID="ItemID" DataFieldParentID="ParentID" |
| DataTextField="Title" EnableAjaxSkinRendering="true" Skin="Default" |
| CausesValidation="False" EnableDragAndDrop="True" |
| EnableDragAndDropBetweenNodes="True" MaxDataBindDepth="25" |
| SingleExpandPath="True" Width="350px" > |
| <CollapseAnimation Type="OutQuint" Duration="100"></CollapseAnimation> |
| <ExpandAnimation Duration="100"></ExpandAnimation> |
| </telerik:RadTreeView> |
| <br /> |
| <br /> |
| <asp:LinqDataSource ID="LinqDataSource1" runat="server" |
| ContextTypeName="DataClassesDataContext" OrderBy="ParentID, SortOrder" |
| TableName="Items" Where="ClientID == @ClientID"> |
| <WhereParameters> |
| <asp:ControlParameter ControlID="DropDownList1" DefaultValue="1" |
| Name="ClientID" PropertyName="SelectedValue" Type="Int64" /> |
| </WhereParameters> |
| </asp:LinqDataSource> |
| function CloseAndRebind() { |
| //var ctrl = document.getElementById('tvDivisionTree.ClientID'); |
| var tree = $find('<%= DivisionPicker1.FindControl("tvDivisionTree").ClientID %>'); |
| var node = tree.get_selectedNode(); |
| GetRadWindow().Close(oArg); |
| if (node) { |
| GetRadWindow().BrowserWindow.ReloadPlace(node.get_text()); |
| } |
| else |
| GetRadWindow().BrowserWindow.ReloadPlace(""); |
| } |
<
uc1:DivisionPicker ID="DivisionPicker1" TreeEnabled="true" runat="server" />
I seem to be running out of options to locate my RadTree clientID. As you can see above I have been trying both $find and getElementByID.
| function ReloadPlace(departmentID) { |
| //var txtbox = $find('<%# MyRepeaterListitem.....ClientID %>'); |
| alert(departmentID); |
| } |

<
telerik:GridButtonColumn FooterText="" DataTextFormatString="Approve"
UniqueName="approve" HeaderText="Approve" CommandName="MyCommandName" CommandArgument="" DataTextField="id">
<ItemStyle Width="100px" />
</telerik:GridButtonColumn>
On some condition i want to make this approve link disable and enable on run time. How we can get this at link run time and on which event we can enable and disable this link.
Thanks
Amarinder