Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
113 views
Dear all,

i'm new in using Telerik controls ,  i got an error "object reference not set for an instance of object"(see the attached file) when i'm trying to update the form and the grid.

this is my code 
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="~/Property/AddProperty.aspx.cs" Inherits="GWERP.Aqar.AddProperty" %>
 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
      
 
    <script type="text/javascript">
 
         
      //<![CDATA[
        function DeleteImageVedio(args, message, event, title) {
 
            if (args) {
            var conVal=radconfirm(message, event, 330, 100, null, title);
                if (conVal) {
                    args.parentNode.parentNode.parentNode.firstChild.firstChild.firstChild.className = "deleteted";
                    return false
                }
                else {
                    return false;
                }
 
            }
        }
        function validationFailed(sender, eventArgs) {
            $(".ErrorHolder").append("???? ????? ??? ?????? '" + '*' + eventArgs.get_fileName().substring(eventArgs.get_fileName().lastIndexOf('.')) + "'.</p>").fadeIn("slow");
        }
      //]]>
    </script>
    <link href="../css/sushi.css" rel="stylesheet" type="text/css" />
 
 
    <tel:RadAjaxLoadingPanel ID="ralpMain" runat="server" Skin="Web20">
          
    </tel:RadAjaxLoadingPanel>
    <tel:RadAjaxPanel ID="rapMain" runat="server" Height="100%" Width="100%" >
        <table style="width: 100%">
            <tr>
                <td colspan="3" align="center">
                    <asp:Label ID="Label30" runat="server" Text="????? ????" CssClass="formlable1" Font-Size="Large"></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                      
                </td>
                <td>
                     </td>
                <td>
                      
                </td>
            </tr>
            <tr>
                <td>
                    <gw:CustomLabel ID="lblPropertyStateName0" CssClass="formlable" runat="server" MyEnabled=""
                        MyVisible="">?????</gw:CustomLabel>
                </td>
                <td>
                    <tel:RadComboBox ID="ddlCountry" AllowCustomText="false" MarkFirstMatch="true" DataSourceID="ods_GetLookupDetails"
                        DataValueField="LockupDetail_ID" DataTextField="LockupDetail_Name" AutoPostBack="true"
                        AppendDataBoundItems="true" runat="server" Skin="Web20" OnSelectedIndexChanged="ddlCountry1_SelectedIndexChanged"
                        HighlightTemplatedItems="true">
                        <Items>
                            <tel:RadComboBoxItem Text="------?????? ????????-----" Value="0" />
                        </Items>
                    </tel:RadComboBox>
                    <asp:ObjectDataSource ID="ods_GetLookupDetails" runat="server" SelectMethod="GetLockupDetails"
                        TypeName="GWERP.DataAccess.Lockups.General_LockupDetail1">
                        <SelectParameters>
                            <asp:Parameter DefaultValue="123" Name="LockupMaster_ID" Type="Int32" />
                            <asp:Parameter DefaultValue="ar" Name="Lang" Type="String" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                </td>
                <td>
                      
                </td>
            </tr>
            <tr>
                <td>
                    <gw:CustomLabel ID="lblPropertyStateName2" CssClass="formlable" runat="server" MyEnabled=""
                        MyVisible="">???????</gw:CustomLabel>
                </td>
                <td>
                    <tel:RadComboBox ID="ddlRegion" runat="server" AllowCustomText="false" AppendDataBoundItems="true"
                        A DataSourceID="odsGetRegions" DataTextField="LookupDetalDeepName" DataValueField="LookupDetailsDeep_ID"
                        AutoPostBack="True" HighlightTemplatedItems="true" MarkFirstMatch="true" Skin="Web20"
                        OnSelectedIndexChanged="ddlRegion_SelectedIndexChanged">
                        <Items>
                            <tel:RadComboBoxItem Text="------?????? ????????-----" Value="0" />
                        </Items>
                    </tel:RadComboBox>
                    <asp:ObjectDataSource ID="odsGetRegions" runat="server" SelectMethod="GetLockupDetails"
                        TypeName="GWERP.DataAccess.Lockups.GeneralLookupDeep">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="ddlCountry" Name="LockupMaster_ID" PropertyName="SelectedValue"
                                Type="Int32" />
                            <asp:Parameter DefaultValue="ar" Name="Lang" Type="String" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                </td>
                <td>
                      
                </td>
            </tr>
            <tr>
                <td>
                    <gw:CustomLabel ID="lblPropertyStateName1" CssClass="formlable" runat="server">???????</gw:CustomLabel>
                </td>
                <td>
                    <tel:RadComboBox ID="ddlCity" runat="server" A="" AllowCustomText="false" AppendDataBoundItems="true"
                        AutoPostBack="True" DataSourceID="odsCites" DataTextField="LookupDetalDeepName"
                        DataValueField="LookupDetailsDeep_ID" HighlightTemplatedItems="true" MarkFirstMatch="true"
                        Skin="Web20" OnSelectedIndexChanged="ddlCity_SelectedIndexChanged">
                        <Items>
                            <tel:RadComboBoxItem Text="------?????? ????????-----" Value="0" />
                        </Items>
                    </tel:RadComboBox>
                    <asp:ObjectDataSource ID="odsCites" runat="server" SelectMethod="GetLockupDetails"
                        TypeName="GWERP.DataAccess.Lockups.GeneralLookupDeep">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="ddlRegion" Name="LockupMaster_ID" PropertyName="SelectedValue"
                                Type="Int32" />
                            <asp:Parameter DefaultValue="ar" Name="Lang" Type="String" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                </td>
                <td>
                      
                </td>
            </tr>
            <tr>
                <td>
                    <gw:CustomLabel ID="CustomLabel1" runat="server" CssClass="formlable">????</gw:CustomLabel>
                </td>
                <td>
                    <tel:RadComboBox ID="ddlQuarter" runat="server" A="" AllowCustomText="false" AppendDataBoundItems="true"
                        AutoPostBack="True" DataSourceID="odsQuarter" DataTextField="LookupDetalDeepName"
                        DataValueField="LookupDetailsDeep_ID" HighlightTemplatedItems="true" MarkFirstMatch="true"
                        Skin="Web20">
                        <Items>
                            <tel:RadComboBoxItem Text="------?????? ????????-----" Value="0" />
                        </Items>
                    </tel:RadComboBox>
                    <asp:ObjectDataSource ID="odsQuarter" runat="server" SelectMethod="GetLockupDetails"
                        TypeName="GWERP.DataAccess.Lockups.GeneralLookupDeep">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="ddlCity" Name="LockupMaster_ID" PropertyName="SelectedValue"
                                Type="Int32" />
                            <asp:Parameter DefaultValue="ar" Name="Lang" Type="String" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                </td>
                <td>
                      
                </td>
            </tr>
            <tr>
                <td>
                    <gw:CustomLabel ID="CustomLabel2" runat="server" MyEnabled="" MyVisible="" CssClass="formlable">??? ??????</gw:CustomLabel>
                </td>
                <td>
                    <tel:RadTextBox ID="txtPeiceNumber" runat="server" Skin="Web20" Columns="24">
                    </tel:RadTextBox>
                </td>
                <td>
                      
                </td>
            </tr>
            <tr>
                <td>
                    <gw:CustomLabel ID="CustomLabel11" CssClass="formlable" runat="server" MyEnabled=""
                        MyVisible="">??? ??????</gw:CustomLabel>
                </td>
                <td>
                    <tel:RadTextBox ID="txtPropertySchemaNumber" runat="server" Columns="24"
                        Skin="Web20">
                    </tel:RadTextBox>
                </td>
                <td>
                     </td>
            </tr>
            <tr>
                <td>
                    <gw:CustomLabel ID="lblPropertyStateName" runat="server" CssClass="formlable"
                        MyEnabled="" MyVisible="">??? ??????</gw:CustomLabel>
                </td>
                <td>
                    <tel:RadTextBox ID="txtPropertyStateName" runat="server" Columns="24"
                        Skin="Web20">
                    </tel:RadTextBox>
                </td>
                <td>
                      
                </td>
            </tr>
            <tr>
                <td>
                    <gw:CustomLabel ID="lblPropertyStateName3" CssClass="formlable" runat="server" MyEnabled=""
                        MyVisible="">??? ??????</gw:CustomLabel>
                </td>
                <td>
                    <tel:RadComboBox ID="ddlPropertyType" runat="server" A="" AllowCustomText="false"
                        AppendDataBoundItems="true" AutoPostBack="True" DataSourceID="odsPropertyType"
                        DataTextField="LockupDetail_Name" DataValueField="LockupDetail_ID" HighlightTemplatedItems="true"
                        MarkFirstMatch="true" Skin="Web20">
                        <Items>
                            <tel:RadComboBoxItem Text="------?????? ????????-----" Value="0" />
                        </Items>
                    </tel:RadComboBox>
                    <asp:ObjectDataSource ID="odsPropertyType" runat="server" SelectMethod="GetLockupDetails"
                        TypeName="GWERP.DataAccess.Lockups.General_LockupDetail1">
                        <SelectParameters>
                            <asp:Parameter DefaultValue="126" Name="LockupMaster_ID" Type="Int32" />
                            <asp:Parameter DefaultValue="ar" Name="Lang" Type="String" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                </td>
                <td>
                      
                </td>
            </tr>
            <tr>
                <td valign="top">
                    <gw:CustomLabel ID="lblAddress" runat="server" MyEnabled="" MyVisible="" CssClass="formlable">???????</gw:CustomLabel>
                </td>
                <td>
                    <tel:RadTextBox ID="txtAddress" runat="server" Skin="Web20" Columns="24" Height="100"
                        TextMode="MultiLine">
                    </tel:RadTextBox>
                </td>
                <td>
                      
                </td>
            </tr>
            <tr>
                <td>
                    <gw:CustomLabel ID="CustomLabel4" runat="server" MyEnabled="" MyVisible="" CssClass="formlable">??????</gw:CustomLabel>
                </td>
                <td>
                    <tel:RadComboBox ID="ddlPropertyState" runat="server" A="" AllowCustomText="false"
                        AppendDataBoundItems="true" AutoPostBack="True" DataTextField="LockupDetail_Name"
                        DataValueField="LockupDetail_ID" DataSourceID="odsPropertyState" HighlightTemplatedItems="true"
                        MarkFirstMatch="true" Skin="Web20">
                        <Items>
                            <tel:RadComboBoxItem Text="------?????? ????????-----" Value="0" />
                        </Items>
                    </tel:RadComboBox>
                    <asp:ObjectDataSource ID="odsPropertyState" runat="server" SelectMethod="GetLockupDetails"
                        TypeName="GWERP.DataAccess.Lockups.General_LockupDetail1">
                        <SelectParameters>
                            <asp:Parameter DefaultValue="127" Name="LockupMaster_ID" Type="Int32" />
                            <asp:Parameter DefaultValue="ar" Name="Lang" Type="String" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                </td>
                <td>
                      
                </td>
            </tr>
            <tr>
                <td valign="top">
                    <gw:CustomLabel ID="CustomLabel5" runat="server" MyEnabled="" MyVisible="" CssClass="formlable">?????</gw:CustomLabel>
                </td>
                <td>
                    <tel:RadTextBox ID="txtPropertyDescription" runat="server" Columns="24" Height="100"
                        Skin="Web20" TextMode="MultiLine">
                    </tel:RadTextBox>
                </td>
                <td>
                      
                </td>
            </tr>
            <tr>
                <td>
                    <gw:CustomLabel ID="CustomLabel7" runat="server" MyEnabled="" MyVisible="" CssClass="formlable">???????</gw:CustomLabel>
                </td>
                <td>
                    <tel:RadTextBox ID="txtPropertySpace" runat="server" Skin="Web20" Columns="24">
                    </tel:RadTextBox>
                </td>
                <td>
                      
                </td>
            </tr>
            <tr>
                <td style="height: 30px">
                    <gw:CustomLabel ID="CustomLabel6" runat="server" CssClass="formlable"
                        MyEnabled="" MyVisible="">?????</gw:CustomLabel>
                </td>
                <td style="height: 30px">
                    <table style="width:100%;">
                        <tr>
                            <td>
                                <tel:RadTextBox ID="txtPropertyPrice" runat="server" Columns="24" Skin="Web20">
                                </tel:RadTextBox>
                            </td>
                            <td>
                                <gw:CustomLabel ID="CustomLabel12" runat="server" CssClass="formlable"
                                    MyEnabled="" MyVisible="">??</gw:CustomLabel>
                            </td>
                            <td>
                                <tel:RadDateTimePicker ID="rdtpPriceFrom" Skin="Web20" Runat="server">
                               <DateInput Enabled="false" Culture="ar-SA"></DateInput>
                              <ShowAnimation Type="Slide" />
                                </tel:RadDateTimePicker>
                            </td>
                            <td>
                                <gw:CustomLabel ID="CustomLabel13" runat="server" CssClass="formlable"
                                    MyEnabled="" MyVisible="">???</gw:CustomLabel>
                            </td>
                            <td>
                                <tel:RadDateTimePicker ID="rdtpPriceTo" Skin="Web20" Runat="server">
                                    <DateInput Enabled="false" Culture="ar-SA" ></DateInput>
                              
                                </tel:RadDateTimePicker>
                               
                            </td>
                        </tr>
                    </table>
                </td>
                <td style="height: 30px">
                      
                </td>
            </tr>
            <tr>
                <td>
                    <gw:CustomLabel ID="CustomLabel10" runat="server" MyEnabled="" MyVisible="" CssClass="formlable">??? ???????</gw:CustomLabel>
                </td>
                <td>
                    <tel:RadComboBox ID="ddlPropertyOperation" runat="server" A="" AllowCustomText="false"
                        AppendDataBoundItems="true" AutoPostBack="True" DataSourceID="odsPropertyOperation"
                        DataTextField="LockupDetail_Name" DataValueField="LockupDetail_ID" HighlightTemplatedItems="true"
                        MarkFirstMatch="true" Skin="Web20">
                        <Items>
                            <tel:RadComboBoxItem Text="------?????? ????????-----" Value="0"
                                Owner="ddlPropertyOperation" />
                                 
                        </Items>
                    </tel:RadComboBox>
                    <asp:ObjectDataSource ID="odsPropertyOperation" runat="server" SelectMethod="GetLockupDetails"
                        TypeName="GWERP.DataAccess.Lockups.General_LockupDetail1">
                        <SelectParameters>
                            <asp:Parameter DefaultValue="128" Name="LockupMaster_ID" Type="Int32" />
                            <asp:Parameter DefaultValue="ar" Name="Lang" Type="String" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                </td>
                <td>
                      
                </td>
            </tr>
            <tr>
                <td>
                     </td>
                <td>
               
                 
                </td>
                <td>
                     </td>
            </tr>
        </table>
    
    <br />
      
        <table style="width: 100%;">
            <tr>
                <td colspan="3" align="center">
                    <div class="ErrorHolder">
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <gw:CustomLabel ID="CustomLabel8" runat="server" MyEnabled="" MyVisible="" CssClass="formlable">????? ?????</gw:CustomLabel>
                </td>
                <td>
                      
                </td>
                <td>
                      
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <tel:RadAsyncUpload ID="raUploadImages" MultipleFileSelection="Automatic" runat="server"
                        TargetFolder="~/PropertiesPath/Images/" Skin="Web20" AllowedFileExtensions="jpg,jpeg,png,gif"
                        OnClientValidationFailed="validationFailed">
                        <Localization Cancel="?????" Remove="???" Select="??????" />
                    </tel:RadAsyncUpload>
                </td>
            </tr>
            <tr>
                <td colspan="3">
               
 <tel:RadListView ID="lvImages" runat="server" AllowPaging="True" Visible="false"
                        datasourceid="odsGetPropertyImages" EnableLinqExpressions="false"
                        ItemPlaceholderID="phImages" PageSize="2" Skin="Web20">
                         
                        <LayoutTemplate>
                        <fieldset>
                            <legend  class="formlable1"><h1>?????</h1></legend>
                            <br />
                                                    <div align="right">
                        
                          <asp:PlaceHolder ID="phImages" runat="server">    </asp:PlaceHolder
                         </div>
                           
                           
                           </fieldset>
                           <tel:RadDataPager ID="rdpImages" runat="server" PageSize="2" Skin="Web20">
                                    <Fields>
                                        <tel:RadDataPagerSliderField />
                                    </Fields>
                                </tel:RadDataPager>
                        </LayoutTemplate>
                        <ItemTemplate>
                     <fieldset style="float: right; width: 170px;text-align:center;height:170px" >
                    <table >
                        <tr>
                            <td align="right" style="width: 25%;text-align:center">
                            <div></div>
                                <asp:Image ID="imgPropertyImage" runat="server" BorderColor="#0B7FAD" style="z-index:999;"
                                BorderWidth="2" Height="140" ImageUrl='<%# Eval("PropertyDetailsPath") %>'
                                Width="130px" />
                                 
                            </td>
                        </tr>
                        <tr>
                        <td>
                         <asp:LinkButton  CssClass="rbRemove" Text="."  CommandArgument='<%# Eval("PropertyDetailsID") %>' OnClick="DeleteImageVideo"
                         ForeColor="White" Width="20px" ID="lnkDeleteImage" runat="server" 
                           OnClientClick="javascript:return radconfirm('?? ??? ????? ?? ??? ???????',event,250,100,null,'????? ?????');"
              >  </asp:LinkButton>
                     
                        </td>
                        </tr>
                    </table>
                </fieldset>
                              
                        </ItemTemplate>
                    </tel:RadListView>
                    <asp:ObjectDataSource ID="odsGetPropertyImages" runat="server"
                        SelectMethod="GetPropertyDetail"
                        TypeName="GWERP.DataAccess.Aqar.Properties.PropertiesDetails">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="hfPropertyID" Name="propertyID"
                                PropertyName="Value" Type="Int32" />
                             <asp:Parameter DefaultValue="1" Name="detailType" Type="Int32" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                </td>
            </tr>
            <tr>
                <td>
                    <gw:CustomLabel ID="CustomLabel9" runat="server" MyEnabled="" MyVisible="" CssClass="formlable">????? ????? ???????</gw:CustomLabel>
                </td>
                <td>
                      
                </td>
                <td>
                      
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <tel:RadAsyncUpload ID="raUploadClips" MultipleFileSelection="Automatic" runat="server"
                        TargetFolder="~/PropertiesPath/Images/" Skin="Web20" AllowedFileExtensions="avi,3gp,wmv,mp4,flv"
                        OnClientValidationFailed="validationFailed">
                        <Localization Cancel="?????" Remove="???" Select="??????" />
                    </tel:RadAsyncUpload>
                </td>
            </tr>
            <tr>
                <td colspan="3">
        
                     
                            <tel:RadListView ID="lvVedios" runat="server" AllowPaging="true"  Visible="false"
                                datasourceid="odsGetPropertyVedios" EnableLinqExpressions="false"
                                ItemPlaceholderID="phVedios" PageSize="2" Skin="Web20">
                                <LayoutTemplate>
                                  <fieldset>
                        <legend  class="formlable1"><h1>???????</h1></legend>
                        <br />
                                    <div align="right">
                                        <asp:PlaceHolder ID="phVedios" runat="server"></asp:PlaceHolder>
                                    </div>
                                   
                                    </fieldset>
                                      <div align="center">
                                        <tel:RadDataPager ID="rdpVedios0" runat="server" PageSize="2" Skin="Web20">
                                            <Fields>
                                                <tel:RadDataPagerSliderField />
                                            </Fields>
                                        </tel:RadDataPager>
                                    </div>
                                </LayoutTemplate>
                                <ItemTemplate>
                                <fieldset style="float: right; width: 180px;text-align:center" >
           
                    <table >
                        <tr>
                            <td align="right" style="width: 25%;text-align:center">
                               <object ID="flowplayer0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" style=" width: 170px; height: 170px; 
                                                    border: none;" style="border: 2px solid #0B7FAD">
                                        <param name="movie" value="../flowplayer-3.2.5.swf" />
                                        <param name="wmode" value="transparent" />
                                        <param name="flashvars" wmode="transparent" value=<%#"config={'clip':{'url':'"+Eval("PropertyDetailsPath")+"', 'autoPlay':false, 'autoBuffering':true}}" %> />
                                    </object>
                            </td>
                        </tr>
                        <tr>
                        <td align="center">
                                   <asp:LinkButton  CssClass="rbRemove" Text="." ForeColor="White" Width="20px" OnClick="DeleteImageVideo"
                                   ID="lnkRemoveVedio" runat="server"  CommandArgument='<%# Eval("PropertyDetailsID") %>'
                                      OnClientClick="javascript:return radconfirm('?? ??? ????? ?? ??? ???????',event,250,100,null,'????? ?????');"
              >  </asp:LinkButton>
                              
                        </td>
                        </tr>
                    </table>
                </fieldset>
                                     
                                </ItemTemplate>
                            </tel:RadListView>
                            <asp:ObjectDataSource ID="odsGetPropertyVedios" runat="server"
                                SelectMethod="GetPropertyDetail"
                                TypeName="GWERP.DataAccess.Aqar.Properties.PropertiesDetails">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="hfPropertyID" Name="propertyID"
                                PropertyName="Value" Type="Int32" />
                                    <asp:Parameter DbType="Int32" DefaultValue="1" Name="detailType" />
                                </SelectParameters>
                            </asp:ObjectDataSource>
                     
                </td>
            </tr>
            <tr>
                <td align="center" colspan="3">
                    <table border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                            <table>
                            <tr>
                            <td>
                               <tel:RadButton runat="server" ID="rbSave"  ButtonType="LinkButton" Skin="Web20"
                       OnClick="lnkSave_Click"  Text="???"  CommandArgument="save" >
                            <Icon PrimaryIconCssClass="rbSave" PrimaryIconLeft="4" PrimaryIconTop="4" />
                          </tel:RadButton>
                            </td>
                            <td>
                               <tel:RadButton runat="server" ID="rbEdit"  ButtonType="LinkButton" Skin="Web20"
                         Text="?????" onclick="rbEdit_Click"  CommandArgument="edit" >
                            <Icon PrimaryIconCssClass="rbEdit" PrimaryIconLeft="4" PrimaryIconTop="4" />
                          </tel:RadButton>
                            </td>
                            <td>
                               <tel:RadButton runat="server" ID="rbDelete"  ButtonType="LinkButton" Skin="Web20"
                      Text="???" onclick="rbDelete_Click"  >
                            <Icon PrimaryIconCssClass="rbRemove" PrimaryIconLeft="4" PrimaryIconTop="4" />
                          </tel:RadButton>
                            </td>
                            <td>
                             
                            </td>
                             
                            </tr>
                            </table>
                            
                            
                                 
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    
                   <asp:HiddenField ID="hfPropertyID" runat="server" />
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <tel:RadAjaxLoadingPanel ID="ralpGvProperties" runat="server" Skin="Web20">
                    </tel:RadAjaxLoadingPanel>
                </td>
            </tr>
            </table>
            </tel:RadAjaxPanel>
            <table  width="100%">
            <tr>
                <td colspan="3">
                    <tel:RadGrid ID="rgProperties" runat="server" AutoGenerateColumns="False" AllowPaging="True"
                        PageSize="2" Skin="Web20" DataSourceID="ods_GetProperties"
                        Culture="ar-SA" AllowFilteringByColumn="True" AllowSorting="True"
                        GridLines="None" ShowGroupPanel="True" >
                        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True"
                            Selecting-AllowRowSelect="true" AllowDragToGroup="True">
                            <Selecting AllowRowSelect="True" />
                            <Selecting AllowRowSelect="True" />
                        </ClientSettings>
                        <ExportSettings FileName="Properites"  OpenInNewWindow="true"  IgnorePaging="true" ExportOnlyData="true" >
                        
                        </ExportSettings>
                           <GroupPanel Text="???? ??????? ???? ?????? ??????? ?????"  >
                           <PanelStyle Height="50px" Width="100%" />
                           </GroupPanel>
                        <MasterTableView CommandItemDisplay="Top" AllowPaging="True" DataSourceID="ods_GetProperties"
                         GroupLoadMode="Server" PageSize="3">
                       
                            <NestedViewTemplate>
                                <tel:RadTabStrip runat="server" ID="TabStip1" MultiPageID="mpImagesVedios" SelectedIndex="0"
                                    Skin="Web20">
                                    <Tabs>
                                        <tel:RadTab runat="server" Text="?????" PageViewID="pvImages">
                                        </tel:RadTab>
                                        <tel:RadTab runat="server" Text="???????" PageViewID="pvVedios">
                                        </tel:RadTab>
                                    </Tabs>
                                </tel:RadTabStrip>
                                <tel:RadMultiPage runat="server" ID="mpImagesVedios" SelectedIndex="0" RenderSelectedPageOnly="false">
                                    <tel:RadPageView runat="server" ID="pvImages" BorderColor="#00B6FF" BorderWidth="2"><asp:Label ID="lblPropertyID" Font-Bold="true" Font-Italic="true" Text='<%# Eval("PropertyID") %>'
                                            Visible="false" runat="server" /><tel:RadListView runat="server" ID="lvImages" Skin="Web20" AllowPaging="true" ItemPlaceholderID="phImages"
                                            PageSize="2" DataSourceID="odsGetPropertyImages" EnableLinqExpressions="false"><LayoutTemplate><div align="right"><asp:PlaceHolder ID="phImages" runat="server"></asp:PlaceHolder></div><div align="center"><tel:RadDataPager ID="rdpImages" runat="server" PageSize="2" Skin="Web20"><Fields><tel:RadDataPagerSliderField /></Fields></tel:RadDataPager></div></LayoutTemplate><ItemTemplate>  <asp:Image runat="server" ID="imgPropertyImage" BorderWidth="2" BorderColor="#0B7FAD"
                                                    ImageUrl='<%# Eval("PropertyDetailsPath") %>' Width="100" Height="120" /></ItemTemplate></tel:RadListView><asp:ObjectDataSource ID="odsGetPropertyImages" runat="server" SelectMethod="GetPropertyDetail"
                                            TypeName="GWERP.DataAccess.Aqar.Properties.PropertiesDetails"><SelectParameters><asp:ControlParameter ControlID="lblPropertyID" PropertyName="Text" Name="propertyID"
                                                    Type="Int32" /><asp:Parameter Name="detailType" DbType="Int32" DefaultValue="1" /></SelectParameters></asp:ObjectDataSource></tel:RadPageView>
                                    <tel:RadPageView runat="server" ID="pvVedios" BorderColor="#00B6FF" BorderWidth="2"><tel:RadListView runat="server" ID="lvVedios" Skin="Web20" AllowPaging="true" ItemPlaceholderID="phVedios"
                                            PageSize="2" DataSourceID="odsGetPropertyVedios" EnableLinqExpressions="false"><LayoutTemplate><div align="right"><asp:PlaceHolder ID="phVedios" runat="server"></asp:PlaceHolder></div><div align="center"><tel:RadDataPager ID="rdpVedios" runat="server" PageSize="2" Skin="Web20"><Fields><tel:RadDataPagerSliderField /></Fields></tel:RadDataPager></div></LayoutTemplate><ItemTemplate><object id="flowplayer" style="border: 2px solid #0B7FAD" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
                                                    style="z-index: 99; width: 200px; height: 250px; padding: 5px 5px; margin: 3px 3px 0px 1px;
                                                    border: none;"><param name="movie" value="../flowplayer-3.2.5.swf" /><param name="wmode" value="transparent" /><param name="flashvars" wmode="transparent" value=<%#"config={'clip':{'url':'"+Eval("PropertyDetailsPath")+"', 'autoPlay':false, 'autoBuffering':true}}" %> /></object></ItemTemplate></tel:RadListView><asp:ObjectDataSource ID="odsGetPropertyVedios" runat="server" SelectMethod="GetPropertyDetail"
                                            TypeName="GWERP.DataAccess.Aqar.Properties.PropertiesDetails"><SelectParameters><asp:ControlParameter ControlID="lblPropertyID" PropertyName="Text" Name="propertyID"
                                                    Type="Int32" /><asp:Parameter Name="detailType" DbType="Int32" DefaultValue="1" /></SelectParameters></asp:ObjectDataSource></tel:RadPageView>
                                </tel:RadMultiPage>
                            </NestedViewTemplate>
                         
                            <CommandItemSettings AddNewRecordText="????? ???? ????"
                                ExportToExcelText="????? ????" ExportToPdfText="????? pdf" RefreshText="?????"
                                ShowExportToExcelButton="True" ShowExportToPdfButton="True"
                                ShowExportToWordButton="True" />
                         
                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                                <HeaderStyle Width="20px" />
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                                <HeaderStyle Width="20px" />
                            </ExpandCollapseColumn>
                            <Columns >
                                <tel:GridBoundColumn DataField="PropertyID" FilterControlAltText="Filter indexID column"
                                    HeaderText="?????" UniqueName="indexID1" >
                                      
                                </tel:GridBoundColumn>
                                <tel:GridBoundColumn DataField="PropertyName" FilterControlAltText="Filter indexID column"
                                    HeaderText="??? ??????" UniqueName="indexID2">
                                      
                                </tel:GridBoundColumn>
                                <tel:GridBoundColumn DataField="PropertyPrice" FilterControlAltText="Filter indexID column"
                                    HeaderText="?????" UniqueName="indexID3">
                                      
                                </tel:GridBoundColumn>
                                <tel:GridBoundColumn DataField="propertyAddress" FilterControlAltText="Filter indexID column"
                                    HeaderText="???????" UniqueName="indexID">
                                      
                                </tel:GridBoundColumn>
                          <tel:GridTemplateColumn AllowFiltering="false" >
                          <ItemTemplate >
                          <tel:RadButton runat="server" ID="rbSelect"  ButtonType="LinkButton" Skin="Web20"
                          CommandName="select" CommandArgument='<%#  Eval("PropertyID") %>' Text="??????"
                                  OnClick="rbSelect_Click" >
                            <Icon PrimaryIconCssClass="rbOk" PrimaryIconLeft="4" PrimaryIconTop="4" />
                          </tel:RadButton>
                          </ItemTemplate>
                          <HeaderStyle Width="10px" />
                          </tel:GridTemplateColumn>
                            </Columns>
 
                            <CommandItemSettings AddNewRecordText="????? ???? ????" RefreshText="?????" ShowAddNewRecordButton="false"
                             ShowExportToPdfButton="true" ShowExportToExcelButton="true" 
                             ExportToPdfText="????? pdf" ExportToExcelText="????? ????" ShowExportToWordButton="true" ExportToWordText="????? ???? ???" />
                            <EditFormSettings>
                                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                </EditColumn>
                            </EditFormSettings>
                            <PagerStyle  Mode="NextPrevNumericAndAdvanced" />
                             
                        </MasterTableView>
                        
                        <FilterMenu EnableImageSprites="true" >
                     
                        </FilterMenu>
                        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                        </HeaderContextMenu>
                    </tel:RadGrid>
                    <asp:ObjectDataSource ID="ods_GetProperties" runat="server" SelectMethod="GetProperites"
                        TypeName="GWERP.DataAccess.Aqar.Properties.Properties"></asp:ObjectDataSource>
                </td>
            </tr>
            <tr>
                <td>
                      
                </td>
                <td>
                      
                </td>
                <td>
                      
                </td>
            </tr>
        </table>
    
      
      <script type="text/javascript" language="javascript">
          function requestStart(sender, args) {
              if (args.get_eventTarget().indexOf("ExportToPdfButton") > 0)
                  args.set_enableAjax(false);
              if (args.get_eventTarget().indexOf("ExportToWordButton") > 0)
                  args.set_enableAjax(false);
              if (args.get_eventTarget().indexOf("ExportToExcelButton") > 0)
                  args.set_enableAjax(false);
          }
          
    </script>
    <tel:RadAjaxManager runat="server"   ClientEvents-OnRequestStart="requestStart">
        <AjaxSettings>
            <tel:AjaxSetting AjaxControlID="rgProperties">
                <UpdatedControls>
                 <tel:AjaxUpdatedControl ControlID="rgProperties" LoadingPanelID="ralpMain"/>
                  <tel:AjaxUpdatedControl ControlID="rapMain" LoadingPanelID="ralpMain" /> 
                </UpdatedControls>
            </tel:AjaxSetting>
        </AjaxSettings>
    </tel:RadAjaxManager>
