Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
198 views

I have a rad window designed following way, Width and height ( dimensions) I would like to give % relative to parent window. How do I do this?

Thanks



<Windows>

                                    <telerik:RadWindow ID="RadWindow1" runat="server" Behavior="Default" InitialBehavior="None"

                                          Left="0" NavigateUrl="~/CommonPages/AvailableFinancialInstitutionList.aspx" Style="display: none;"

                                          Top="0" OpenerElementID="<%# lnkFiInstitution.ClientID %> " Width="800px" Height="600px"

                                          AutoSize="false" Animation="Resize" KeepInScreenBounds="True" Modal="False"

                                          VisibleStatusbar="False" Skin="Telerik" Title="Privacy Statement" VisibleTitlebar="True">

                                    </telerik:RadWindow>

                              </Windows>

Princy
Top achievements
Rank 2
 answered on 28 May 2010
1 answer
129 views
Is there a way to list the other data like description, location, or even organizer or invitees with the Exchange Provider as a details view?

If so, any input would be appreciated.
T. Tsonev
Telerik team
 answered on 28 May 2010
4 answers
160 views
Hi,
I have downloaded the trial from your site and when a set MakeUrlsAbsolute property to Enabled, it shows an error in Editor even when i only have this code in html view:
<HTML><HEAD><TITLE></TITLE></HEAD>
<BODY></BODY></HTML>

The error's text is this: "Error while executing filter MakeUrlsAbsolute".

I also have tried this code in the editor in your Site (see image) and I'm getting the same error.

Edwin Benavente
Rumen
Telerik team
 answered on 28 May 2010
14 answers
445 views
Hi,
Initially i am binding the dropdown control.
After that based on selection of grid value , i want to set the value of combo box.
How to set selected value at run time ?

I've tried following but it is not working

function

 

RowSelected(sender, args)

 

{

 

var combo = <%=cmbCondQn.ClientID %>;

 

 

var value = args.getDataKeyValue("Question");

 

combo.FindItemByText(value).Selected =

true;

 

 

 

 

}

Below is my grid code

 

<

 

telerik:RadGrid ID="RadGrid1"

 

 

Width="97%" AllowSorting="True" PageSize="15" AllowPaging="True" runat="server" AllowAutomaticDeletes="True"

 

 

Gridlines="None" DataSourceID="dsConditionalQuestion" OnItemDataBound="RadGrid1_ItemDataBound" OnItemDeleted="RadGrid1_ItemDeleted"><%--OnRowCommand="RadGrid1_RowCommand" OnRowDataBound="RadGrid1_RowDataBound" OnRowDeleted="RadGrid1_RowDeleted" OnRowDeleting="GridView1_RowDeleting"--%>

 

 

<MasterTableView Width="100%" AutoGenerateColumns="false" DataSourceID="dsConditionalQuestion" DataKeyNames="ID"

 

 

ClientDataKeyNames="Question,Answer,Action,Dependent_QuestionID" >

 

<

 

ClientSettings>

 

 

<Selecting AllowRowSelect="true" />

 

 

<ClientEvents OnRowSelected="RowSelected" />

 

 

</ClientSettings>

 

 

</telerik:RadGrid>

Regards,
Lubna.

 

Simon
Telerik team
 answered on 28 May 2010
10 answers
167 views
I need to incorporate field level insert/update validation in the Master Table view and three detail views. So far I have added validation to one field on the master view but am at a loss. I have researched and tried several different solutions with no luck.

Would appreciate any help.

Thanks,

Steve O...

<%

@ Page Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="EditIncidents.aspx.cs" Inherits="CIMT.Forms.EditIncidents" Title="Edit Incidents" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<

 

asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

 

</

 

asp:Content>

 

<

 

asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

 

 

 

<div>

 

 

<h3 id="Add" style="text-align:left">Edit/Update/Delete Incidents</h3>

 

 

</div>

 

 

<div>

 

 

<telerik:RadGrid ID="RadGrid2"

 

 

runat="server"

 

 

GridLines="None"

 

 

DataSourceID="SqlDataSource11"

 

 

OnPageIndexChanged="dgIncidents_PageIndexChanged"

 

 

AllowAutomaticDeletes="True"

 

 

OnItemCreated="RadGrid2_ItemCreated"

 

 

AllowAutomaticInserts="True"

 

 

AllowAutomaticUpdates="True"

 

 

AllowPaging="True"

 

 

ShowStatusBar="True"

 

 

AutoGenerateColumns="False"

 

 

Skin="Simple" >

 

 

<ValidationSettings CommandsToValidate="PerformInsert,Update, Delete" EnableValidation="true" />

 

 

<%

-- Incidents --%>

 

 

<ValidationSettings ValidationGroup="gridGroup" />

 

 

<MasterTableView runat="server"

 

 

Name="Incidents"

 

 

Caption="Incidents"

 

 

DataSourceID="SqlDataSource11"

 

 

DataKeyNames="IncidentId"

 

 

CommandItemDisplay="Top"

 

 

ExpandCollapseColumn-ButtonType="ImageButton"

 

 

ExpandCollapseColumn-CollapseImageUrl="~/Images/zoom-out-icon[1].png"

 

 

