Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
77 views
How to show currency format for a gridboundcolumn when exporting?
Shinu
Top achievements
Rank 2
 answered on 29 Jun 2012
1 answer
75 views
I have some items with their backcolor set.How to show the selected item with also the same color on selecting from client side?
Princy
Top achievements
Rank 2
 answered on 29 Jun 2012
2 answers
126 views
I have a notes field. I am using gridhtmleditor column to display and edit.

1)  For some reason wrap is not working in the column and data is flown in single line if thee is no carriage return.
Am I missing some thing
Here is my declaration of column

<telerik:GridHTMLEditorColumn UniqueName="Notes" DataField="NOTE_DESC" SortExpression="NOTE_DESC"
HeaderStyle-Width="600px" ColumnEditorID="GridHtmlEditor1" ItemStyle-Wrap="true"

</telerik:GridHTMLEditorColumn>

Thanks

NVB
Top achievements
Rank 1
 answered on 29 Jun 2012
2 answers
57 views
Hi Guys,

My grid throwing a javascript error when you click to the next page from the navigation. The javascript error" Microsoft JScript runtime error: Object does not support property or method 'destroyTree'

<telerik:RadGrid ID="SearchResultsGrid" runat="server" Skin="Office2007" Width="100%"
                        AllowPaging="true" AllowCustomPaging="true" AllowSorting="true" AutoGenerateColumns="false"
                        EnableAJAXLoadingTemplate="true" GridLines="None" LoadingTemplateTransparency="25"
                        OnNeedDataSource="SearchResultsGrid_OnNeedDataSource"
                        Visible="false" AllowAutomaticInserts="false" AllowAutomaticUpdates="false">
                        <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                        <GroupingSettings CaseSensitive="false" />
                        <MasterTableView>
                            <Columns>
                                <telerik:GridBoundColumn DataField="ProgramID" HeaderText="Program ID" />
                                <telerik:GridBoundColumn DataField="ProgramName" HeaderText="Program Name" />
                                <telerik:GridBoundColumn DataField="ProgramStart" HeaderText="Start" />
                                <telerik:GridBoundColumn DataField="ProgramEnd" HeaderText="End" />
                                <%--<telerik:GridBoundColumn DataField="OwnerUserID" HeaderText="Owner" />--%>
                                <telerik:GridDropDownColumn UniqueName="UserName" DataSourceID="odsUser" DataField="OwnerUserID" ListTextField="UserName" ListValueField="RecordID" HeaderText="Owner"/>
                                <telerik:GridBoundColumn DataField="ProgramNotes" HeaderText="Notes" />
                                <telerik:GridBoundColumn DataField="ProgramWebSite" HeaderText="Program WebSite" />
                                <telerik:GridTemplateColumn UniqueName="Edit" HeaderText="View/Edit"
                                    ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="imgEdit" runat="server" ImageUrl="~/Shared/Images/editbutton.gif"
                                            CausesValidation="false" AlternateText="Edit" OnCommand="Edit_Clicked"
                                            CommandArgument='<%# Eval("id") %>' />
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>
Mark de Torres
Top achievements
Rank 1
 answered on 29 Jun 2012
4 answers
818 views
I need all column Header text in ItemDataBound, Please help me on this

I have used below code for getting Header in ItemDataBound but not woking

        If e.Item.ItemType = Telerik.Web.UI.GridItemType.Header Then
            If TypeOf e.Item Is GridHeaderItem Then
                Dim Hitem As GridHeaderItem = DirectCast(e.Item, GridHeaderItem)

                For Each column As GridColumn In RadGrid1.Columns
                    Dim s As String = Hitem(column.UniqueName).Text
                Next
            End If
        End If
MItesh
Top achievements
Rank 1
 answered on 28 Jun 2012
2 answers
229 views

i wanted when the master record in edit mode and the detail table will auto expanded
i followed the example to check in prerender's grid item in edit and set to item.expanded = true 

 For Each item As GridDataItem In grdClaims.MasterTableView.Items
            If item.Edit Then
                        item.Expanded = True    <--- error "There was a problem extracting DataKeyValues from the DataSource. please ensure that DataKeyNames are specified correctly and all the fields specified exist in the datasource"

            End If
        Next

is there any problem to my code?

best regards

From LUI