</asp:Content>

when i change the ajax setting to :

<tel:RadAjaxManager runat="server"   ClientEvents-OnRequestStart="requestStart">
        <AjaxSettings>
            <tel:AjaxSetting AjaxControlID="rgProperties">
                <UpdatedControls>
                 <tel:AjaxUpdatedControl ControlID="rgProperties" LoadingPanelID="ralpMain"/>
                </UpdatedControls>
            </tel:AjaxSetting>
        </AjaxSettings>
    </tel:RadAjaxManager>

every thing works fine .


Regards
Iana Tsolova
Telerik team
 answered on 01 Feb 2011
1 answer
103 views
Hi,  
       when I grouping rows in RADgrid, then alignment problem is there.
There is a big gap in displaying inside radGRID in grouping section.(BY default, means without applying any CSS).
how will I remove that extra space. Guide me.
       please see attached image file. 

    my radgrid is like as foll.
<telerik:RadGrid runat="server" AllowPaging="false" ID="grdGroups" OnNeedDataSource="grdGroups_NeedDataSource"
                        OnRowDrop="grdGroups_RowDrop" Width="100%" AllowMultiRowSelection="true" AutoGenerateColumns="false">
                        <MasterTableView DataKeyNames="colinfoid,groupid">
                            <GroupByExpressions>
                                <telerik:GridGroupByExpression>
                                    <SelectFields>
                                        <telerik:GridGroupByField FieldAlias="Group" FieldName="group_name" HeaderValueSeparator=" : ">
                                        </telerik:GridGroupByField>
                                    </SelectFields>
                                    <GroupByFields>
                                        <telerik:GridGroupByField FieldName="group_name" SortOrder="Ascending"></telerik:GridGroupByField>
                                    </GroupByFields>
                                </telerik:GridGroupByExpression>
                            </GroupByExpressions>
                            <Columns>
                                <telerik:GridBoundColumn DataField="colinfoid" Visible="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="group_name" Visible="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="fieldname" ItemStyle-Width="25px" HeaderStyle-Width="25px"
                                    ItemStyle-HorizontalAlign="Left">
                                </telerik:GridBoundColumn>
                            </Columns>
                            <NoRecordsTemplate>
                                <div style="height: 30px; cursor: pointer;">
                                    No items to view</div>
                            </NoRecordsTemplate>
                        </MasterTableView>
                        <ClientSettings AllowRowsDragDrop="True">
                            <Selecting AllowRowSelect="True" EnableDragToSelectRows="false" />
                            <ClientEvents OnRowDropping="onRowDropping" />
                        </ClientSettings>
                    </telerik:RadGrid>