ExpandCollapseColumn-ExpandImageUrl="~/Images/zoom-in-icon[1].png"

 

 

InsertItemPageIndexAction="ShowItemOnCurrentPage" >

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</RowIndicatorColumn>

 

<%

-- Units --%>

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</RowIndicatorColumn>

 

 

<EditFormSettings>

 

 

<EditColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"

 

 

CancelImageUrl="~/Images/stop-icon[1].png"

 

 

UpdateImageUrl="~/Images/accept-icon[1].png"

 

 

InsertImageUrl="~/Images/add-icon[2].png"

 

 

EditImageUrl="~/Images/edit-icon[1].png" >

 

 

</EditColumn>

 

 

</EditFormSettings>

 

 

<EditFormSettings>

 

 

<EditColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"

 

 

CancelImageUrl="~/Images/stop-icon[1].png"

 

 

UpdateImageUrl="~/Images/accept-icon[1].png"

 

 

InsertImageUrl="~/Images/add-icon[2].png"

 

 

EditImageUrl="~/Images/edit-icon[1].png" >

 

 

</EditColumn>

 

 

</EditFormSettings>

 

 

<DetailTables>

 

 

 

<telerik:GridTableView runat="server"

 

 

DataKeyNames="UnitId"

 

 

Name="Units"

 

 

Width="100%"

 

 

Caption="Units"

 

 

DataSourceID="SqlDataSource2"

 

 

BorderStyle="Solid"

 

 

BorderWidth="1px"

 

 

BorderColor="Blue"

 

 

CommandItemDisplay="Top"

 

 

ExpandCollapseColumn-ButtonType="ImageButton"

 

 

ExpandCollapseColumn-CollapseImageUrl="~/Images/zoom-out-icon[1].png"

 

 

ExpandCollapseColumn-ExpandImageUrl="~/Images/zoom-in-icon[1].png">

 

 

<ParentTableRelation>

 

 

<telerik:GridRelationFields MasterKeyField="IncidentId" DetailKeyField="IncidentId" />

 

 

</ParentTableRelation>

 

 

 

<ExpandCollapseColumn Visible="True"></ExpandCollapseColumn>

 

 

 

<EditFormSettings>

 

 

<EditColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"

 

 

CancelImageUrl="~/Images/stop-icon[1].png"

 

 

UpdateImageUrl="~/Images/accept-icon[1].png"

 

 

InsertImageUrl="~/Images/add-icon[2].png"

 

 

EditImageUrl="~/Images/edit-icon[1].png" >

 

 

</EditColumn>

 

 

</EditFormSettings>

 

 

<Columns>

 

 

 

<telerik:GridDropDownColumn DataField="UnitNameId"

 

 

DataSourceID="SqlDataSource3" DropDownControlType="DropDownList"

 

 

ListTextField="UnitName" ListValueField="UnitNameId" HeaderStyle-Font-Bold="true" UniqueName="UnitNameId"

 

 

HeaderText="Unit Name">

 

 

<HeaderStyle Font-Bold="True"></HeaderStyle>

 

 

</telerik:GridDropDownColumn>

 

 

<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"

 

 

EditImageUrl="~/Images/edit-icon[1].png" ItemStyle-HorizontalAlign="Center">

 

 

<ItemStyle HorizontalAlign="Center"></ItemStyle>

 

 

</telerik:GridEditCommandColumn>

 

 

 

<telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"

 

 

ButtonType="ImageButton" ImageUrl="~/Images/delete-icon[1].png" ItemStyle-HorizontalAlign="Center">

 

 

<ItemStyle HorizontalAlign="Center"></ItemStyle>

 

 

</telerik:GridButtonColumn>

 

 

</Columns>

 

 

<%

-- Unit Logs --%>

 

 

<DetailTables>

 

 

<telerik:GridTableView DataKeyNames="UnitLogId"

 

 

Name="UnitLogs"

 

 

Width="100%"

 

 

Caption="Unit Logs"

 

 

BorderStyle="Solid"

 

 

BorderWidth="1px"

 

 

DataSourceID="SqlDataSource1"

 

 

BorderColor="Blue"

 

 

CommandItemDisplay="Top"

 

 

ExpandCollapseColumn-ButtonType="ImageButton"

 

 

ExpandCollapseColumn-CollapseImageUrl="~/Images/zoom-out-icon[1].png"

 

 

ExpandCollapseColumn-ExpandImageUrl="~/Images/zoom-in-icon[1].png">

 

<%

-- AllowAutomaticDeletes="True"

 

AllowAutomaticInserts="True"

AllowAutomaticUpdates="True"

--

 

%>

 

 

<ParentTableRelation>

 

 

<telerik:GridRelationFields MasterKeyField="UnitId" DetailKeyField="UnitId" />

 

 

</ParentTableRelation>

 

 

 

<ExpandCollapseColumn Visible="True" ItemStyle-Wrap="false"></ExpandCollapseColumn>

 

 

<EditFormSettings>

 

 

<EditColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"

 

 

CancelImageUrl="~/Images/stop-icon[1].png"

 

 

