Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
135 views
Hi Im new to telerik and asp.net. Im trying to use a gridview and seem to have it going, but the insert and update do not work.
Can anyone give me a tip on what the problem is. 
Thanks

<%@ Page Title="" Language="C#" MasterPageFile="~/NestedMasterPageTemplate.master"
    AutoEventWireup="true" CodeFile="TEST.aspx.cs" Inherits="Study_Abroad_TEST" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl controlid="RadGrid1" loadingpanelid="RadAjaxLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadGrid ID="RadGrid1" DataSourceID="SessionDataSource1" AllowSorting="True"
        AutoGenerateColumns="false" AutoGenerateDeleteColumn="false" AutoGenerateEditColumn="true"
        AllowPaging="True" GridLines="None" runat="server" ShowFooter="True" PageSize="7"
        AllowAutomaticInserts="True">
        <PagerStyle Mode="NextPrevAndNumeric" />
        <MasterTableView CommandItemDisplay="Top" DataSourceID="SessionDataSource1" DataKeyNames="ProgramID"
            Width="700">
            <Columns>
                <telerik:GridBoundColumn DataField="ProgramName" HeaderText="Program Name">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="Institution" DataField="Institution">
                </telerik:GridBoundColumn>
                <telerik:GridDateTimeColumn DataField="StartDate" HeaderText="Start Date" Visible="false"
                    EditFormColumnIndex="0">
                </telerik:GridDateTimeColumn>
                <telerik:GridDateTimeColumn DataField="EndDate" HeaderText="End Date" Visible="false"
                    EditFormColumnIndex="0">
                </telerik:GridDateTimeColumn>
                <telerik:GridBoundColumn HeaderText="Country" DataField="Country">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="City" DataField="City">
                </telerik:GridBoundColumn>
                <telerik:GridCheckBoxColumn HeaderText="On Campus Housing" DataField="OnCampusHousing"
                    Visible="false">
                </telerik:GridCheckBoxColumn>
                <telerik:GridDropDownColumn HeaderText="Housing Type" DataField="HousingType" ListTextField="HousingType"
                    ListValueField="HousingType" DataSourceID="SessionDataSource3" Visible="false">
                    <ItemStyle Width="20" />
                </telerik:GridDropDownColumn>
                <telerik:GridTemplateColumn DataField="Description" HeaderText="Description" Visible="false">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" Text='<%# Bind( "Description") %>' Columns="30" Rows="5"
                            TextMode="MultiLine" runat="server"></asp:TextBox>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
            <EditFormSettings ColumnNumber="3" CaptionFormatString="Edit details for Program {0}"
                CaptionDataField="ProgramName">
                <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" Width="100%" />
                <FormTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="2" CssClass="module"
                    Height="110px" Width="100%" />
                <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                <EditColumn UpdateText="Update" UniqueName="EditCommandColumn1" CancelText="Cancel">
                </EditColumn>
                <FormTableButtonRowStyle HorizontalAlign="Left" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
            </EditFormSettings>
        </MasterTableView>
        <ClientSettings>
            <Selecting AllowRowSelect="True" EnableDragToSelectRows="True" />
        </ClientSettings>
    </telerik:RadGrid>
    <br />
    <asp:SqlDataSource ID="SessionDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MIS5050DBConnectionString_General %>"
        DeleteCommand="DELETE FROM [SAPrograms] WHERE [ProgramID] = @ProgramID" InsertCommand="INSERT INTO [SAPrograms] ([ProgramName], [Description], [StartDate], [EndDate], [OnCampusHousing], [HousingType], [CreateDate], [ModDate], [Country], [City], [PostalCode], [Institution]) VALUES (@ProgramName, @Description, @StartDate, @EndDate, @OnCampusHousing, @HousingType, @CreateDate, @ModDate, @Country, @City, @PostalCode, @Institution)"
        SelectCommand="SELECT * FROM [SAPrograms] ORDER BY [ProgramName]" ConflictDetection="CompareAllValues"
        OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE [SAPrograms] SET [ProgramName] = @ProgramName, [Description] = @Description, [StartDate] = @StartDate, [EndDate] = @EndDate, [OnCampusHousing] = @OnCampusHousing, [HousingType] = @HousingType, [CreateDate] = @CreateDate, [ModDate] = @ModDate, [Country] = @Country, [City] = @City, [PostalCode] = @PostalCode, [Institution] = @Institution WHERE [ProgramID] = @ProgramID">
        <DeleteParameters>
            <asp:Parameter Name="ProgramID" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="ProgramName" Type="String" />
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="StartDate" Type="DateTime" />
            <asp:Parameter Name="EndDate" Type="DateTime" />
            <asp:Parameter Name="OnCampusHousing" Type="Boolean" />
            <asp:Parameter Name="HousingType" Type="String" />
            <asp:Parameter Name="CreateDate" Type="DateTime" />
            <asp:Parameter Name="ModDate" Type="DateTime" />
            <asp:Parameter Name="Country" Type="String" />
            <asp:Parameter Name="City" Type="String" />
            <asp:Parameter Name="PostalCode" Type="String" />
            <asp:Parameter Name="Institution" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="ProgramName" Type="String" />
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="StartDate" Type="DateTime" />
            <asp:Parameter Name="EndDate" Type="DateTime" />
            <asp:Parameter Name="OnCampusHousing" Type="Boolean" />
            <asp:Parameter Name="HousingType" Type="String" />
            <asp:Parameter Name="CreateDate" Type="DateTime" />
            <asp:Parameter Name="ModDate" Type="DateTime" />
            <asp:Parameter Name="Country" Type="String" />
            <asp:Parameter Name="City" Type="String" />
            <asp:Parameter Name="PostalCode" Type="String" />
            <asp:Parameter Name="Institution" Type="String" />
            <asp:Parameter Name="ProgramID" Type="Int32" />
            <asp:Parameter Name="original_ProgramID" Type="Int32" />
            <asp:Parameter Name="original_ProgramName" Type="String" />
            <asp:Parameter Name="original_Description" Type="String" />
            <asp:Parameter Name="original_StartDate" Type="DateTime" />
            <asp:Parameter Name="original_EndDate" Type="DateTime" />
            <asp:Parameter Name="original_OnCampusHousing" Type="Boolean" />
            <asp:Parameter Name="original_HousingType" Type="String" />
            <asp:Parameter Name="original_CreateDate" Type="DateTime" />
            <asp:Parameter Name="original_ModDate" Type="DateTime" />
            <asp:Parameter Name="original_Country" Type="String" />
            <asp:Parameter Name="original_City" Type="String" />
            <asp:Parameter Name="original_PostalCode" Type="String" />
            <asp:Parameter Name="original_Institution" Type="String" />
        </UpdateParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SessionDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MIS5050DBConnectionString_General %>"
        DeleteCommand="DELETE FROM [SAPrograms] WHERE [ProgramID] = @ProgramID" InsertCommand="INSERT INTO [SAPrograms] ([ProgramName], [Description], [StartDate], [EndDate], [OnCampusHousing], [HousingType], [CreateDate], [ModDate], [Country], [City], [PostalCode], [Institution]) VALUES (@ProgramName, @Description, @StartDate, @EndDate, @OnCampusHousing, @HousingType, @CreateDate, @ModDate, @Country, @City, @PostalCode, @Institution)"
        SelectCommand="SELECT * FROM [SAPrograms] ORDER BY [ProgramName]" ConflictDetection="CompareAllValues"
        OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE [SAPrograms] SET [ProgramName] = @ProgramName, [Description] = @Description, [StartDate] = @StartDate, [EndDate] = @EndDate, [OnCampusHousing] = @OnCampusHousing, [HousingType] = @HousingType, [CreateDate] = @CreateDate, [ModDate] = @ModDate, [Country] = @Country, [City] = @City, [PostalCode] = @PostalCode, [Institution] = @Institution WHERE [ProgramID] = @ProgramID">
        <DeleteParameters>
            <asp:Parameter Name="ProgramID" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="ProgramName" Type="String" />
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="StartDate" Type="DateTime" />
            <asp:Parameter Name="EndDate" Type="DateTime" />
            <asp:Parameter Name="OnCampusHousing" Type="Boolean" />
            <asp:Parameter Name="HousingType" Type="String" />
            <asp:Parameter Name="CreateDate" Type="DateTime" />
            <asp:Parameter Name="ModDate" Type="DateTime" />
            <asp:Parameter Name="Country" Type="String" />
            <asp:Parameter Name="City" Type="String" />
            <asp:Parameter Name="PostalCode" Type="String" />
            <asp:Parameter Name="Institution" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="ProgramName" Type="String" />
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="StartDate" Type="DateTime" />
            <asp:Parameter Name="EndDate" Type="DateTime" />
            <asp:Parameter Name="OnCampusHousing" Type="Boolean" />
            <asp:Parameter Name="HousingType" Type="String" />
            <asp:Parameter Name="CreateDate" Type="DateTime" />
            <asp:Parameter Name="ModDate" Type="DateTime" />
            <asp:Parameter Name="Country" Type="String" />
            <asp:Parameter Name="City" Type="String" />
            <asp:Parameter Name="PostalCode" Type="String" />
            <asp:Parameter Name="Institution" Type="String" />
            <asp:Parameter Name="ProgramID" Type="Int32" />
            <asp:Parameter Name="original_ProgramID" Type="Int32" />
            <asp:Parameter Name="original_ProgramName" Type="String" />
            <asp:Parameter Name="original_Description" Type="String" />
            <asp:Parameter Name="original_StartDate" Type="DateTime" />
            <asp:Parameter Name="original_EndDate" Type="DateTime" />
            <asp:Parameter Name="original_OnCampusHousing" Type="Boolean" />
            <asp:Parameter Name="original_HousingType" Type="String" />
            <asp:Parameter Name="original_CreateDate" Type="DateTime" />
            <asp:Parameter Name="original_ModDate" Type="DateTime" />
            <asp:Parameter Name="original_Country" Type="String" />
            <asp:Parameter Name="original_City" Type="String" />
            <asp:Parameter Name="original_PostalCode" Type="String" />
            <asp:Parameter Name="original_Institution" Type="String" />
        </UpdateParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SessionDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:MIS5050DBConnectionString_General %>"
        SelectCommand="SELECT DISTINCT [HousingType] FROM [SAPrograms] ORDER BY [HousingType]">
    </asp:SqlDataSource>