Princy
Top achievements
Rank 2
 answered on 01 Feb 2011
1 answer
164 views
Hi All,

I'm an MVC, Razor and Telerik n00b but I'm just researching the pieces that will make up a new browser product we are developing and so far I'm leaning towards ASP.NET MVC and Telerik controls. Although I see there are MVC controls I will also need some of the controls from the AJAX library which from what I've read should be quite possible. However, I'm wondering if it's possible to consume the AJAX controls from Razor or is the far simpler option to use the "Webform" view engine instead, certainly all of telerik's examples of using the AJAX controls in MVC, that I've been able to find, utilize webforms (think they are all pre-Razor anyway).

Is this correct? Is it better to just avoid Razor in order to use the Telerik AJAX controls?

Thanks.

Alex Gyoshev
Telerik team
 answered on 01 Feb 2011
1 answer
116 views
Hello,

I am using a RadGrid that allows the user to click on a column header and sort that column.

However, I have a button on the form that serves as a "grid reset" - and when clicking this button, I want to undo the sorting.  So, if any column was sorted (either ascending or descending), I want to undo that sort.  How would I do this?

Thanks,
Dave
Shinu
Top achievements
Rank 2
 answered on 01 Feb 2011
1 answer
219 views
Hi,
I am using RadScheduler with RadCalendar.
we have some Schedules in Database.
I would like to highlight/bold those dates in my RadCalendar control, so user knows we have Schedules on that day.