UpdateImageUrl="~/Images/accept-icon[1].png"

 

 

InsertImageUrl="~/Images/add-icon[2].png"

 

 

EditImageUrl="~/Images/edit-icon[1].png" >

 

 

</EditColumn>

 

 

</EditFormSettings>

 

 

<Columns>

 

 

<telerik:GridDropDownColumn DataField="UnitLeaderId"

 

 

DataSourceID="SqlDataSource7" DropDownControlType="DropDownList"

 

 

ListTextField="Name" ListValueField="ResourceId"

 

 

HeaderStyle-Font-Bold="true" UniqueName="UnitLeaderId" HeaderText="Unit Leader">

 

 

<HeaderStyle Font-Bold="True"></HeaderStyle>

 

 

</telerik:GridDropDownColumn>

 

 

 

<telerik:GridDateTimeColumn DataField="UnitStartDate" DataType="System.DateTime"

 

 

HeaderText="Operation Start Date" HeaderStyle-Font-Bold="true" SortExpression="UnitStartDate"

 

 

UniqueName="UnitStartDate" PickerType="DateTimePicker">

 

 

<HeaderStyle Font-Bold="True"></HeaderStyle>

 

 

</telerik:GridDateTimeColumn>

 

 

 

<telerik:GridDateTimeColumn DataField="UnitEndDate" DataType="System.DateTime"

 

 

HeaderText="Operation End Date" HeaderStyle-Font-Bold="true" SortExpression="UnitEndDate"

 

 

UniqueName="UnitEndDate" PickerType="DateTimePicker">

 

 

<HeaderStyle Font-Bold="True"></HeaderStyle>

 

 

</telerik:GridDateTimeColumn>

 

 

 

<telerik:GridHyperLinkColumn ItemStyle-Font-Bold="true" ItemStyle-ForeColor="Blue"

 

 

Text="Assignments" NavigateUrl="~/Forms/Assignments.aspx" DataNavigateUrlFields="UnitLogId"

 

 

DataNavigateUrlFormatString="~/Forms/Assignments.aspx?UnitLogId={0}">

 

 

<ItemStyle Font-Bold="True" ForeColor="Blue"></ItemStyle>

 

 

</telerik:GridHyperLinkColumn>

 

 

 

<telerik:GridHyperLinkColumn ItemStyle-Font-Bold="true" ItemStyle-ForeColor="Blue"

 

 

Text="Activities" NavigateUrl="~/Forms/Activities.aspx" DataNavigateUrlFields="UnitLogId"

 

 

DataNavigateUrlFormatString="~/Forms/Activities.aspx?UnitLogId={0}">

 

 

<ItemStyle Font-Bold="True" ForeColor="Blue"></ItemStyle>

 

 

</telerik:GridHyperLinkColumn>

 

 

<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"

 

 

EditImageUrl="~/Images/edit-icon[1].png" ItemStyle-HorizontalAlign="Center">

 

 

<ItemStyle HorizontalAlign="Center"></ItemStyle>

 

 

</telerik:GridEditCommandColumn>

 

 

 

<telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"

 

 

ButtonType="ImageButton" ImageUrl="~/Images/delete-icon[1].png" ItemStyle-HorizontalAlign="Center">

 

 

<ItemStyle HorizontalAlign="Center"></ItemStyle>

 

 

</telerik:GridButtonColumn>

 

 

</Columns>

 

<%

-- Rosters --%>

 

 

<DetailTables>

 

 

<telerik:GridTableView runat="server"

 

 

DataKeyNames="RosterId"

 

 

Caption="Rosters"

 

 

Name="Rosters"

 

 

Width="100%"

 

 

DataSourceID="SqlDataSource4"

 

 

BorderStyle="Solid"

 

 

BorderWidth="1px"

 

 

BorderColor="Blue"

 

 

CommandItemDisplay="Top"

 

 

ExpandCollapseColumn-CollapseImageUrl="~/Images/zoom-out-icon[1].png"

 

 

ExpandCollapseColumn-ExpandImageUrl="~/Images/zoom-in-icon[1].png" >

 

 

 

<ParentTableRelation>

 

 

<telerik:GridRelationFields MasterKeyField="UnitLogId" DetailKeyField="UnitLogId" />

 

 

</ParentTableRelation>

 

 

<ExpandCollapseColumn ExpandImageUrl="~/Images/zoom-in-icon[1].png" CollapseImageUrl="~/Images/zoom-out-icon[1].png"></ExpandCollapseColumn>

 

 

<EditFormSettings>

 

 

<EditColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"

 

 

CancelImageUrl="~/Images/stop-icon[1].png"

 

 

UpdateImageUrl="~/Images/accept-icon[1].png"

 

 

InsertImageUrl="~/Images/add-icon[2].png"

 

 

EditImageUrl="~/Images/edit-icon[1].png" >

 

 

</EditColumn>

 

 

</EditFormSettings>

 

 

<Columns>

 

 

 

<telerik:GridDropDownColumn DataField="ResourceId"

 

 

DataSourceID="SqlDataSource5" DropDownControlType="DropDownList"

 

 