Imports System.Data  
Imports System.Data.SqlClient  
Imports Telerik.WebControls  
Imports localhost  
 
 
Partial Class Pages_ClaimMain  
    Inherits System.Web.UI.Page  
 
    Private userID As String 
    Private isAdmin As Boolean 
 
    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load  
        If Not Session("UserID"Is Nothing Then 
            userID = Session("UserID")  
            isAdmin = Session("IsAdmin")  
        Else 
            Response.Redirect("./default.aspx")  
        End If 
 
          
 
        If Not Page.IsPostBack Then 
            With MnuMain  
                If isAdmin Then 
 
                    .Items.FindItemByValue("Administration").Items.FindItemByValue("UserAdmin").Visible = True 
                    .Items.FindItemByValue("Administration").Visible = True 
                Else 
                    .Items.FindItemByValue("Administration").Items.FindItemByValue("UserAdmin").Visible = False 
                    .Items.FindItemByValue("Administration").Visible = False 
                End If 
 
                Dim panelItem As RadMenuItem = .Items.FindItemByValue("Reporting")  
                With panelItem.Items.FindItemByValue("AllClaims")  
                    .NavigateUrl = "./ClaimReport.aspx?ReportType=AllClaims&UserID=" & userID  
                    .Target = "_blank" 
                End With 
                With panelItem.Items.FindItemByValue("OpenClaims")  
                    .NavigateUrl = "./ClaimReport.aspx?ReportType=OpenClaims&UserID=" & userID  
                    .Target = "_blank" 
                End With 
                With panelItem.Items.FindItemByValue("ClaimantName")  
                    '.NavigateUrl = "./ClaimReport.aspx?ReportType=ClaimantName&UserID=" & userID  
                    .NavigateUrl = "javascript:showDialog('ClaimReport.aspx?ReportType=ClaimantName&UserID=" & userID & "', 'RadWin');" 
                    '.Target = "_blank"  
                End With 
                With panelItem.Items.FindItemByValue("ClaimProperty")  
                    '.NavigateUrl = "./ClaimReport.aspx?ReportType=ClaimProperty&UserID=" & userID  
                    .NavigateUrl = "javascript:showDialog('ClaimReport.aspx?ReportType=ClaimProperty&UserID=" & userID & "', 'RadWin');" 
                    '.Target = "_blank"  
                End With 
                With panelItem.Items.FindItemByValue("Insurer")  
                    '.NavigateUrl = "./ClaimReport.aspx?ReportType=Insurer&UserID=" & userID  
                    .NavigateUrl = "javascript:showDialog('ClaimReport.aspx?ReportType=Insurer&UserID=" & userID & "', 'RadWin');" 
                    '.Target = "_blank"  
                End With 
                With panelItem.Items.FindItemByValue("HighRisk")  
                    .NavigateUrl = "./ClaimReport.aspx?ReportType=HighRisk&UserID=" & userID  
                    .Target = "_blank" 
                End With 
                panelItem = .Items.FindItemByValue("Administration")  
                With panelItem.Items.FindItemByValue("UserAdmin")  
                    .NavigateUrl = "javascript:showDialog('ClaimUserAdmin.aspx?UserID=" & userID & "', 'RadWin');" 
                End With 
                With panelItem.Items.FindItemByValue("CompanyAdmin")  
                    .NavigateUrl = "javascript:showDialog('ClaimCompanyAdmin.aspx?UserID=" & userID & "', 'RadWin');" 
                End With 
            End With 
        End If 
    End Sub 
 
 
 
    Protected Sub grdClaims_ItemCommand(ByVal source As ObjectByVal e As Telerik.WebControls.GridCommandEventArgs) Handles grdClaims.ItemCommand  
        Dim claimWSObj As New ClaimWS  
 
        Dim claimID As String = "" 
        Dim commentID As String = "" 
        Dim msg As String = "" 
        Select Case e.CommandName  
            Case RadGrid.ExpandCollapseCommandName  
                For Each item As GridItem In e.Item.OwnerTableView.Items  
                    If item.Expanded And Not item Is e.Item Then 
                        item.Expanded = False 
                    End If 
                Next 
            Case RadGrid.DeleteCommandName  
                If e.Item.OwnerTableView.Name = "Claims" Then 
                    claimID = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("Claim_ID")  
                    If Not DeleteRecord(claimID) Then 
                        e.Canceled = True 
                    End If 
                ElseIf e.Item.OwnerTableView.Name = "Comments" Then 
                    claimID = CType(e.Item, GridDataItem).GetDataKeyValue("Claim_ID")  
                    commentID = CType(e.Item, GridDataItem).GetDataKeyValue("Comment_ID")  
                    If Not claimWSObj.DeleteComment(userID, claimID, commentID, msg) Then 
                        e.Canceled = True 
                    End If 
                End If 
            Case RadGrid.PerformInsertCommandName  
            Case RadGrid.EditCommandName  
                If e.Item.OwnerTableView.Name = "Claims" Then 
                    claimWSObj.CreateLog(userID, "ACTION_RECORD", e.Item.OwnerTableView.Items(e.Item.ItemIndex).Item("Claim_ID").Text, "READ""")  
                    claimID = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("Claim_ID")  
                    ViewState("ClaimID") = claimID  
                    grdClaims.MasterTableView.IsItemInserted = False 
                    grdClaims.Rebind()  
 
                ElseIf e.Item.OwnerTableView.Name = "Comments" Then 
                    grdClaims.MasterTableView.DetailTables(0).IsItemInserted = False 
                    grdClaims.MasterTableView.DetailTables(0).Rebind()  
                End If 
            Case RadGrid.InitInsertCommandName  
                If e.Item.OwnerTableView.Name = "Claims" Then 
                    grdClaims.MasterTableView.ClearEditItems()  
                    grdClaims.Rebind()  
                ElseIf e.Item.OwnerTableView.Name = "Comments" Then 
                    grdClaims.MasterTableView.ClearChildEditItems()  
                    grdClaims.MasterTableView.DetailTables(0).Rebind()  
                End If 
            Case RadGrid.FilterCommandName  
                If e.Item.OwnerTableView.Name = "Claims" Then 
                      
                ElseIf e.Item.OwnerTableView.Name = "Comments" Then 
 
                End If 
 
        End Select 
 
    End Sub 
 
 
      
 
    Protected Sub grdClaims_ItemDataBound(ByVal sender As ObjectByVal e As Telerik.WebControls.GridItemEventArgs) Handles grdClaims.ItemDataBound  
 
    End Sub 
 
    Protected Sub grdClaims_ItemCreated(ByVal sender As ObjectByVal e As Telerik.WebControls.GridItemEventArgs) Handles grdClaims.ItemCreated  
        Dim claimWSObj As New ClaimWS  
        Dim cbo As RadComboBox  
        Dim grd As RadGrid  
        Dim btn As Button  
        Dim compareValid As CompareValidator  
        Dim txt As TextBox  
        Dim claimID As String 
 
        If e.Item.OwnerTableView.Name = "Claims" Then 
            If TypeOf e.Item Is GridEditFormItem AndAlso e.Item.IsInEditMode Then 
 
                If TypeOf e.Item Is GridEditFormInsertItem Then 
 
 
                    Dim insertedItem As GridEditableItem = e.Item.OwnerTableView.GetInsertItem  
                    If Not insertedItem Is Nothing Then 
 
 
                        compareValid = insertedItem.FindControl("cmpDateNotified")  
                        compareValid.ValueToCompare = DateTime.Now.ToString("yy-MM-dd")  
 
 
                        cbo = insertedItem.FindControl("cboCompanies")  
 
                          
                        cbo.DataSource = claimWSObj.GetCompanies(userID)  
                        cbo.DataTextField = "Company_Name" 
                        cbo.DataValueField = "Company_ID" 
 
 
                        cbo = insertedItem.FindControl("cboClaimTypes")  
 
                         
                        cbo.DataSource = claimWSObj.GetClaimTypes  
                        cbo.DataTextField = "Claim_Type" 
                        cbo.DataValueField = "Type_ID" 
 
                        cbo = insertedItem.FindControl("cboClaimStatus")  
 
                        cbo.DataSource = claimWSObj.GetClaimStatus  
                        cbo.DataTextField = "Claim_Status" 
                        cbo.DataValueField = "Status_ID" 
 
                        cbo = insertedItem.FindControl("cboInsurers")  
                          
                        cbo.DataSource = claimWSObj.GetInsurers  
                        cbo.DataTextField = "Insurer_Name" 
                        cbo.DataValueField = "Insurer_ID" 
 
                        btn = insertedItem.FindControl("cmdInsert")  
                        btn.Visible = True 
 
                        btn = insertedItem.FindControl("cmdUpdate")  
                        btn.Visible = False 
 
                         
                        grd = e.Item.FindControl("grdComments")  
                        grd.Visible = False 
                    End If 
                Else 
                    claimID = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("Claim_ID")  
                    cbo = e.Item.FindControl("cboCompanies")  
                    cbo.SelectedValue = DataBinder.Eval(e.Item.DataItem, "Company_ID")  
                    cbo.DataSource = claimWSObj.GetCompanies(userID)  
                    cbo.DataTextField = "Company_Name" 
                    cbo.DataValueField = "Company_ID" 
 
                    cbo = e.Item.FindControl("cboClaimTypes")  
                    cbo.SelectedValue = DataBinder.Eval(e.Item.DataItem, "Type_ID")  
                    cbo.DataSource = claimWSObj.GetClaimTypes  
                    cbo.DataTextField = "Claim_Type" 
                    cbo.DataValueField = "Type_ID" 
                    cbo = e.Item.FindControl("cboClaimStatus")  
                    cbo.SelectedValue = DataBinder.Eval(e.Item.DataItem, "Status_ID")  
                    cbo.DataSource = claimWSObj.GetClaimStatus  
                    cbo.DataTextField = "Claim_Status" 
                    cbo.DataValueField = "Status_ID" 
                    cbo = e.Item.FindControl("cboInsurers")  
                    cbo.SelectedValue = DataBinder.Eval(e.Item.DataItem, "Insurer_ID")  
                    cbo.DataSource = claimWSObj.GetInsurers  
                    cbo.DataTextField = "Insurer_Name" 
                    cbo.DataValueField = "Insurer_ID" 
 
                    btn = e.Item.FindControl("cmdUpdate")  
                    btn.Visible = True 
                    btn = e.Item.FindControl("cmdInsert")  
                    btn.Visible = False 
                    compareValid = e.Item.FindControl("cmpDateNotified")  
                    compareValid.ValueToCompare = DateTime.Now.ToString("yy-MM-dd")  
                     
                End If 
            Else 
 
            End If 
        ElseIf e.Item.OwnerTableView.Name = "Comments" Then 
            If TypeOf e.Item Is GridEditFormItem AndAlso e.Item.IsInEditMode Then 
                If TypeOf e.Item Is GridEditFormInsertItem Then 
                    Dim insertedItem As GridEditableItem = e.Item.OwnerTableView.GetInsertItem  
                    If Not insertedItem Is Nothing Then 
                        btn = e.Item.FindControl("cmdUpdate")  
                        btn.Visible = False 
                        btn = e.Item.FindControl("cmdInsert")  
                        btn.Visible = True 
                    End If 
                Else 
                    btn = e.Item.FindControl("cmdUpdate")  
                    btn.Visible = True 
                    btn = e.Item.FindControl("cmdInsert")  
                    btn.Visible = False 
                End If 
            End If 
 
        End If 
 
    End Sub 
 
    Protected Sub grdClaims_UpdateCommand(ByVal source As ObjectByVal e As Telerik.WebControls.GridCommandEventArgs) Handles grdClaims.UpdateCommand  
        If e.Item.OwnerTableView.Name = "Claims" Then 
            Dim claimWSObj As New ClaimWS  
            Dim claimID As String = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("Claim_ID")  
            Dim msg As String 
            Dim editItem As GridEditableItem = e.Item  
            Dim companyID As String = CType(editItem.FindControl("cboCompanies"), RadComboBox).SelectedValue  
            Dim claimYear As Integer = CType(editItem.FindControl("txtYear"), RadMaskedTextBox).Text  
            Dim insurerRef As String = CType(editItem.FindControl("txtInsureRef"), TextBox).Text.Trim  
            Dim dateNotified As Date = CType(editItem.FindControl("dtpDateNotified"), RadDatePicker).SelectedDate  
            Dim claimantName As String = CType(editItem.FindControl("txtClaimantName"), TextBox).Text.Trim  
            Dim propertyName As String = CType(editItem.FindControl("txtProperty"), TextBox).Text.Trim  
            Dim claimType As String = CType(editItem.FindControl("cboClaimTypes"), RadComboBox).SelectedValue  
            Dim incidentDate As Date = CType(editItem.FindControl("dtpIncidentDate"), RadDatePicker).SelectedDate  
            Dim claimStatus As String = CType(editItem.FindControl("cboClaimStatus"), RadComboBox).SelectedValue  
            Dim value As Nullable(Of Double)  
            If CType(editItem.FindControl("nbrValue"), RadNumericTextBox).Text = "" Then 
                value = vbNull  
            Else 
                value = CType(editItem.FindControl("nbrValue"), RadNumericTextBox).Text  
            End If 
            Dim descOfclaim As String = CType(editItem.FindControl("txtDescOfClaim"), TextBox).Text  
            Dim comments As String = "" 'CType(editItem.FindControl("txtComments"), TextBox).Text  
            Dim insurerID As String = CType(editItem.FindControl("cboInsurers"), RadComboBox).SelectedValue  
            Dim savillsRef As String = CType(editItem.FindControl("txtSavillsRef"), TextBox).Text  
            If isValidInput(dateNotified, descOfclaim, comments, editItem, msg) Then 
                If Not claimWSObj.UpdateClaims(claimID, companyID, savillsRef, claimYear, insurerRef, dateNotified, claimantName, propertyName, claimType, incidentDate, claimStatus, value, descOfclaim, comments, insurerID, userID) Then 
                    lblMsg.Visible = True 
                    lblMsg.Text = "* Fail to insert claim" 
                    e.Canceled = True 
                Else 
                    lblMsg.Visible = False 
                End If 
            Else 
                lblMsg.Visible = True 
                lblMsg.Text = msg  
                e.Canceled = True 
            End If 
        ElseIf e.Item.OwnerTableView.Name = "Comments" Then 
        End If 
    End Sub 
 
    Protected Sub grdClaims_InsertCommand(ByVal source As ObjectByVal e As Telerik.WebControls.GridCommandEventArgs) Handles grdClaims.InsertCommand  
 
        Dim claimWSObj As New ClaimWS  
        Dim claimID As String 
        Dim msg As String 
 
        Dim editItem As GridEditableItem = e.Item  
        If e.Item.OwnerTableView.Name = "Claims" Then 
            Dim companyID As String = CType(editItem.FindControl("cboCompanies"), RadComboBox).SelectedValue  
            Dim claimYear As Integer = CType(editItem.FindControl("txtYear"), RadMaskedTextBox).Text  
            Dim insurerRef As String = CType(editItem.FindControl("txtInsureRef"), TextBox).Text.Trim  
            Dim dateNotified As Date = CType(editItem.FindControl("dtpDateNotified"), RadDatePicker).SelectedDate  
            Dim claimantName As String = CType(editItem.FindControl("txtClaimantName"), TextBox).Text.Trim  
            Dim propertyName As String = CType(editItem.FindControl("txtProperty"), TextBox).Text.Trim  
            Dim claimType As String = CType(editItem.FindControl("cboClaimTypes"), RadComboBox).SelectedValue  
            Dim incidentDate As Date = CType(editItem.FindControl("dtpIncidentDate"), RadDatePicker).SelectedDate  
            Dim claimStatus As String = CType(editItem.FindControl("cboClaimStatus"), RadComboBox).SelectedValue  
            Dim value As Nullable(Of Double)  
            If CType(editItem.FindControl("nbrValue"), RadNumericTextBox).Text = "" Then 
                value = vbNull  
            Else 
                value = CType(editItem.FindControl("nbrValue"), RadNumericTextBox).Text  
            End If 
            Dim descOfClaim As String = CType(editItem.FindControl("txtDescOfClaim"), TextBox).Text  
            Dim comments As String = "" 'CType(editItem.FindControl("txtComments"), TextBox).Text  
            Dim insurerID As String = CType(editItem.FindControl("cboInsurers"), RadComboBox).SelectedValue  
            Dim savillsRef As String = CType(editItem.FindControl("txtSavillsRef"), TextBox).Text  
            If isValidInput(dateNotified, descOfClaim, comments, editItem, msg) Then 
                If Not claimWSObj.InsertClaims(companyID, savillsRef, claimYear, insurerRef, dateNotified, claimantName, propertyName, claimType, incidentDate, claimStatus, value, descOfClaim, comments, insurerID, userID) Then 
                    lblMsg.Visible = True 
                    lblMsg.Text = "* Fail to insert claim" 
                    e.Canceled = True 
                Else 
                    lblMsg.Visible = False 
                End If 
            Else 
                lblMsg.Visible = True 
                lblMsg.Text = msg  
                e.Canceled = True 
            End If 
            grdClaims.CurrentPageIndex = 0  
        ElseIf e.Item.OwnerTableView.Name = "Comments" Then 
            Dim txt As TextBox = editItem.FindControl("txtComment")  
            claimID = e.Item.OwnerTableView.ParentItem.GetDataKeyValue("Claim_ID")  
            If Not claimWSObj.InsertComment(userID, claimID, txt.Text, msg) Then 
                lblMsg.Visible = True 
                lblMsg.Text = "msg" 
                e.Canceled = True 
            Else 
                lblMsg.Visible = False 
            End If 
 
        End If 
    End Sub 
 
    Private Function isValidInput(ByVal dateNotified As DateByVal descOfClaim As StringByVal comments As StringByRef editItem As GridEditableItem, ByRef msg As StringAs Boolean 
        Dim cmpValid As CompareValidator  
        If dateNotified > Now Then 
            cmpValid = CType(editItem.FindControl("cmpDateNotified"), CompareValidator)  
            cmpValid.IsValid = False 
            Return False 
 
        ElseIf descOfClaim.Length > 255 Then 
            msg = "* The description of claim cannot excess 255 characters" 
            Return False 
        ElseIf comments.Length > 255 Then 
            msg = "* The comments cannot excess 255 characters" 
            Return False 
        End If 
 
        Return True 
    End Function 
 
      
    Private Function DeleteRecord(ByVal claimID As StringAs Boolean 
        Dim claimWSObj As New ClaimWS  
        If Not claimWSObj.DeleteClaims(claimID, userID) Then 
            Return False 
        Else 
            Return True 
        End If 
    End Function 
 
 
    Protected Sub grdClaims_NeedDataSource(ByVal source As ObjectByVal e As Telerik.WebControls.GridNeedDataSourceEventArgs) Handles grdClaims.NeedDataSource  
        Dim claimWSObj As New ClaimWS  
        If Not Session("UserID"Is Nothing Then 
            userID = Session("UserID")  
            isAdmin = Session("IsAdmin")  
        Else 
            Response.Redirect("./default.aspx")  
        End If 
        grdClaims.DataSource = claimWSObj.GetClaims(userID).Tables(0)  
         
    End Sub 
      
     
    Protected Sub grdClaims_DetailTableDataBind(ByVal source As ObjectByVal e As Telerik.WebControls.GridDetailTableDataBindEventArgs) Handles grdClaims.DetailTableDataBind  
        Dim dataItem As GridDataItem = CType(e.DetailTableView.ParentItem, GridDataItem)  
        Dim claimWSObj As New ClaimWS  
        grdClaims.DataSource = claimWSObj.GetComments(dataItem.GetDataKeyValue("Claim_ID"))  
 
    End Sub 
 
      
 
 
      
    Protected Sub grdClaims_PreRender(ByVal sender As ObjectByVal e As System.EventArgs) Handles grdClaims.PreRender  
 
        For Each item As GridDataItem In grdClaims.MasterTableView.Items  
            If item.Edit Then 
                '        item.Expanded = True  
 
            End If 
        Next 
        If Not isAdmin Then 
            For Each grdTableView As GridTableView In grdClaims.MasterTableView.DetailTables  
                grdTableView.GetColumn("DeleteCol").Display = False 
            Next 
            grdClaims.MasterTableView.GetColumn("DeleteCol").Display = False 
        End If 
          
    End Sub 
End Class 
 


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ClaimMain.aspx.vb" Inherits="Pages_ClaimMain" %> 
 
<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %> 
 
<%@ Register Assembly="RadInput.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %> 
<%@ Register Assembly="RadCalendar.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %> 
<%@ Register Assembly="RadComboBox.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %> 
 
<%@ Register Assembly="RadWindow.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %> 
 
<%@ Register Assembly="RadMenu.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %> 
<%@ Register Assembly="RadPanelbar.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %> 
<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %> 
 
<!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>PI Notification</title> 
      
    <link href="./../css/customize.css" type="text/css" rel="stylesheet"/>       
      
</head> 
<body> 
          
  <script type="text/javascript">     
    function OnClientClose(sender,args)     
    {     
        //alert('test');  
        window.location.reload();//- will reload the page (equal to pressing F5)     
        //windowwindow.location.href = window.location.href;// - will refresh the page by reloading the URL      
           
 
 
    }     
      
</script>    
<script language="javascript" type="text/javascript">  
    function showDialog(url, win){  
        //oWnd.setUrl(url);  
        var oWnd = window.radopen(url, win);  
          
          
    }  
</script> 
    <form id="form1" runat="server">  
    <div> 
        <table border="0" cellpadding="0" cellspacing="0" width="100%">  
            <tr> 
                <td style="vertical-align: top; width: 100%;">  
                    <table border="0" cellpadding="1" cellspacing="1">  
                        <tr> 
                            <td style="height: 65px"><img src="../Images/Common/Savill_Logo_Default.JPG" /></td>  
                            <td style="height: 65px;  width=100%; width: 72%;" >   
                                <span style="font-size: 14pt; vertical-align: top; text-align: left;">Professional   
                                Indemnity/Public Liability   
                                <br /> 
                                Notifications   
                                Register</span></td>  
                            <td style="width: 300px; height: 65px; text-align: right; vertical-align: bottom;">  
                                <rad:RadMenu ID="MnuMain" runat="server" style="top: 0px; left: 0px;" Skin="Default">  
                                    <Items> 
                                        <rad:RadMenuItem runat="server" Text="Reporting" Value="Reporting">  
                                            <Items> 
                                                <rad:RadMenuItem runat="server" Text="All Claims" Value="AllClaims">  
                                                </rad:RadMenuItem> 
                                                <rad:RadMenuItem runat="server" Text="Open Claims" Value="OpenClaims">  
                                                </rad:RadMenuItem> 
                                                <rad:RadMenuItem runat="server" Text="Search For Claimant" Value="ClaimantName">  
                                                </rad:RadMenuItem> 
                                                <rad:RadMenuItem runat="server" Text="Serach Claim Property" Value="ClaimProperty">  
                                                </rad:RadMenuItem> 
                                                <rad:RadMenuItem runat="server" Text="Print By Insurer" Value="Insurer">  
                                                </rad:RadMenuItem> 
                                                <rad:RadMenuItem runat="server" Text="Print Legal And High Risk" Value="HighRisk">  
                                                </rad:RadMenuItem> 
                                            </Items> 
                                        </rad:RadMenuItem> 
                                        <rad:RadMenuItem runat="server" Text="Administration" Value="Administration">  
                                            <Items> 
                                                <rad:RadMenuItem runat="server" Text="User Admin" Value="UserAdmin">  
                                                </rad:RadMenuItem> 
                                                <rad:RadMenuItem runat="server" Text="Company Admin" Value="CompanyAdmin">  
                                                </rad:RadMenuItem> 
                                            </Items> 
                                        </rad:RadMenuItem> 
                                    </Items> 
                                </rad:RadMenu> 
                                </td>      
                        </tr> 
                    </table> 
                    <hr /> 
                 </td> 
            </tr> 
            <tr> 
                <td style="vertical-align: top; text-align: left; height=100%; width: 100%; height: 546px;">  
                    <table border="0" cellpadding="0" cellspacing="0" height="100%">  
                        <tr> 
                              
                            <td style="width: 100%; vertical-align: top; height: 530px;">  
                                <asp:Label ID="lblMsg" runat="server" Font-Bold="True" ForeColor="Red" Text="lblMsg" 
                                    Visible="False" Width="536px"></asp:Label><rad:RadGrid ID="grdClaims" runat="server" AllowPaging="True" AllowSorting="True" 
                                    AutoGenerateColumns="False" GridLines="None" PageSize="20" 
                                    ShowFooter="True" Skin="WebBlue" AllowFilteringByColumn="True" ShowGroupPanel="True">  
                                                                          
                                      
                                    <MasterTableView AllowMultiColumnSorting="True" BorderColor="Silver"    
                                        BorderWidth="2px" CellPadding="0" CommandItemDisplay="Top" DataKeyNames="Claim_ID" GridLines="Both" ShowFooter="False" Name="Claims">  
                                        <EditFormSettings EditFormType="Template" > 
                                            <FormTemplate> 
                                                <table style="width:1000px; " border="0" cellpadding="1" cellspacing="1">  
                                                    <tr> 
                                                        <td style="width:400px">  
                                                            <table> 
                                                                <tr > 
                                                                    <td style="width: 100px">  
                                                                        <strong>Company</strong></td>  
                                                                    <td style="width:300px">  
                                                                        <rad:RadComboBox ID="cboCompanies" runat="server" 
                                                                            Skin="Vista" SkinsPath="~/RadControls/ComboBox/Skins" Width="300px" DataTextField="Company_Name" DataValueField="Company_ID"  AppendDataBoundItems="True">  
                                                                        </rad:RadComboBox> 
                                                                    </td> 
                                                                    <td></td>  
                                                                </tr> 
                                                            </table> 
                                                        </td> 
                                                        <td style="width:500px">  
                                                            <table> 
                                                                <tr> 
                                                                    <td colspan ="3">  
                                                                        <table> 
                                                                            <tr> 
                                                                                <td style="width: 80px">  
                                                                                    <strong>Year</strong></td>  
                                                                                <td style="text-align: left" > 
                                                                        <rad:RadMaskedTextBox ID="txtYear" runat="server" Width="40px" LabelCssClass="radLabelCss_Default" Mask="####" MaxLength="4" Skin="" Text='<%# DataBinder.Eval(Container, "DataItem.Year") %>' Font-Names="Arial">  
                                                                        </rad:RadMaskedTextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtYear" 
                                                                            ErrorMessage="Year of notification is required" Display="Dynamic" Width="176px"></asp:RequiredFieldValidator></td>  
                                                                                <td style="width:80px;  text-align:right">Savills Ref</td> 
                                                                                <td style="width:auto">  
                                                                        <asp:TextBox ID="txtSavillsRef" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.FPDSavills_Ref") %>' Width="115px" MaxLength="20"></asp:TextBox></td>  
                                                                            </tr> 
                                                                        </table> 
                                                                    </td> 
                                                                </tr> 
                                                            </table> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td style="width:400px">  
                                                            <table> 
                                                                <tr > 
                                                                    <td style="width: 100px">  
                                                                        <strong>Insurer</strong></td>  
                                                                    <td style="width:300px">  
                                                                        <rad:RadComboBox ID="cboInsurers" runat="server" Skin="Vista" SkinsPath="~/RadControls/ComboBox/Skins" Width="300px" DataTextField="Insurer_Name" DataValueField="Insurer_ID">  
                                                                        </rad:RadComboBox> 
                                                                    </td> 
                                                                </tr> 
                                                            </table> 
                                                        </td> 
                                                        <td style="width:500px">  
                                                            <table> 
                                                                <tr> 
                                                                    <td style="width: 80px" > 
                                                                        Insurer Ref</td> 
                                                                    <td> 
                                                                        <asp:TextBox ID="txtInsureRef" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Insurer_Ref_No") %>' Width="250px" MaxLength="50"></asp:TextBox></td>  
                                                                </tr> 
                                                            </table> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td style="width:400px">  
                                                            <table> 
                                                                <tr > 
                                                                    <td style="width: 100px">  
                                                                        <strong>Claimant Name</strong></td>  
                                                                    <td style="width:300px">  
                                                                        <asp:TextBox ID="txtClaimantName" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Claimant_Name") %>' Width="300px" MaxLength="50"></asp:TextBox> 
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="txtClaimantName" 
                                                                            ErrorMessage="* Required Claimant Name" Display="Dynamic" Width="300px"></asp:RequiredFieldValidator></td>  
                                                                </tr> 
                                                            </table> 
                                                        </td> 
                                                        <td style="width:500px">  
                                                            <table> 
                                                                <tr> 
                                                                    <td style="width:80px">  
                                                                        Claim Status</td> 
                                                                    <td style="width:auto">  
                                                                        <rad:RadComboBox ID="cboClaimStatus" runat="server" Skin="Vista" SkinsPath="~/RadControls/ComboBox/Skins" Width="250px" DataTextField="Claim_Status" DataValueField="Status_ID">  
                                                                        </rad:RadComboBox> 
                                                                    </td> 
                                                                </tr> 
                                                            </table> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td style="width:400px">  
                                                            <table> 
                                                                <tr > 
                                                                    <td style="width: 100px">  
                                                                        <strong>Claim Type</strong></td>  
                                                                    <td  style="width:300px">  
                                                                        <rad:RadComboBox ID="cboClaimTypes" runat="server" Skin="Vista" SkinsPath="~/RadControls/ComboBox/Skins" Width="300px" DataTextField="Claim_Type" DataValueField="Type_ID" > 
                                                                        </rad:RadComboBox> 
                                                                    </td> 
                                                                </tr> 
                                                            </table> 
                                                        </td> 
                                                        <td style="width:500px">  
                                                            <table> 
                                                                <tr> 
                                                                    <td style="width:80px">  
                                                                        Value</td> 
                                                                    <td style="width:auto">  
                                                                        <rad:RadNumericTextBox ID="nbrValue" runat="server" Width="100px" Culture="English (United States)" DbValue='<%# DataBinder.Eval(Container, "DataItem.Value") %>' LabelCssClass="radLabelCss_Default" Skin="" MinValue="0" MaxLength="12" style="text-align: right" Font-Names="Arial">  
                                                                            <NumberFormat AllowRounding="True" /> 
                                                                        </rad:RadNumericTextBox></td>  
                                                                </tr> 
                                                            </table> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td style="width:400px" > 
                                                            <table> 
                                                                <tr > 
                                                                    <td style="width:100px">  
                                                                        <strong>Property</strong></td>  
                                                                    <td  style="width:300px">  
                                                                        <asp:TextBox ID="txtProperty" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Property") %>' width="300px"  MaxLength="200"></asp:TextBox> 
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="txtProperty" 
                                                                            ErrorMessage="* Property Name is Required "  Display="Dynamic"></asp:RequiredFieldValidator></td>  
                                                                </tr> 
                                                            </table> 
                                                        </td> 
                                                        <td style="width:500px; vertical-align: text-top; text-align: left;" rowspan="3">  
                                                            Desc of claim<br /> 
                                                            <asp:TextBox ID="txtDescOfClaim" runat="server" Height="70px" MaxLength="220" Text='<%# DataBinder.Eval(Container, "DataItem.Description_of_Claim") %>' 
                                                                TextMode="MultiLine" Width="335px" Font-Names="Arial"></asp:TextBox> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td style="width:400px">  
                                                            <table> 
                                                                <tr > 
                                                                    <td style="width: 100px">  
                                                                        <strong>Incident date</strong></td>  
                                                                    <td style="width:300px">  
                                                                        <rad:RadDatePicker ID="dtpIncidentDate" runat="server" Skin="Office2007" Width="300px" dbselecteddate='<%#DataBinder.Eval(Container, "DataItem.incident_Date") %>' Culture="English (United Kingdom)" EnableTyping="False">  
                                                                            <Calendar Skin="Office2007">  
                                                                            </Calendar> 
                                                                            <DateInput Skin="Office2007" ReadOnly="True">  
                                                                            </DateInput> 
                                                                        </rad:RadDatePicker> 
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="dtpIncidentDate" 
                                                                            ErrorMessage="* Incident date is required" Width="256px" Display="Dynamic"></asp:RequiredFieldValidator><asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="dtpDateNotified" 
                                                                            ControlToValidate="dtpIncidentDate" ErrorMessage="Incident date must be before or equal to date notified" 
                                                                            Operator="LessThanEqual" Width="256px" Display="Dynamic"></asp:CompareValidator></td>  
                                                                </tr> 
                                                            </table> 
                                                        </td> 
                                                          
                                                    </tr> 
                                                    <tr> 
                                                        <td style="width:400px; height: 81px;">  
                                                            <table> 
                                                                <tr > 
                                                                    <td style="width: 100px">  
                                                                        <strong>Date notified</strong></td>  
                                                                    <td  style="width:300px; vertical-align=top">  
                                                                        <rad:RadDatePicker ID="dtpDateNotified" runat="server" Skin="Office2007" Width="300px" dbselecteddate='<%#DataBinder.Eval(Container, "DataItem.Date_Notified") %>' Culture="English (United Kingdom)" EnableTyping="False">  
                                                                            <Calendar Skin="Office2007">  
                                                                            </Calendar> 
                                                                            <DateInput Skin="Office2007" ReadOnly="True">  
                                                                            </DateInput> 
                                                                        </rad:RadDatePicker> 
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="dtpDateNotified" 
                                                                            ErrorMessage="* Date notified is required" Width="248px" Display="Dynamic"></asp:RequiredFieldValidator><asp:CompareValidator ID="cmpDateNotified" runat="server" ControlToValidate="dtpDateNotified" 
                                                                            ErrorMessage="Date Notified must today or before" Operator="LessThanEqual" Width="248px"  Type="Date" Display="Dynamic"></asp:CompareValidator></td>  
                                                                </tr> 
                                                            </table> 
                                                        </td> 
                                                        
                                                    </tr> 
                                                    <tr> 
                                                        <td style="height: 18px" colspan="2">  
                                                            &nbsp;</td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td  colspan="2" style="vertical-align: top; text-align: left">  
                                                            </td>     
                                                    </tr> 
                                                </table> 
                                                    <asp:Button ID="cmdUpdate" runat="server" CommandName="Update" text"Update" Visible="False" OnClientClick="return confirm('Confirm update claim record?');"/>  
                                                    <asp:Button ID="cmdInsert" runat="server" CommandName="PerformInsert" Text="Insert" Visible="False" OnClientClick="return confirm('Confirm insert claim record?');" /> 
                                                    <asp:Button ID="cmdCancel" runat="server" CommandName="Cancel" Text="Cancel" CausesValidation="False" /> 
                                            </FormTemplate> 
                                            <EditColumn UniqueName="EditCommandColumn1">  
                                            </EditColumn> 
                                        </EditFormSettings> 
                                        <Columns> 
                                            <rad:GridEditCommandColumn> 
                                                <HeaderStyle Width="50px" /> 
                                                <ItemStyle HorizontalAlign="Center" /> 
                                            </rad:GridEditCommandColumn> 
                                            <rad:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteCol" ConfirmText="Are you sure you want to delete record?">  
                                                <HeaderStyle Width="50px" /> 
                                                <ItemStyle HorizontalAlign="Center" /> 
                                            </rad:GridButtonColumn> 
                                            <rad:GridBoundColumn AllowFiltering="False" DataField="Claim_ID" HeaderText="ID" 
                                                UniqueName="Claim_ID" AutoPostBackOnFilter="True">  
                                                <ItemStyle HorizontalAlign="Center" /> 
                                                <HeaderStyle Width="50px" /> 
                                            </rad:GridBoundColumn> 
                                            <rad:GridBoundColumn DataField="Date_Notified" DataFormatString="{0:dd-MM-yy}"   
                                                DataType="System.DateTime" HeaderText="Notified" UniqueName="Date_Notified" AllowFiltering="False" > 
                                                <ItemStyle HorizontalAlign="Right" /> 
                                                <HeaderStyle Width="100px" /> 
                                            </rad:GridBoundColumn> 
                                            <rad:GridBoundColumn DataField="Company_Name" HeaderText="Company" 
                                                UniqueName="Company_Name" AutoPostBackOnFilter="True" CurrentFilterFunction="Contains">  
                                                <HeaderStyle Width="180px" /> 
                                            </rad:GridBoundColumn> 
                                            <rad:GridBoundColumn AllowFiltering="False" DataField="Insurer_Ref" HeaderText="Insurer Ref" 
                                                UniqueName="Insurer_Ref">  
                                                <HeaderStyle Width="80px" /> 
                                            </rad:GridBoundColumn> 
                                            <rad:GridBoundColumn DataField="Year" DataType="System.Int16"   
                                                HeaderText="Year" UniqueName="Year" AutoPostBackOnFilter="True" CurrentFilterFunction="Contains">  
                                                <ItemStyle HorizontalAlign="Center" /> 
                                                <HeaderStyle Width="120px" /> 
                                            </rad:GridBoundColumn> 
                                            <rad:GridBoundColumn DataField="Property" HeaderText="Property" 
                                                UniqueName="Property" AutoPostBackOnFilter="True" CurrentFilterFunction="Contains">  
                                                <HeaderStyle Width="180px" /> 
                                            </rad:GridBoundColumn> 
                                            <rad:GridBoundColumn AllowFiltering="False" DataField="Incident_Date" DataFormatString="{0:dd-MM-yy}" 
                                                DataType="System.DateTime" HeaderText="Incident" UniqueName="Incident_Date">  
                                                <ItemStyle HorizontalAlign="Right" /> 
                                                <HeaderStyle Width="90px" /> 
                                            </rad:GridBoundColumn> 
                                            <rad:GridBoundColumn AllowFiltering="False" DataField="Claimant_Name" HeaderText="Claimant" 
                                                UniqueName="Claimant_Name">  
                                                <HeaderStyle Width="180px" /> 
                                            </rad:GridBoundColumn> 
                                            <rad:GridBoundColumn DataField="Claim_Type" HeaderText="Claim Type" 
                                                UniqueName="Claim_Type" AutoPostBackOnFilter="True" CurrentFilterFunction="Contains">  
                                                <HeaderStyle Width="120px" /> 
                                            </rad:GridBoundColumn> 
                                            <rad:GridBoundColumn DataField="Claim_Status" HeaderText="Status" UniqueName="Claim_Status" AutoPostBackOnFilter="True" CurrentFilterFunction="Contains">  
                                            </rad:GridBoundColumn> 
                                            <rad:GridBoundColumn DataField="Company_ID" HeaderText="Company_ID" UniqueName="Company_ID" 
                                                Visible="False">  
                                            </rad:GridBoundColumn> 
                                            <rad:GridBoundColumn DataField="FPDSavills_Ref" HeaderText="Savills_Ref" UniqueName="FPDSavills_Ref" 
                                                Visible="False">  
                                            </rad:GridBoundColumn> 
                                            <rad:GridBoundColumn DataField="Status" HeaderText="Status" UniqueName="Status" Visible="False" AllowFiltering="False">  
                                            </rad:GridBoundColumn> 
                                            <rad:GridBoundColumn DataField="Value" HeaderText="Value" UniqueName="Value" Visible="False">  
                                            </rad:GridBoundColumn> 
                                            <rad:GridBoundColumn DataField="Description_of_claim" HeaderText="Desc of claim" 
                                                UniqueName="Description_of_claim" Visible="False">  
                                            </rad:GridBoundColumn> 
                                            <rad:GridBoundColumn DataField="Comments" HeaderText="Comments" UniqueName="Comments" 
                                                Visible="False">  
                                            </rad:GridBoundColumn> 
                                        </Columns> 
                                        <ExpandCollapseColumn Resizable="False">  
                                            <HeaderStyle Width="20px" /> 
                                        </ExpandCollapseColumn> 
                                        <RowIndicatorColumn Visible="False">  
                                            <HeaderStyle Width="20px" /> 
                                        </RowIndicatorColumn> 
                                        <DetailTables> 
                                            <rad:GridTableView runat="server" AllowFilteringByColumn="False" DataKeyNames="Claim_ID,Comment_ID" CommandItemDisplay="Top" GridLines="Both" Name="Comments">  
                                                <EditFormSettings EditFormType="Template">  
                                                    <EditColumn UniqueName="EditCommandColumn1">  
                                                    </EditColumn> 
                                                    <FormTemplate> 
                                                        Comment<br /> 
                                                        <asp:TextBox ID="txtComment" runat="server" Height="136px" TextMode="MultiLine" Width="464px" Text='<%# DataBinder.Eval(Container, "DataItem.CommentText") %>'></asp:TextBox> 
                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtComment" 
                                                            ErrorMessage="RequiredFieldValidator" Width="448px">* Comment is required</asp:RequiredFieldValidator><br /> 
                                                        <asp:Button ID="cmdInsert" runat="server" CommandName="PerformInsert" Text="Insert" OnClientClick="return confirm('Confirm insert comment?');" /> 
                                                        <asp:Button ID="cmdUpdate" runat="server" CommandName="Update" Text="Update" OnClientClick="return confirm('Confirm update comment?');" /> 
                                                        <asp:Button ID="cmdCancel" runat="server" CommandName="Cancel" Text="Cancel" /> 
                                                    </FormTemplate> 
                                                </EditFormSettings> 
                                                <Columns> 
                                                    <rad:GridEditCommandColumn> 
                                                    </rad:GridEditCommandColumn> 
                                                    <rad:GridButtonColumn CommandName="Delete"  Text="Delete" 
                                                        UniqueName="DeleteCol">  
                                                    </rad:GridButtonColumn> 
                                                    <rad:GridBoundColumn DataField="Comment_ID" HeaderText="Comment ID" UniqueName="Comment_ID" Visible="False">  
                                                    </rad:GridBoundColumn> 
                                                    <rad:GridBoundColumn HeaderText="Comment" UniqueName="CommentText" DataField="CommentText"  > 
                                                        <HeaderStyle Width="250px" /> 
                                                    </rad:GridBoundColumn> 
                                                    <rad:GridBoundColumn DataField="Update_Date" DataType="System.DateTime" HeaderText="Last Update" 
                                                        UniqueName="Update_Date" DataFormatString="{0:dd-MM-yy}">  
                                                        <HeaderStyle Width="120px" /> 
                                                    </rad:GridBoundColumn> 
                                                    <rad:GridBoundColumn DataField="Update_User" HeaderText="Update By" UniqueName="Update_User">  
                                                        <HeaderStyle Width="120px" /> 
                                                    </rad:GridBoundColumn> 
                                                </Columns> 
                                                <ExpandCollapseColumn Resizable="False" Visible="False">  
                                                    <HeaderStyle Width="20px" /> 
                                                </ExpandCollapseColumn> 
                                                <RowIndicatorColumn Visible="False">  
                                                    <HeaderStyle Width="20px" /> 
                                                </RowIndicatorColumn> 
                                            </rad:GridTableView> 
                                        </DetailTables> 
                                    </MasterTableView> 
                                    <HeaderStyle HorizontalAlign="Center" /> 
                                    <PagerStyle Mode="NextPrevAndNumeric" /> 
                                    <ClientSettings AllowDragToGroup="True">  
                                        <Resizing AllowColumnResize="True" /> 
                                    </ClientSettings> 
                                </rad:RadGrid> 
                            </td> 
                        </tr> 
                    </table> 
                      
                </td> 
            </tr> 
        </table> 
          
        <rad:RadWindowManager ID="winMain" runat="server" Skin="Vista"  > 
            <Windows> 
                <rad:RadWindow ID="RadWin" runat="server" Left="" NavigateUrl="" SkinsPath="~/RadControls/Window/Skins"   OnClientClose="OnClientClose" 
                    Title="" Top="" Height="600px" Modal="True" Width="800px" /> 
                  
            </Windows> 
        </rad:RadWindowManager> 
        &nbsp;  
      
    </div> 
    </form> 
</body> 
</html> 
 
Ian
Top achievements
Rank 1
 answered on 28 Jun 2012
1 answer
89 views
I'm currently working with RadContextMenu in RadGrid most of functions work well except on FF in which I encouter an issue (does't work) with 
menuItem.disable(); and menuItem.enable();
Nazm
Top achievements
Rank 1
 answered on 28 Jun 2012
6 answers
220 views
Hi,
 I have a radgrid with static headers, column resizing enabled and scrolling enabled. Everything works fine until I resize any of column. When I resize any of columns, GridTableView get resized and a gap comes between scroll bar & gridtableview. I don't want gridtableview to get resized but others columns should be resized accordingly (which is behaviour with non-static headers).
Thanks,
Mahesh
Pavlina
Telerik team
 answered on 28 Jun 2012
1 answer
175 views
Hi Everyone,

I have my RadListView as below:

telerik:RadListView ID="rlvContentDisplay" runat="server"

        AllowPaging="True"

        AllowSorting="True"

        BorderStyle="None"

        GridLines="None"   

        DataKeyNames="PropertyID"

        ItemPlaceholderID="DashboardPlaceHolder"

        OnItemDataBound="rlvContent_ItemDataBound"

        OnNeedDataSource="rlvContent_NeedDataSource"

        ItemCommand = "rlvContent_ItemCommand"

        Width="100%">

        <LayoutTemplate>

<div id="assetIndex">

     <div class="expand"></div>

     <div id="DashboardPlaceHolder" runat="server"></div>            

     <telerik:RadDataPager ID="rdpContent" CssClass="dashboardPaginate" runat="server"PagedControlID="rlvContentDisplay" PageSize="15" BorderStyle="None" Width="700"EnableEmbeddedSkins="false" Skin="RadSkin">

               <Fields>

                 <telerik:RadDataPagerPageSizeField PageSizeText="Results per page" />

                 <telerik:RadDataPagerGoToPageField CurrentPageText="Page:"TotalPageText="of" SubmitButtonText="" TextBoxWidth="25" />

                  <telerik:RadDataPagerButtonField FieldType="NextLast" />

                  <telerik:RadDataPagerButtonField FieldType="Numeric" />  

                  <telerik:RadDataPagerButtonField FieldType="FirstPrev" />

                </Fields>

                </telerik:RadDataPager>

            </div>

           </LayoutTemplate>   

        <ItemTemplate>

            <div id="contentHold_<%# Convert.ToString(DataBinder.Eval(Container.DataItem, "id"))%>" class="asset max">

                <div>

                    <div class="summary imageContainer toggleDetail" alt="toggle"onclick="toggleDetail(this, <%# Convert.ToString(DataBinder.Eval(Container.DataItem, "id"))%>)"></div>

                    <div class="summary lineContainer">

                           <div id="galleryImageBox" class="galleryImageBox"runat="server">

                            <asp:HyperLink ID="headlineLink" runat="server"><asp:ImageID="storyThumb" runat="server" CssClass="storyThumb" /></asp:HyperLink>

                           </div>

                           <div class="galleryInfoContainer">

                                  <asp:Literal ID="litHeadlineLink" runat="server"></asp:Literal>

                            <div id="abstract_<%#Convert.ToString(DataBinder.Eval(Container.DataItem, "id"))%>" class="detail itemAbstract">

                                <asp:Literal runat="server" ID="litAbstract" />

                            </div>

                                  <div class="byline">By <asp:Literal runat="server"ID="litAuthorInfo" /></div>

                                 

                           </div>

                    </div>

                    <div class="summary sectionContainer"><asp:Literal runat="server"ID="litSectionInfo" /></div>

                    <div class="summary metaContainer">

                        <div class="datetime"><asp:Literal runat="server"ID="litDateStamp" /></div>

                        <span class="fontRed"><asp:Literal runat="server" ID="litMinsAgo"/></span>

                           <div class="user"><asp:Literal runat="server" ID="litLastUser"/></div>                       

                        <div class="status redText"><asp:Literal ID="litStatus"runat="server" Visible="true" /></div>                       

                    </div>

                </div>

            </div>

           

            <div class="asset hrule"></div>

            <div id="asset_<%# Convert.ToString(DataBinder.Eval(Container.DataItem, "id"))%>" class="detail">

                <div style="background-color:#f1f1f1; padding:10px">

                               <asp:Literal ID="litAssetsSlider" runat="server" />

                               <div id="emptyAsset" class="emptyAsset" runat="server"visible="false">

                                      <div class="largeMessage">You have no assets.</div>

                                      <telerik:RadButton ID="btnAddAlbum" runat="server"AutoPostBack="False" BackColor="transparent" ButtonType="LinkButton"UseSubmitBehavior="False"

                                             Text="Add Asset" Title="Add an asset for this Story" EnableEmbeddedSkins="false"

                            Skin="RadSkin" />

                               </div>

                </div>

                     </div>

           

        </ItemTemplate>

    </telerik:RadListView>


In my code behind:

I am binding and changin the value of litSectionInfo as below:

 protected void rlvContent_ItemDataBound(object sender, RadListViewItemEventArgs e)
        {
System.Web.UI.WebControls.Literal litSectionInfo = (System.Web.UI.WebControls.Literal)e.Item.FindControl("litSectionInfo");
                    if (litSectionInfo != null)
                    {
                        LoadStoryKeyValuePairs(thisStory.Metadata.item);
                        if (ArticleKeyValuePairs.ContainsKey("ssts"))
                        {
                            char[] delimiterChars = { '/' };
                            string[] ssts = ArticleKeyValuePairs["ssts"].ToString().Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries);
                            if (ssts.Length > 0)
                            {                                
                                litSectionInfo.Text = char.ToUpper(ssts[0][0]) + ssts[0].Substring(1);
                            }
                        }                       
                        if (thisStory.Handling.publishto != null && thisStory.Handling.publishto.ssts != null)
                        {
                            string sitename = "";
                            if (siteTypes.ContainsKey(thisStory.siteid) && siteTypes[thisStory.siteid][0].ToLower() == "blog")
                            {
                                sitename = siteTypes[thisStory.siteid][1];
                            }
                            else
                            {
                                sitename = thisStory.Handling.publishto.ssts.section;
                            }
                            if (sitename != null) {  litSectionInfo.Text = char.ToUpper(sitename[0]) + sitename.Substring(1); }
                        }
}          }

My Literal control inside the listview displays info correctly.
I have a combobox which holds values section ASC and Section DESC.

How can I sort based on the literal control column data that is displayed in the radlistview?

what value do i need to pass for the expression.FieldName,(example for id, right now i am passing expression.FieldName ="Id", this works because Id is the dataitem ).

Someone please help me figure out this,

Thanks in advance for your help.


Sakshi
Top achievements
Rank 1
 answered on 28 Jun 2012
3 answers
74 views
Hi,
In my project i open a Rad Editor on click of a button in new popup window.
when i re-size the popup window  the size of rad editor also get extend and act strange.
For reference look at the screenshot attached.
The problem persist in IE 7,8,9.
But works fine in mozilla.

Thanks
Sandeep
Rumen
Telerik team
 answered on 28 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?