how can i do this?

please help me..
Shinu
Top achievements
Rank 2
 answered on 01 Feb 2011
4 answers
185 views
Hi,

I'm experiencing a problem with the RadEditor when it comes to put it in a IFrame.

I have a kind of "Hello world" project. (Just to make sure the application that i want to use radeditor in is not the problem)

As long as the radeditor is directly in a page i can access to the value of the content on the postback of the page. (In the code behind)

But if i put the radeditor in a iFrame then, on the postback, the content property always return the content that the radeditor had on the page load even if i changed it.

Do i miss something?

Thank you
Daud
Top achievements
Rank 1
 answered on 01 Feb 2011
2 answers
186 views
I'm using Telerik:RadEditor. I've added a toolbar icon with this code:
telerik:EditorTool Name="ChangeMode" Text="View/Edit Source" />
and the javascript is:
Telerik.Web.UI.Editor.CommandList["ChangeMode"] = function(commandName, editor, args) {
            editor.set_mode(2);
        };
When I click on this icon, editor mode is changed to HTML.
The problem is that the toolbar becomes disable and I can't switch back to Design mode. Please tell me how can I prevent the toolbar to disable when in HTML mode. Please note I'm not using Design, HTML, Preview buttons under the editor's content area, but only the toolbar.
Daud
Top achievements
Rank 1
 answered on 01 Feb 2011