ListTextField="Name" HeaderStyle-Font-Bold="true" ListValueField="ResourceId" UniqueName="ResourceId" HeaderText="Resource">

 

 

<HeaderStyle Font-Bold="True"></HeaderStyle>

 

 

</telerik:GridDropDownColumn>

 

 

 

<telerik:GridDropDownColumn DataField="AgencyId"

 

 

DataSourceID="SqlDataSource8" DropDownControlType="DropDownList"

 

 

ListTextField="AgencyShort" HeaderStyle-Font-Bold="true" ListValueField="AgencyId" UniqueName="AgencyId" HeaderText="Agency">

 

 

<HeaderStyle Font-Bold="True"></HeaderStyle>

 

 

</telerik:GridDropDownColumn>

 

 

 

<telerik:GridDropDownColumn DataField="CallSignId"

 

 

DataSourceID="SqlDataSource6" DropDownControlType="DropDownList"

 

 

ListTextField="CallSign" HeaderStyle-Font-Bold="true" ListValueField="CallSignId" UniqueName="CallSignId" HeaderText="Call Sign">

 

 

<HeaderStyle Font-Bold="True"></HeaderStyle>

 

 

</telerik:GridDropDownColumn>

 

 

 

<telerik:GridBoundColumn DataField="Location" DataType="System.String"

 

 

HeaderText="Location" HeaderStyle-Font-Bold="true" SortExpression="Location" UniqueName="Location" Visible="true">

 

 

<HeaderStyle Font-Bold="True"></HeaderStyle>

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="Comments" DataType="System.String"

 

 

HeaderText="Comments" HeaderStyle-Font-Bold="true" SortExpression="Comments" UniqueName="Comments" Visible="true">

 

 

<HeaderStyle Font-Bold="True"></HeaderStyle>

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"

 

 

EditImageUrl="~/Images/edit-icon[1].png" ItemStyle-HorizontalAlign="Center">

 

 

<ItemStyle HorizontalAlign="Center"></ItemStyle>

 

 

</telerik:GridEditCommandColumn>

 

 

 

<telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"

 

 

ButtonType="ImageButton" ImageUrl="~/Images/delete-icon[1].png" ItemStyle-HorizontalAlign="Center">

 

 

<ItemStyle HorizontalAlign="Center"></ItemStyle>

 

 

</telerik:GridButtonColumn>

 

 

</Columns>

 

 

<EditFormSettings>

 

 

<EditColumn UniqueName="EditCommandColumn1"></EditColumn>

 

 

</EditFormSettings>

 

 

</telerik:GridTableView>

 

 

</DetailTables>

 

 

<EditFormSettings>

 

 

<EditColumn UniqueName="EditCommandColumn1"></EditColumn>

 

 

</EditFormSettings>

 

 

</telerik:GridTableView>

 

 

</DetailTables>

 

 

<EditFormSettings>

 

 

<EditColumn UniqueName="EditCommandColumn1"></EditColumn>

 

 

</EditFormSettings>

 

 

</telerik:GridTableView>

 

 

</DetailTables>

 

 

 

<ExpandCollapseColumn CollapseImageUrl="~/Images/zoom-out-icon[1].png"

 

 

ExpandImageUrl="~/Images/zoom-in-icon[1].png">

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</ExpandCollapseColumn>

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn DataField="IncidentId" DataType="System.Int32"

 

 

ReadOnly="True" SortExpression="IncidentId"

 

 

UniqueName="IncidentId" Visible="false">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="IncidentName" DataType="System.String"

 

 

SortExpression="IncidentId" UniqueName="IncidentName" HeaderText="Incident Name">

 

 

<HeaderStyle Font-Bold="True"></HeaderStyle>

 

 

<ItemStyle Width="200px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridDateTimeColumn DataField="OperationStartDate"

 

 

HeaderText="Start Date" UniqueName="StartDate" PickerType="DateTimePicker">

 

 

</telerik:GridDateTimeColumn>

 

 

<telerik:GridDateTimeColumn DataField="OperationEndDate" HeaderText="End Date"

 

 

UniqueName="EndDate" PickerType="DateTimePicker">

 

 

</telerik:GridDateTimeColumn>

 

 

<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"

 

 

EditImageUrl="~/Images/edit-icon[1].png" ItemStyle-HorizontalAlign="Center">

 

 

<ItemStyle HorizontalAlign="Center"></ItemStyle>

 

 

</telerik:GridEditCommandColumn>

 

 

 

<telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"

 

 

ButtonType="ImageButton" ImageUrl="~/Images/delete-icon[1].png" ItemStyle-HorizontalAlign="Center">

 

 

<ItemStyle HorizontalAlign="Center"></ItemStyle>

 

 

</telerik:GridButtonColumn>

 

 

</Columns>

 

 

<EditFormSettings>

 

 

<EditColumn InsertImageUrl="~/Images/add-icon[2].png"

 

 

EditImageUrl="~/Images/edit-icon[1].png"

 

 

CancelImageUrl="~/Images/close-icon[1].png">

 

 

</EditColumn>

 

 

</EditFormSettings>

 

 

<PagerStyle HorizontalAlign="Center" />

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

 