</asp:Content>
curt
Top achievements
Rank 1
 answered on 17 Nov 2010
3 answers
106 views
I am trying to use the demo code from this page:
http://demos.telerik.com/aspnet-ajax/spell/examples/googlespell/defaultvb.aspx

I have created a new project in VS2010 and added a new item (DefaultVB.aspx).

I then copied the entire aspx code and vb code into the respective files.  I did remove the code not needed:
<%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
<%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
<%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
 
<qsf:HeadTag runat="server" ID="Headtag1"></qsf:HeadTag>
 
<qsf:Header ID="Header1" runat="server" NavigationLanguage="VB"></qsf:Header>
 
<qsf:Footer ID="Footer1" runat="server"></qsf:Footer>

I am getting an error message from VS (and the project won't build).  The error is:
'RadSpell1' is not declared.  It may be inaccessible due to its protection level. on Line 22

This is that code block (which includes the line causing the error:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
        RadSpell1.SpellCheckProviderTypeName = _
       GetType(GoogleSpellCheckProvider).AssemblyQualifiedName
End Sub

Any advice on what I am doing wrong?

Thanks,

LJ
Rumen
Telerik team
 answered on 17 Nov 2010
2 answers
312 views
I'd like to access the word count from RadEditor programmatically; preferably from the server-side. I've searched the Telerik website and saw refernences to "RadEditorStatistics word count", but as far as I could see, this only makes a word count visible to the user. Can someone direct me how to access this count from within the API?

Thanks
jeff bowder
Top achievements
Rank 1
 answered on 17 Nov 2010
0 answers
67 views
Hi,

I am unable to centralize the text in all of my RadNumericTextBoxes found in my RadGrid. Only the text in the first column is centralized. Attached is an image that could help explain what I am referring to. Please, can someone help! Unfortunately, I can't attach a word document.

I dynamically create RadGrid that includes a couple of columns that have RadNumericTextBox. All the columns are templateColumn sand below is some of the code I used.

 I followed hints provided in this link http://www.telerik.com/help/aspnet/grid/grdprogrammaticcreation.html  under

(Creating ItemTemplate/EditItemTemplate of GridTemplateColumn programmatically)


Never mind folks I resolved my issue by critically looking at the code in the above link and making necessary changes.

Jeffrey
Top achievements
Rank 1
 asked on 17 Nov 2010
24 answers
900 views
Where do I download the SharePoint 2010 RadEditor WSP files? I can't find any download link on the download pages nor can I find the WSPs after installing the latest RadControls.

This article describes the installation:

Installing RadEditor & RadGrid Web Parts on SharePoint 2010
http://www.telerik.com/help/aspnet-ajax/installing_radeditor__radgrid_web_parts_on_sharepoint_2010.html
Cyrus
Top achievements
Rank 1
 answered on 17 Nov 2010
2 answers
117 views
Hi,

I got another problem when using Telerik RadFilter control. On the Web page, I added a button under the filter. When the button is clicked, I display the expressions in a string (similar to the Preview function, but I disabled the preview function in order to allow the user to edit the string). I tested and my function works fine, but got some problem with the value of the filter expressions.

From UI, I added an Contains expression, selected "PersonName" as the field, entered the value "test", and then clicked my button, it showed "(PersonName Contains '')"  without the string "test". I ran the code in DEBUG mode and found that the Value of the RadFilterContainsFilterExpression is NULL, the string "test" is not posted back to the server.

If I set the AllowFilterOnBlur property to false, all the values I entered are not posted back to the server. If I set the AllowFilterOnBlur property to true, only the last value I enterred is not posted back to the server.

How can I make the value posted to the server? Please help.

Many thanks

Bruce
Bruce
Top achievements
Rank 1
 answered on 17 Nov 2010
3 answers
156 views
Hi,

I am replacing an old control suite with Telerik and the intention initially is to replace like for like with the functionality.

I have a RadGrid that is using a RadAjaxManager to control the ajax postback to display and hide hierarchy data.

In the DetailTable (inner part of hierarchy) I have a command that will postback to check what security the user has and if they have appropriate authorisation the page will fire Javascript to open a window, passing some query string variables set during the postback processing.

The problem I have is that with the AJAX enabled, when I click the command the loading panel fires and then a Javascript error appears, but no popup window.  Below is a simplified attempt at registering javascript which does not work.  This approach seemed to have been recommended elsewhere on the net.

RadScriptManager.RegisterStartupScript(Page, GetType(), "test", "alert('test');", true);

Error message from IE:
Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object.

Could anyone advise how I can fire Javascript during an ajax enabled partial page postback?

Thanks for your help,

Matt
MPatt
Top achievements
Rank 1
 answered on 17 Nov 2010
1 answer
107 views
In IE, the FormatBlock displays selected headings correctly by showing Heading 1, Heading 2, etc. if an h1 or h2 are selected.  In Firefox and Chrome, when you select an h1 or h2 it displays "h1" or "h2" as the FormatBlock selected valued.  Shouldn't the FormatBlock show the predefined options if their element is selected?
Rumen
Telerik team
 answered on 17 Nov 2010
5 answers
236 views
Hello.
I've created my own CommandItemTemplate and put some custom buttons there, but I still want the caption of mastertableview to be placed in the same TD as buttons, with custom CSS style. How to manage this? Right only I indicate Caption property - radgrid adds additional TR above my command item template with caption centered :(

p.s. How to add custom attribute to MasterTableView? I've inherited from GridTableView. But seems like the same approach with public properties and saving in ControlState that worked out for RadGrid does not work here - setter for new property is not called :(

[ToolboxData("<{0}:DSGridTableView runat=server></{0}:DSGridTableView>")]
public class DSGridTableView : GridTableView
{
    public DSGridTableView()
    {
    }
    public DSGridTableView(RadGrid owner)
        : base(owner)
    {
    }
    //public new string Caption
    //{
    //    get
    //    {
    //        return string.Empty;
    //    }
    //}
    [DefaultValueAttribute("")]
    [PersistenceMode(PersistenceMode.Attribute)]
    public string Title
    {
        get
        {
            return (ControlState["Title"] == null ? string.Empty : (string)ControlState["Title"]);
        }
        set
        {
            ControlState["Title"] = value;
        }
    }
    [DefaultValueAttribute("")]
    [PersistenceMode(PersistenceMode.Attribute)]
    public string TitleCssClass
    {
        get
        {
            return (ControlState["TitleCssClass"] == null ? string.Empty : (string)ControlState["TitleCssClass"]);
        }
        set
        {
            ControlState["TitleCssClass"] = value;
        }
    }
}
Dimo
Telerik team
 answered on 17 Nov 2010
3 answers
116 views

My radgrid editors are not working when Radgrid is on a user control that's loaded dynamically. I tested the code on a Radgrid that's loaded from a normal page it works without any problem but would not would when loaded from user control. here is the code:

 

<%

@ Control Language="VB" AutoEventWireup="false" CodeFile="Licenses.ascx.vb" Inherits="Prospects_Content_Licenses" %>

 

<%

@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="True"

 

 

 

 

 

Skin="Vista" AllowAutomaticDeletes="True"

 

 

AllowAutomaticInserts="True" Width="800px" PageSize="100" AllowAutomaticUpdates="True"

 

 

 

 

 

AllowPaging="True" OnItemUpdated="Radgrid1_ItemUpdated" OnItemDeleted="Radgrid1_ItemDeleted"

 

 

 

 

 

OnItemInserted="Radgrid1_ItemInserted"

 

 

 

 

 

DataSourceID="EmployeeLicensesListDS" GridLines="None">

 

 

 

 

 

<MasterTableView autogeneratecolumns="False" datakeynames="EmployeeID,LicenseListID" CommandItemDisplay="Top"

 

 

datasourceid="EmployeeLicensesListDS">

 

 

 

 

 

<RowIndicatorColumn>

 

 

 

 

 

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

 

 

 

 

 

</RowIndicatorColumn>

 

 

 

 

 

<ExpandCollapseColumn>

 

 

 

 

 

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

 

 

 

 

 

</ExpandCollapseColumn>

 

 

 

 

 

<Columns>

 

 

 

 

 

<telerik:GridEditCommandColumn ButtonType="ImageButton"

 

 

CancelImageUrl="../../Img/Cancel.gif" EditImageUrl="../../Img/Edit.gif"

 

 

InsertImageUrl="../../Img/Insert.gif" UpdateImageUrl="../../Img/Update.gif">

 

 

 

 

 

<HeaderStyle Width="20px" />

 

 

 

 

 

</telerik:GridEditCommandColumn>

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="EmployeeID" DataType="System.Int32" visible="false"

 

 

HeaderText="EmployeeID" SortExpression="EmployeeID" UniqueName="EmployeeID" ReadOnly="True" >

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="LicenseListID" DataType="System.Int32" visible="false"

 

 

 

 

 

HeaderText="LicenseListID" ReadOnly="True" SortExpression="LicenseListID"

 

 

UniqueName="LicenseListID">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="Description"

 

 

HeaderText="License Description" SortExpression="Description" UniqueName="Description">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

<telerik:GridDropDownColumn DataField="LicenseState"

 

 

HeaderText="License State" SortExpression="LicenseState" DropDownControlType="RadComboBox"

 

 

 

 

 

DataSourceID="tblStateDS" ListValueField="StateCode" ListTextField="StateName"

 

 

 

 

 

UniqueName="LicenseState">

 

 

 

 

 

</telerik:GridDropDownColumn>

 

 

<telerik:GridBoundColumn DataField="LicenseCategoryIDDescription"

 

 

HeaderText="License Category Description" SortExpression="LicenseCategoryIDDescription" UniqueName="LicenseCategoryIDDescription">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="LicenseID"

 

 

HeaderText="License ID" SortExpression="LicenseID" UniqueName="LicenseID">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

<telerik:GridDropDownColumn DataField="LicenseStatus"

 

 

HeaderText="License Status" SortExpression="LicenseStatus" DropDownControlType="RadComboBox"

 

 

 

 

 

DataSourceID="tblStatusDS" ListValueField="StatusID" ListTextField="Description"

 

 

 

 

 

UniqueName="LicenseStatus">

 

 

 

 

 

</telerik:GridDropDownColumn>

 

 

<telerik:GridDateTimeColumn DataField="ExpirationDate" DataType="System.DateTime" PickerType="DatePicker"

 

 

 

 

 

HeaderText="License Expiration Date" ReadOnly="False" SortExpression="ExpirationDate"

 

 

UniqueName="ExpirationDate" DataFormatString="{0:d}">

 

 

</telerik:GridDateTimeColumn>

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="AddedBy" HeaderText="Added By"

 

 

ReadOnly="True" SortExpression="AddedBy" UniqueName="AddedBy">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="DateAdded" DataType="System.DateTime"

 

 

HeaderText="Date Added" ReadOnly="True" SortExpression="DateAdded"

 

 

UniqueName="DateAdded" DataFormatString="{0:d}">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="LastUpdatedBy" HeaderText="Last Updated By"

 

 

ReadOnly="True" SortExpression="LastUpdatedBy" UniqueName="LastUpdatedBy">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="LastUpdatedDate" DataType="System.DateTime"

 

 

HeaderText="Last Updated Date" ReadOnly="True" SortExpression="LastUpdatedDate"

 

 

UniqueName="LastUpdatedDate" DataFormatString="{0:d}">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

</Columns>

 

 

 

 

 

<CommandItemSettings AddNewRecordText="Add License" />

 

 

 

 

 

<EditFormSettings CaptionDataField="LicenseListID"

 

 

CaptionFormatString="Edit Properties of License ID: {0}" ColumnNumber="3">

 

 

 

 

 

<FormTableItemStyle Wrap="False" />

 

 

 

 

 

<FormMainTableStyle BackColor="White" CellPadding="3" CellSpacing="0" BorderColor="Aquamarine" BorderWidth="2px"

 

 

 

 

 

GridLines="Horizontal" />

 

 

 

 

 

<FormCaptionStyle Font-Bold="True" Font-Size="Small" HorizontalAlign="Center" />

 

 

 

 

 

<FormTableStyle BackColor="White" CellPadding="2" CellSpacing="0"

 

 

Height="110px" Width="210px" />

 

 

 

 

 

<FormTableAlternatingItemStyle Wrap="False" />

 

 

 

 

 

<FormStyle Width="1%" />

 

 

 

 

 

<EditColumn ButtonType="ImageButton" CancelImageUrl="../../Img/Cancel.gif"

 

 

CancelText="Cancel edit" EditImageUrl="../../Img/Edit.gif"

 

 

InsertImageUrl="../../Img/Insert.gif" InsertText="Insert License"

 

 

UniqueName="EditCommandColumn1" UpdateImageUrl="../../Img/Update.gif"

 

 

UpdateText="Update License">

 

 

 

 

 

</EditColumn>

 

 

 

 

 

<FormTableButtonRowStyle HorizontalAlign="Right" />

 

 

 

 

 

<PopUpSettings ScrollBars="None" />

 

 

 

 

 

</EditFormSettings>

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

<FilterMenu EnableTheming="True">

 

 

 

 

 

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

 

 

 

</FilterMenu>

 

 

 

 

 

</telerik:RadGrid>

 

 

 

 

 

<asp:SqlDataSource ID="EmployeeLicensesListDS" runat="server" OnInserting="setDefaultColumns" OnUpdating="setDefaultColumns"

 

 

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

 

 

InsertCommand="INSERT INTO EmployeeLicensesList([CompanyID], [EmployeeID], [SSN], [LicenseStatus], [AddedBy], [LastUpdatedBy]) VALUES (@CompanyID, @EmployeeID, @SSN, @LicenseStatus, @AddedBy, @LastUpdatedBy)"

 

 

SelectCommand="SELECT a.CompanyID, a.SSN, a.EmployeeID, a.LicenseStatus, a.ExpirationDate, a.LicenseState, a.LicenseID, a.AddedBy, a.DateAdded, a.LastUpdatedBy,

 

a.LastUpdatedDate, b.LicenseCategoryID, b.Description, b.LicenseListID FROM EmployeeLicensesList AS a RIGHT OUTER JOIN LicensesList AS b ON a.LicenseListID = b.LicenseListID WHERE (a.employeeid=@employeeid) OR (a.employeeid is null)"

 

 

 

UpdateCommand="UPDATE EmployeeLicensesList SET EmployeeID = @EmployeeID, LicenseStatus = @LicenseStatus, LastUpdatedBy = @LastUpdatedBy, LastUpdatedDate = getdate() WHERE (EmployeeID = @EmployeeID) AND (LicenseListID = @LicenseListID)">

 

 

 

 

 

<SelectParameters>

 

 

 

 

 

<asp:Parameter Name="EmployeeID" Type="Int64" />

 

 

 

 

 

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

 

 

 

 

 

</SelectParameters>

 

 

 

 

 

<UpdateParameters>

 

 

 

 

 

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

 

 

 

 

 

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

 

 

 

 

 

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

 

 

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

 

 

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

 

 

<asp:SessionParameter Name="AddedBy" SessionField="UserID" type="String" />

 

 

 

 

 

<asp:SessionParameter Name="LastUpdatedBy" SessionField="UserID" type="String" />

 

 

 

 

 

</UpdateParameters>

 

 

 

 

 

<InsertParameters>

 

 

 

 

 

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

 

 

 

 

 

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

 

 

 

 

 

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

 

 

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

 

 

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

 

 

<asp:SessionParameter Name="AddedBy" SessionField="UserID" type="String" />

 

 

 

 

 

<asp:SessionParameter Name="LastUpdatedBy" SessionField="UserID" type="String" />

 

 

 

 

 

</InsertParameters>

 

 

 

 

 

</asp:SqlDataSource>

 

 

 

 

 

<asp:SqlDataSource ID="tblStateDS" runat="server" ConnectionString="<%$ ConnectionStrings:HRSOSYS01ConnectionString %>"

 

 

SelectCommand="SELECT [StateCode], [StateName] FROM [tblState]">

 

</

 

asp:SqlDataSource>

 

 

 

 

 

<asp:SqlDataSource ID="tblStateDS0" runat="server" ConnectionString="<%$ ConnectionStrings:HRSOSYS01ConnectionString %>"

 

 

 

SelectCommand="SELECT [StatusID],[Description] FROM [dbo].[tblStatus]">

 

</

 

asp:SqlDataSource>

 

Tsvetina
Telerik team
 answered on 17 Nov 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?