3 answers
225 views
Hi all,
I have combobox, it will be loaded after typing 3 letter. Search is done in db stored proc and Combobox is loaded, if results are found. 
And If we don't have searched item user can add the item.
I have multi column combo.
can that be done in one combobox or what do you suggest?
e.g. if i type Act it search all data with act and loads data. if we dont' have result allow to add the item!

Act
Post            Location     Manager
CP              Activa          George
Accountant  EgyptMain    Jemison

zun
Post            Location        Manager

     
Damodar
Top achievements
Rank 1
 answered on 01 Feb 2011
0 answers
117 views
I have a ComboBox set to Display None in code behind of page load of IsNotPostBack. When I click on another control, I am making this control visible from Jquery. I am using Set_visible(true) property. It works fine but When I submit the form for the server validation(post back) RadComboBox disappears. I am not setting this to none anywhere except in IsNotPostBack method. What could be the reason? Also How can I validate EmptyMessage with RequiredFieldValidator on the client side? Please let me know.

Thank you for any ideas..
nav100
Top achievements
Rank 1
 asked on 31 Jan 2011
3 answers
167 views
Hi

I have a rad grid with a template edit form. One of the fields on the form is an image but the image is not being displayed using the 'Bind' command.

Here is my edit form:

<FormTemplate>
    <table id="table1" cellspacing="2" cellpadding="1" width="100%" border="1" rules="none"
        style="border-collapse: collapse;">
        <tr class="EditFormHeader">
            <td colspan="2">
                <b>Product Details</b>
            </td>
        </tr>
        <tr>
            <td>
                <table id="table2" cellspacing="1" cellpadding="1" width="100%" border="0" class="module">
                    <tr>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td>
                            Product Name:
                        </td>
                        <td>
                            <asp:TextBox ID="TextBox7" runat="server" Width="90%" Text='<%# Bind( "ProductName" ) %>'></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Product Price:
                        </td>
                        <td>
                            <asp:TextBox ID="TextBox8" runat="server" Width="90%" Text='<%# Bind( "ProductPrice" ) %>'></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Category:
                        </td>
                        <td>
                            <asp:TextBox ID="TextBox9" Enabled="false" runat="server" Width="90%" Text='<%# Bind( "CategoryName" ) %>'></asp:TextBox>
                            <br />
                            <asp:DropDownList ID="DropDownList1" runat="server"
                                DataSourceID="SqlDataSource1" Width="90%"
                                DataTextField="CategoryName" AutoPostBack="true">
                            </asp:DropDownList>
                            <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                                ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString %>"
                                SelectCommand="Select Distinct CategoryName From Categories">
                            </asp:SqlDataSource>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Thumb Image:
                        </td>
                        <td>
                            <asp:TextBox ID="testImage" runat="server" Text='../images/<%# Bind( "ImageName" ) %>'></asp:TextBox>
                            <img id="ThumbImage1" runat="server" alt="" src='../images/<%# Bind( "ImageName" ) %>' />
                            <asp:Image ID="Image1" runat="server" AlternateText="Thumb" ImageUrl='../images/<%# Bind( "ImageName" ) %>'/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Main Image:
                        </td>
                        <td>
                            <img id="MainImage" alt="" runat="server" src='../images/<%# Bind( "ImageNameMain" ) %>' />
 
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <telerik:RadTabStrip runat="server" ID="RadTabStrip1" Orientation="HorizontalTop"
                                SelectedIndex="0" MultiPageID="RadMultiPage1" Width="400px">
                                <Tabs>
                                    <telerik:RadTab Text="Ingredients">
                                    </telerik:RadTab>
                                    <telerik:RadTab Text="Description">
                                    </telerik:RadTab>
                                    <telerik:RadTab Text="Overview">
                                    </telerik:RadTab>
                                    <telerik:RadTab Text="Directions">
                                    </telerik:RadTab>
                                </Tabs>   
                            </telerik:RadTabStrip>
                            <telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0"
                                Height="218px" Width="400px" CssClass="multiPage">
                                <telerik:RadPageView runat="server" ID="RadPageView1" CssClass="pageView">
                                    <asp:TextBox ID="TextBox13" runat="server" TextMode="MultiLine" Rows="5" Columns="40" Width="370px"
                                        Text='<%# Bind( "ProductIngredients" ) %>'></asp:TextBox>
                                </telerik:RadPageView>  
                                <telerik:RadPageView runat="server" ID="RadPageView2" CssClass="pageView">
                                    <asp:TextBox ID="TextBox10" runat="server" TextMode="MultiLine" Rows="5" Columns="40"
                                        Text='<%# Bind( "ProductDescription") %>'></asp:TextBox>
                                </telerik:RadPageView>
                                <telerik:RadPageView runat="server" ID="RadPageView3" CssClass="pageView">
                                    <asp:TextBox ID="TextBox11" runat="server" TextMode="MultiLine" Rows="5" Columns="40"
                                        Text='<%# Bind( "ProductOverview" ) %>'></asp:TextBox>
                                </telerik:RadPageView>
                                <telerik:RadPageView runat="server" ID="RadPageView4" CssClass="pageView">
                                    <asp:TextBox ID="TextBox12" runat="server" TextMode="MultiLine" Rows="5" Columns="40"
                                        Text='<%# Bind( "ProductDirections" ) %>'></asp:TextBox>
                                </telerik:RadPageView>                                                                                     
                            </telerik:RadMultiPage>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td align="right" colspan="2">
                <asp:Button ID="btUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' runat="server"
                    CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'/>
                  
                <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="false"
                    CommandName="Cancel" />
            </td>
        </tr>   
    </table>                           
</FormTemplate>

I have added two image types (HTML & ASP.net) and a textbox to see the result of the bind, here are what i see

Textbox testImage = ../images/<%# Bind( "ImageName" ) %>
HTML ThumbImage1 = " id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl19_ThumbImage1" />

ASP Image1 = Alt text is shown 'Thumb'

How do i render an image in the edit form?
Antony
Top achievements
Rank 1
 answered on 31 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?