</div>

 

<%

-- </ContentTemplate>

 

</asp:UpdatePanel>--

 

%>

 

<%

-- DataSources --%>

 

 

 

<asp:SqlDataSource ID="SqlDataSource7" runat="server"

 

 

ConnectionString="<%$ ConnectionStrings:CIMT %>" EnableCaching="true"

 

 

SelectCommand="select ResourceId, Name from CIMT_V_Resources order by 2">

 

 

</asp:SqlDataSource>

 

 

 

<asp:SqlDataSource ID="SqlDataSource3" runat="server"

 

 

ConnectionString="<%$ ConnectionStrings:CIMT %>" EnableCaching="true"

 

 

SelectCommand="select UnitNameId, UnitName from CIMT_LU_UnitNames order by 2">

 

 

</asp:SqlDataSource>

 

 

 

<asp:SqlDataSource ID="SqlDataSource5" runat="server" EnableCaching="true"

 

 

ConnectionString="<%$ ConnectionStrings:CIMT %>"

 

 

SelectCommand="select ResourceId, Name from CIMT_V_Resources order by 2">

 

 

</asp:SqlDataSource>

 

 

<asp:SqlDataSource ID="SqlDataSource6" runat="server"

 

 

ConnectionString="<%$ ConnectionStrings:CIMT %>"

 

 

SelectCommand="select CallSignId, CallSign from CIMT_V_CallSigns order by 2">

 

 

</asp:SqlDataSource>

 

 

<asp:SqlDataSource ID="SqlDataSource8" runat="server"

 

 

ConnectionString="<%$ ConnectionStrings:CIMT %>"

 

 

SelectCommand="select AgencyId, AgencyShort from CIMT_LU_Agencies order by 2">

 

 

</asp:SqlDataSource>

 

 

<asp:SqlDataSource ID="SqlDataSource9" runat="server"

 

 

ConnectionString="<%$ ConnectionStrings:CIMT %>"

 

 

SelectCommand="select distinct IncidentId, IncidentName from CIMT_T_Incidents

 

union select '' IncidentId, '' IncidentName from CIMT_T_Incidents order by 2">

 

</asp:SqlDataSource>

 

 

 

<asp:SqlDataSource ID="SqlDataSource1" runat="server"

 

 

ConnectionString="<%$ ConnectionStrings:CIMT %>"

 

 

DeleteCommand="DELETE FROM [CIMT_T_UnitLog] WHERE [UnitLogId] = @UnitLogId"

 

 

InsertCommand="INSERT INTO [CIMT_T_UnitLog] ([UnitId], [UnitLeaderId], [UnitStartDate], [UnitEndDate]) VALUES (@UnitId, @UnitLeaderId, @UnitStartDate, @UnitEndDate)"

 

 

SelectCommand="SELECT [UnitLogId], [UnitId], [UnitLeaderId], [UnitStartDate], [UnitEndDate] FROM [CIMT_T_UnitLog] WHERE [UnitId] = @UnitId"

 

 

UpdateCommand="UPDATE [CIMT_T_UnitLog] SET [UnitLeaderId] = @UnitLeaderId, [UnitStartDate] = @UnitStartDate, [UnitEndDate] = @UnitEndDate WHERE [UnitLogId] = @UnitLogId">

 

 

<SelectParameters>

 

 

<asp:Parameter Name="UnitId" Type="Int32" />

 

 

</SelectParameters>

 

 

<DeleteParameters>

 

 

<asp:Parameter Name="UnitLogId" Type="Int32" />

 

 

</DeleteParameters>

 

 

<UpdateParameters>

 

 

<asp:Parameter Name="UnitId" Type="Int32" />

 

 

<asp:Parameter Name="UnitLeaderId" Type="Int32" />

 

 

<asp:Parameter DbType="DateTime" Name="UnitStartDate" />

 

 

<asp:Parameter DbType="DateTime" Name="UnitEndDate" />

 

 

<asp:Parameter Name="UnitLogId" Type="Int32" />

 

 

</UpdateParameters>

 

 

<InsertParameters>

 

 

<asp:Parameter Name="UnitId" Type="Int32" />

 

 

<asp:Parameter Name="UnitLeaderId" Type="Int32" />

 

 

<asp:Parameter DbType="DateTime" Name="UnitStartDate" />

 

 

<asp:Parameter DbType="DateTime" Name="UnitEndDate" />

 

 

</InsertParameters>

 

 

</asp:SqlDataSource>

 

 

 

<asp:SqlDataSource ID="SqlDataSource2" runat="server"

 

 

ConnectionString="<%$ ConnectionStrings:CIMT %>"

 

 

DeleteCommand="DELETE FROM [CIMT_T_Units] WHERE [UnitId] = @UnitId"

 

 

InsertCommand="INSERT INTO [CIMT_T_Units] ([IncidentId], [UnitNameId]) VALUES (@IncidentId, @UnitNameId)"

 

 

SelectCommand="SELECT [UnitId], [IncidentId], [UnitNameId] FROM [CIMT_T_Units] WHERE [IncidentId] = @IncidentId"

 

 

UpdateCommand="UPDATE [CIMT_T_Units] SET [UnitNameId] = @UnitNameId WHERE [UnitId] = @UnitId">

 

 

<SelectParameters>

 

 

<asp:Parameter Name="IncidentId" Type="Int32" />

 

 

</SelectParameters>

 

 

<DeleteParameters>

 

 

<asp:Parameter Name="UnitId" Type="Int32" />

 

 

</DeleteParameters>

 

 

<UpdateParameters>

 

 

<asp:Parameter Name="IncidentId" Type="Int32" />

 

 

<asp:Parameter Name="UnitNameId" Type="Int32" />

 

 

<asp:Parameter Name="UnitId" Type="Int32" />

 

 

</UpdateParameters>

 

 

<InsertParameters>

 

 

<asp:Parameter Name="IncidentId" Type="Int32" />

 

 

<asp:Parameter Name="UnitNameId" Type="Int32" />

 

 

</InsertParameters>

 

 

</asp:SqlDataSource>

 

 

 

<asp:SqlDataSource ID="SqlDataSource4" runat="server"

 

 

ConnectionString="<%$ ConnectionStrings:CIMT %>"

 

 

DeleteCommand="DELETE FROM [CIMT_T_Rosters] WHERE [RosterId] = @RosterId"

 

 

InsertCommand="INSERT INTO [CIMT_T_Rosters] ([UnitLogId], [AgencyId], [CallSignId], [ResourceId], [ContactInfo], [VehicleIdentifier], [Location], [Comments]) VALUES (@UnitLogId, @AgencyId, @CallSignId, @ResourceId, @ContactInfo, @VehicleIdentifier, @Location, @Comments)"

 

 

SelectCommand="SELECT [RosterId], [UnitLogId], [AgencyId], [CallSignId], [ResourceId], [ContactInfo], [VehicleIdentifier], [Location], [Comments] FROM [CIMT_T_Rosters] WHERE [UnitLogId] = @UnitLogId"

 

 

UpdateCommand="UPDATE [CIMT_T_Rosters] SET [AgencyId] = @AgencyId, [CallSignId] = @CallSignId, [ResourceId] = @ResourceId, [ContactInfo] = @ContactInfo, [VehicleIdentifier] = @VehicleIdentifier, [Location] = @Location, [Comments] = @Comments WHERE [RosterId] = @RosterId">

 

 

<SelectParameters>

 

 

<asp:Parameter Name="UnitLogId" Type="Int32" />

 

 

</SelectParameters>

 

 

<DeleteParameters>

 

 

<asp:Parameter Name="RosterId" Type="Int32" />

 

 

</DeleteParameters>

 

 

<UpdateParameters>

 

 

<asp:Parameter Name="UnitLogId" Type="Int32" />

 

 

<asp:Parameter Name="AgencyId" Type="Int32" />

 

 

<asp:Parameter Name="CallSignId" Type="Int32" />

 

 

<asp:Parameter Name="ResourceId" Type="Int32" />

 

 

<asp:Parameter Name="ContactInfo" Type="String" />

 

 

<asp:Parameter Name="VehicleIdentifier" Type="String" />

 

 

<asp:Parameter Name="Location" Type="String" />

 

 

<asp:Parameter Name="Comments" Type="String" />

 

 

<asp:Parameter Name="RosterId" Type="Int32" />

 

 

</UpdateParameters>

 

 

<InsertParameters>

 

 

<asp:Parameter Name="UnitLogId" Type="Int32" />

 

 

<asp:Parameter Name="AgencyId" Type="Int32" />

 

 

<asp:Parameter Name="CallSignId" Type="Int32" />

 

 

<asp:Parameter Name="ResourceId" Type="Int32" />

 

 

<asp:Parameter Name="ContactInfo" Type="String" />

 

 

<asp:Parameter Name="VehicleIdentifier" Type="String" />

 

 

<asp:Parameter Name="Location" Type="String" />

 

 

<asp:Parameter Name="Comments" Type="String" />

 

 

</InsertParameters>

 

 

</asp:SqlDataSource>

 

 

<asp:SqlDataSource ID="SqlDataSource11" runat="server"

 

 

ConnectionString="<%$ ConnectionStrings:CIMTConnectionString %>"

 

 

DeleteCommand="DELETE FROM [CIMT_T_Incidents] WHERE [IncidentID] = @IncidentID"

 

 

InsertCommand="INSERT INTO [CIMT_T_Incidents] ([IncidentName], [OperationStartDate], [OperationEndDate]) VALUES (@IncidentName, @OperationStartDate, @OperationEndDate)"

 

 

SelectCommand="SELECT [IncidentID], [IncidentName], [OperationStartDate], [OperationEndDate] FROM [CIMT_T_Incidents]"

 

 

UpdateCommand="UPDATE [CIMT_T_Incidents] SET [IncidentName] = @IncidentName, [OperationStartDate] = @OperationStartDate, [OperationEndDate] = @OperationEndDate WHERE [IncidentID] = @IncidentID">

 

 

<DeleteParameters>

 

 

<asp:Parameter Name="IncidentID" Type="Int32" />

 

 

</DeleteParameters>

 

 

<UpdateParameters>

 

 

<asp:Parameter Name="IncidentName" Type="String" />

 

 

<asp:Parameter DbType="DateTime" Name="OperationStartDate" />

 

 

<asp:Parameter DbType="DateTime" Name="OperationEndDate" />

 

 

<asp:Parameter Name="IncidentID" Type="Int32" />

 

 

</UpdateParameters>

 

 

<InsertParameters>

 

 

<asp:Parameter Name="IncidentName" Type="String" />

 

 

<asp:Parameter DbType="DateTime" Name="OperationStartDate" />

 

 

<asp:Parameter DbType="DateTime" Name="OperationEndDate" />

 

 

</InsertParameters>

 

 

</asp:SqlDataSource>

 

</

 

asp:Content>

------------------------------------------------------------------------------------------------------------

 

using

 

System;

 

 

 

using

 

System.Collections;

 

 

 

using

 

System.Configuration;

 

 

 

using

 

System.Data;

 

 

 

using

 

System.Linq;

 

 

 

using

 

System.Web;

 

 

 

using

 

System.Web.Security;

 

 

 

using

 

System.Web.UI;

 

 

 

using

 

System.Web.UI.WebControls;

 

 

 

using

 

System.Web.UI.WebControls.WebParts;

 

 

 

using

 

System.Web.UI.HtmlControls;

 

 

 

using

 

System.Xml.Linq;

 

 

 

using

 

Telerik;

 

 

 

using

 

Telerik.Web.UI;

 

 

 

namespace

 

CIMT.Forms

 

{

 

public partial class EditIncidents : System.Web.UI.Page

 

 

 

 

{

 

protected void Page_Load(object sender, EventArgs e)

 

{

}

 

protected void dtUnitLogs_SelectedIndexChanged(object sender, EventArgs e)

 

{

 

// int UnitLogId = int.Parse(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["UnitLogId"].ToString());

 

 

 

 

 

// Session["UnitLogId"] = UnitLogId;

 

 

 

 

}

 

protected void dgIncidents_PageIndexChanged(object sender, GridPageChangedEventArgs e)

 

{

RadGrid2.CurrentPageIndex = e.NewPageIndex;

}

 

//protected void RadGrid2_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)

 

 

 

 

 

//{

 

 

 

 

 

// if ((e.Item is GridEditFormInsertItem) && (RadGrid2.MasterTableView.IsItemInserted))

 

 

 

 

 

// {

 

 

 

 

 

// GridEditFormInsertItem insertItem = (GridEditFormInsertItem)e.Item;

 

 

 

 

 

// RadDateTimePicker sDate = (RadDateTimePicker)insertItem["StartDate"].Controls[0];

 

 

 

 

 

// sDate.SelectedDate = DateTime.Now;

 

 

 

 

 

// insertItem = (GridEditFormInsertItem)e.Item;

 

 

 

 

 

// RadDateTimePicker eDate = (RadDateTimePicker)insertItem["EndDate"].Controls[0];

 

 

 

 

 

// eDate.SelectedDate = DateTime.Now;

 

 

 

 

 

// }

 

 

 

 

 

//}

 

 

 

 

 

protected void RadGrid2_ItemCreated(object sender, GridItemEventArgs e)

 

{

 

if (e.Item is GridEditableItem && e.Item.IsInEditMode)

 

{

 

string tabName = e.Item.OwnerTableView.Name.ToString();

 

 

GridEditableItem item;

 

 

GridDateTimeColumnEditor rdtEditor;

 

 

GridDropDownColumn ddc;

 

 

DropDownList ddl;

 

 

TableCell cell;

 

 

GridDateTimeColumn rdt;

 

 

RequiredFieldValidator validator = new RequiredFieldValidator();

 

validator.ErrorMessage =

"* Value Required";

 

item = e.Item

as GridEditableItem;

 

 

switch (tabName)

 

{

 

case "Incidents":

 

 

GridTextBoxColumnEditor tbEditor;

 

tbEditor = (

GridTextBoxColumnEditor)item.EditManager.GetColumnEditor("IncidentName");

 

cell = (

TableCell)tbEditor.TextBoxControl.Parent;

 

tbEditor.TextBoxControl.ID =

"IncidentName";

 

validator.ControlToValidate = tbEditor.TextBoxControl.ID;

cell.Controls.Add(validator);

rdtEditor = (

GridDateTimeColumnEditor)item.EditManager.GetColumnEditor("StartDate");

 

cell = (

TableCell)tbEditor.TextBoxControl.Parent;

 

rdtEditor.PickerControl.ID =

"StartDate";

 

validator.ControlToValidate = rdtEditor.PickerControl.ID;

cell.Controls.Add(validator);

rdtEditor = (

GridDateTimeColumnEditor)item.EditManager.GetColumnEditor("EndDate");

 

cell = (

TableCell)tbEditor.TextBoxControl.Parent;

 

rdtEditor.PickerControl.ID =

"EndDate";

 

validator.ControlToValidate = rdtEditor.PickerControl.ID;

cell.Controls.Add(validator);

 

break;

 

 

case "Units":

 

 

break;

 

 

case "UnitLogs":

 

 

break;

 

 

case "Rosters":

 

 

break;

 

 

default:

 

 

break;

 

}

 

}

}

Pavlina
Telerik team
 answered on 28 May 2010
1 answer
99 views
Hi ! I spent all this afternoon on a problem without findind a solution :(

I added an ASP.NET AJAX Q3 2009 Radgrid :
<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AutoGenerateColumns="False" 
                    Skin="WebBlue" AllowSorting="True" AllowPaging="True" OnNeedDataSource="RadGrid1_NeedDataSource"  
                    OnItemCreated="RadGrid1_ItemCreated" 
                    EnableAJAX="True" OnItemCommand="RadGrid1_ItemCommand" OnItemEvent="RadGrid1_ItemEvent"> 
                        <SortingSettings SortedAscToolTip="Tri croissant" SortedDescToolTip="Tri d&#233;croissant" 
                            SortToolTip="Trier" /> 
                        <MasterTableView> 
                            <RowIndicatorColumn Visible="False"> 
                                <HeaderStyle Width="20px" /> 
                            </RowIndicatorColumn> 
                            <ExpandCollapseColumn Resizable="False" Visible="False"> 
                                <HeaderStyle Width="20px" /> 
                            </ExpandCollapseColumn> 
                            <Columns> 
                                <telerik:GridBoundColumn DataField="Cli" meta:resourcekey="CliColumnResource" UniqueName="Cli"> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="ACId" meta:resourcekey="ACIdColumnResource" UniqueName="ACId"> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="ArchiveId" meta:resourcekey="ArchiveIdColumnResource" UniqueName="ArchiveId"> 
                                </telerik:GridBoundColumn> 
                            </Columns> 
                       </MasterTableView> 
                       <ClientSettings> 
                              <Selecting AllowRowSelect="True" /> 
                         </ClientSettings> 
                        <SelectedItemStyle BackColor="Blue" ForeColor="White" /> 
            </telerik:RadGrid> 

In code behind I added that :
RadGrid1.MasterTableView.ClientDataKeyNames = new string[] { "ArchiveId", "ACId" }; 
 
            this.RadGrid1.ClientSettings.ClientEvents.OnRowSelected = "RowSelected"; 

in order to do something on row selected...

Here is the definition of RowSelected funtion :
<script type="text/javascript"> 
    function RowSelected(sender, eventArgs) { 
        var archiveId = eventArgs.getDataKeyValue("ArchiveId"); 
        var archiveClassId = eventArgs.getDataKeyValue("ACId"); 
        window["RadGrid1.ClientID"].AjaxRequest("RadGrid1.UniqueID", "RadGrid1_RowSelected"); 
    } 
</script> 

And in code behind :
protected override void RaisePostBackEvent(IPostBackEventHandler sourceControl, string eventArgument) 
        { 
            base.RaisePostBackEvent(sourceControl, eventArgument); 
 
            if (eventArgument == null) 
                return; 
            if (eventArgument.Trim() == "") 
                return; 
 
            string[] parts = eventArgument.Split(':'); 
            switch (parts[0]) 
            { 
                case "RadGrid1_RowSelected": 
 
                    string[] subparts = parts[2].Split('¤'); 
 
                    TbxArchiveId.Text = subparts[1]; 
                    TbxCAId.Text = subparts[0]; 
 
                    break; 
            } 
        } 

When I debug with IE, it tells me that "window[...]" is null.

How can it be ?? :(

Can you help me please ?


Radoslav
Telerik team
 answered on 28 May 2010
1 answer
133 views
Hello,


Is it a bug or by design that during the postback in edit control, the object DataItem property is no longer set ?

The same for insert mode. DataItem is null after postback.


In popup mode (with edit control)  <EditFormSettings InsertCaption="Add new item" CaptionFormatString="Edit ProductID: {0}" CaptionDataField="ProductID" />

the Caption is not formatted according to formatstring (after the postback)
Mira
Telerik team
 answered on 28 May 2010
1 answer
100 views
Dear All,

I have a database table which contains more than 1500000 records.
I'm using RadGrid to bind only the top 1000 record from the table at one time using the advanced binding technique (Need Data Source)
I noticed when i use the built in columns filtering feature that it filters only the displayed 1000 record and doesn't filter the database.
I'm using a custom ORM to which returns IList as a data source for the grid.
The example in the demo which binds 300000 records doesn't meet my project requirements, I need to bind only 1000 record at a time.

In other words how we can enable filtering the database table while using something like SELECT TOP 1000 * ......?
Maria Ilieva
Telerik team
 answered on 28 May 2010
1 answer
93 views
When I first hover over a slidingzone, it comes in from the left and covers the existing content.  Then when I click the pushpin, the zone docks and pushes the existing content off the page to the right.

What I want it to do is to cover the existing content the way it did before I docked it.

Can this be done?

TIA,

   Ed
Dobromir
Telerik team
 answered on 28 May 2010
4 answers
177 views
hi guys and support team.
i response this error when i drag drop task into schaduler.(dargDrop Schaduler)
what  my problem?
how i can fix it?

tnx
Peter
Telerik team
 answered on 28 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?