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

Hi,

I have rad drop down tree as below. When I click on one node in the drop down tree I am able to see the parent node getting expanded by using below client side script and if i click on other node the script executes and node gets expanded. Is there a way I can collapse all other nodes except the current clicked node?

 

<telerik:RadDropDownTree RenderMode="Lightweight" ID="OfficeDropDownPrgFilter" runat="server" Width="500px"
                   ExpandNodeOnSingleClick="true"  AutoPostBack="true" OnClientEntryAdded="OnClientEntryAdded1" 
                    EnableFiltering="true" OnEntryAdded="OfficeDropDownPrgFilter_EntryAdded"> 
                    <DropDownSettings OpenDropDownOnLoad="true"  />
                    <FilterSettings Highlight="Matches" Filter="Contains" EmptyMessage="Type here to filter" />
                </telerik:RadDropDownTree> 

 

function OnClientEntryAdded1(sender, args) {
var path = args.get_entry()._fullPath;
var item = sender.get_embeddedTree().findNodeByText(args.get_entry().get_text());
var node = item.get_parent();
node.expand();
}

 

 

 

Pradeep
Top achievements
Rank 1
 answered on 03 Apr 2018
1 answer
128 views

Hi Team,

 

It's possible for one node to report to two upper node? Please have a view on attachment below.  

Peter Milchev
Telerik team
 answered on 03 Apr 2018
0 answers
193 views

when  I try to edit image it opens up the editor but if i try it twice or thrice it may or may not open up some time and gives internal error 500 as the error message in the console

message in the console:

Name Protocol Method Result Content type Received Time Initiator
Telerik.Web.UI.WebResource.axd?type=iec&pr=c&key=6a215ad6-1b37-4bda-b9cb-5ab18f91d6fa HTTPS GET 500 text/html 75 B 1.27 s image

message inside the error log:

Exception type: ArgumentNullException Exception message: Buffer cannot be null. Parameter name: buffer at System.IO.MemoryStream..ctor(Byte[] buffer, Boolean writable) at Telerik.Web.UI.ImageEditor.CacheImageProvider.ToEditableImage(Byte[] data) at Telerik.Web.UI.ImageEditor.ImageEditorCacheHandler.ProcessRequest(HttpContext context) at Telerik.Web.UI.HandlerRouter.ProcessHandler(String handlerKey, HttpContext context) at Telerik.Web.UI.WebResource.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Request information: Request URL: Telerik.Web.UI.WebResource.axd?type=iec&pr=c&key=a5509632-316e-4698-a362-c73bc42df739 Request path: Telerik.Web.UI.WebResource.axd 

Anuja
Top achievements
Rank 1
 asked on 03 Apr 2018
13 answers
303 views
I am using Sitefinity 4.4, so this is occuring in whichever version of Telerik controls that is contained with that version.

I am trying to set our custom toolbar for the RadEditor, which worked in previous versions.

I tried to specify a virtual path in the ToolsFile like so:

protected void Page_Load(object sender, EventArgs e)
    {
        reditDescription.ToolsFile = "~/WebsiteTemplates/ControlTemplates/EditorToolsFile.xml";


And I got this little error:

Could not find a part of the path 'C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\~\WebsiteTemplates\ControlTemplates\EditorToolsFile.xml'.

It appends a physical path for some strange reason.

So I thought maybe I'd try a physical path since it wants to append a physical path:

protected void Page_Load(object sender, EventArgs e)
    {
        reditDescription.ToolsFile = Server.MapPath("~/WebsiteTemplates/ControlTemplates/EditorToolsFile.xml");

When I do this I get this error:

'C:/Program Files/Telerik/Sitefinity 4.4/Projects/HealthChoiceWebsite/WebsiteTemplates/ControlTemplates/EditorToolsFile.xml' is a physical path, but a virtual path was expected.

These errors are both contradictory to each other. Making this feature completely useless. Which one do I use? Physical path, or virtual?

What is the solution to this?
Rumen
Telerik team
 answered on 02 Apr 2018
7 answers
445 views

Hello,

 

I have an ASP.NET site that has been working fine and continues to work for IE 10 users. But for those who have upgraded to IE 11, the RadAsyncUpload no longer works when trying to drag/drop files. For example, if an IE 10 user has Windows Explorer and the webpage side-by-side, they can easily drag a file from Windows Explorer, and successfully drop the file onto the RadAsyncUpload control (the control is embedded in the webpage). By if an IE 11 user attempts to do the same thing, nothing happens. When they drop the file on the RadAsyncUpload control, it just disappears.

 

My webpage is basically modeled after the AsyncUpload - File Upload with Drag and Drop demo. This has been working for months. The problem began with some of the IE 10 users upgraded to IE 11. The IE 11 users can click the [Select] button and successfully add files to upload, but they can no longer drag/drop.

 

I’ve tried to resolve this issue by applying the suggestions in the following Internet resources, but have had no luck resolving the problem:

 

    How to get your ASP.NET application working in IE11

    http://blogs.telerik.com/aspnet-ajax/posts/13-12-19/how-to-get-your-asp.net-application-working-in-ie11

 

    ASP.NET Doesn’t Detect IE11

    http://jwcooney.com/2013/11/19/asp-net-doesnt-detect-ie11/

 

Does anyone know how I can resolve this issue I am having with IE 11?

 

Thank you

Marin Bratanov
Telerik team
 answered on 02 Apr 2018
5 answers
286 views
hi,

i am using telerik version 2011.3.1305.40. I do not have drag and drop functionality for RadAsyncUpload control.
1) I want to know from which version this functionality added.
2) Do i have this functionality in my current version(2011.3.1305.40)


Thanks
Raju
Marin Bratanov
Telerik team
 answered on 02 Apr 2018
6 answers
127 views

Im trying to get raddiagram to show data, but im having some issues - i think i followed the demo example to the letter, but it still gives me javascript error.

This is the error:

Unhandled exception at line 6, column 54851 in http://dev.ordering.pki.dsv.com/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:59e0a739-153b-40bd-883f-4e212fc43305:ea597d4b:b25378d2;Telerik.Web.UI:en-US:6d514cb9-2739-4112-a25a-b6efc64747ba:16e4e7cd:f7645509:22a6274a:ed16cbdc:88144a7a:24ee1bba:e330518b:33715776:1e771326:8e6f0d33:1f3a7489:6a6d718d:58366029:c128760b:f46195d3:6b3f73b3:4cd1fec6:c442ac3f:d944e0f6:ec7335e:69667591:a4c22f0d:c4143936:5f88c545:71188da4:75e7b247:77613e24:f0c58c30:9b7cc2d2:8d1fecce:2f872eeb:16dc2978:16717659:b3614701:73564252

0x800a01bd - JavaScript runtime error: Object doesn't support this action

 

The line, is this one (beautified, for readability:

     $create(Telerik.Web.UI.RadDiagram, {
        "_options": {
            "connections": [{
                "from": {
                    "shapeId": "General"
                },
                "to": {
                    "shapeId": "Draft"
                }
            }, {
                "from": {
                    "shapeId": "Draft"
                },
                "to": {
                    "shapeId": "Submitted"
                }
            }, {
                "from": {
                    "shapeId": "Submitted"
                },
                "to": {
                    "shapeId": "Notification"
                }
            }, {
                "from": {
                    "shapeId": "Notification"
                },
                "to": {
                    "shapeId": "Approved"
                }
            }, {
                "from": {
                    "shapeId": "Notification"
                },
                "to": {
                    "shapeId": "AutoApproved"
                }
            }, {
                "from": {
                    "shapeId": "Approved"
                },
                "to": {
                    "shapeId": "KeyGeneration"
                }
            }, {
                "from": {
                    "shapeId": "AutoApproved"
                },
                "to": {
                    "shapeId": "KeyGeneration"
                }
            }, {
                "from": {
                    "shapeId": "KeyGeneration"
                },
                "to": {
                    "shapeId": "KeyGenSkipped"
                }
            }, {
                "from": {
                    "shapeId": "KeyGeneration"
                },
                "to": {
                    "shapeId": "KeyGenerated"
                }
            }, {
                "from": {
                    "shapeId": "KeyGenSkipped"
                },
                "to": {
                    "shapeId": "CSRInfoCreated"
                }
            }, {
                "from": {
                    "shapeId": "KeyGenerated"
                },
                "to": {
                    "shapeId": "CSRInfoCreated"
                }
            }, {
                "from": {
                    "shapeId": "Approved"
                },
                "to": {
                    "shapeId": "SigningCertRetrieved"
                }
            }, {
                "from": {
                    "shapeId": "AutoApproved"
                },
                "to": {
                    "shapeId": "SigningCertRetrieved"
                }
            }, {
                "from": {
                    "shapeId": "SigningCertRetrieved"
                },
                "to": {
                    "shapeId": "SigningExecuting"
                }
            }, {
                "from": {
                    "shapeId": "SigningExecuting"
                },
                "to": {
                    "shapeId": "SigningExecuted"
                }
            }, {
                "from": {
                    "shapeId": "SigningExecuted"
                },
                "to": {
                    "shapeId": "CodeSignCompleted"
                }
            }, {
                "from": {
                    "shapeId": "CSRInfoCreated"
                },
                "to": {
                    "shapeId": "ExternalPki"
                }
            }, {
                "from": {
                    "shapeId": "CSRInfoCreated"
                },
                "to": {
                    "shapeId": "InternalPki"
                }
            }, {
                "from": {
                    "shapeId": "ExternalPki"
                },
                "to": {
                    "shapeId": "CertReqRecieved"
                }
            }, {
                "from": {
                    "shapeId": "InternalPki"
                },
                "to": {
                    "shapeId": "CertReqRecieved"
                }
            }, {
                "from": {
                    "shapeId": "CertReqRecieved"
                },
                "to": {
                    "shapeId": "CertReqExecuted"
                }
            }, {
                "from": {
                    "shapeId": "CertReqExecuted"
                },
                "to": {
                    "shapeId": "CertExtracted"
                }
            }, {
                "from": {
                    "shapeId": "CertExtracted"
                },
                "to": {
                    "shapeId": "CertCompleted"
                }
            }, {
                "from": {
                    "shapeId": "CertCompleted"
                },
                "to": {
                    "shapeId": "CertSend"
                }
            }, {
                "from": {
                    "shapeId": "CodeSignCompleted"
                },
                "to": {
                    "shapeId": "OrderCompleted"
                }
            }, {
                "from": {
                    "shapeId": "CertSend"
                },
                "to": {
                    "shapeId": "OrderCompleted"
                }
            }],
            "shapes": [{
                "id": "General",
                "content": {
                    "color": "#fff",
                    "text": "General Info"
                }
            }, {
                "id": "Draft",
                "content": {
                    "color": "#fff",
                    "text": "Draft"
                }
            }, {
                "id": "Submitted",
                "content": {
                    "color": "#fff",
                    "text": "Submitted"
                }
            }, {
                "id": "Notification",
                "content": {
                    "color": "#fff",
                    "text": "Notification"
                }
            }, {
                "id": "Approved",
                "content": {
                    "color": "#fff",
                    "text": "Approved"
                }
            }, {
                "id": "AutoApproved",
                "content": {
                    "color": "#fff",
                    "text": "Auto Approved"
                }
            }, {
                "id": "KeyGeneration",
                "content": {
                    "color": "#fff",
                    "text": "Key Generation"
                }
            }, {
                "id": "KeyGenSkipped",
                "content": {
                    "color": "#fff",
                    "text": "Keygen skipped"
                }
            }, {
                "id": "KeyGenerated",
                "content": {
                    "color": "#fff",
                    "text": "Key generated"
                }
            }, {
                "id": "CSRInfoCreated",
                "content": {
                    "color": "#fff",
                    "text": "CSR Info Created"
                }
            }, {
                "id": "SigningCertRetrieved",
                "content": {
                    "color": "#fff",
                    "text": "Signing Cert retrieved"
                }
            }, {
                "id": "SigningExecuting",
                "content": {
                    "color": "#fff",
                    "text": "Exec Signing process"
                }
            }, {
                "id": "SigningExecuted",
                "content": {
                    "color": "#fff",
                    "text": "Code Signed"
                }
            }, {
                "id": "CodeSignCompleted",
                "content": {
                    "color": "#fff",
                    "text": "Code Signing Completed"
                }
            }, {
                "id": "ExternalPki",
                "content": {
                    "color": "#fff",
                    "text": "External PKI"
                }
            }, {
                "id": "InternalPki",
                "content": {
                    "color": "#fff",
                    "text": "Internal PKI"
                }
            }, {
                "id": "CertReqRecieved",
                "content": {
                    "color": "#fff",
                    "text": "certReq Received"
                }
            }, {
                "id": "CertReqExecuted",
                "content": {
                    "color": "#fff",
                    "text": "certReq Executed"
                }
            }, {
                "id": "CertExtracted",
                "content": {
                    "color": "#fff",
                    "text": "Cert Extracted"
                }
            }, {
                "id": "CertCompleted",
                "content": {
                    "color": "#fff",
                    "text": "Cert Completed"
                }
            }, {
                "id": "CertSend",
                "content": {
                    "color": "#fff",
                    "text": "Cert Send"
                }
            }, {
                "id": "CertRejectedByPki",
                "content": {
                    "color": "#fff",
                    "text": "Cert Rejected by PKI"
                }
            }, {
                "id": "CertRejectedByAdmin",
                "content": {
                    "color": "#fff",
                    "text": "Cert Rejected by Admin"
                }
            }, {
                "id": "OrderDeleted",
                "content": {
                    "color": "#fff",
                    "text": "Order Deleted"
                }
            }, {
                "id": "OrderCompleted",
                "content": {
                    "color": "#fff",
                    "text": "Order Completed"
                }
            }]
        },
        "clientStateFieldID": "diagramStatus_ClientState"
    }, {
        "load": diagram_load
    }, null, $get("diagramStatus"));

 

 

The asp page looks like this:

<telerik:RadDiagram runat="server" ID="diagramStatus" EnableViewState="false" OnItemDataBound="diagramStatus_ItemDataBound" Width="600">
    <ClientEvents OnLoad="diagram_load" />
    <BindingSettings>
        <ConnectionSettings DataFromShapeIdField="FromStatusID" DataToShapeIdField="ToStatusID" />
        <ShapeSettings DataIdField="StatusID" DataContentTextField="StatusText"/>
    </BindingSettings>
</telerik:RadDiagram>

Using service binding on pageload:

                diagramStatus.DataSource = DBClient.GetStatusList()
                diagramStatus.ConnectionDataSource = DBClient.GetStatusListTree()
                diagramStatus.DataBind()

and the ItemDataBound item is directly copied from the demo:

    Protected Sub diagramStatus_ItemDataBound(sender As Object, e As Telerik.Web.UI.Diagram.DiagramItemDataBoundEventArgs)
        Dim shape = TryCast(e.Item, Telerik.Web.UI.DiagramShape)

        If shape IsNot Nothing Then
            shape.ContentSettings.Color = "#fff"
        End If
    End Sub

Same with the javascript file:

(function (global, undefined) {
    function diagram_load(sender) {
        var diagram = sender.get_kendoWidget();

        diagram.layout({
            type: "tree",
            subtype: "down",
            roots: [diagram.getShapeById("General")],
            verticalSeparation: 20,
            horizontalSeparation: 30
        });
    }
    global.diagram_load = diagram_load;
})(window);

 

Can somebody see what im missing?  everything seems to look good as far as i can tell - but im by no means a javascript expect (infact i hate it ;)

 

/Stig

Vessy
Telerik team
 answered on 02 Apr 2018
3 answers
992 views
I set the MinValue to 1 and the DecimalDigits to zero as shown below.

<telerik:RadNumericTextBox ID="MyRadNumericTextBox"
    runat="server" 
    Culture="English (United States)"
    DbValueFactor="1" 
    MinValue="1" >
    <NumberFormat ZeroPattern="n" DecimalDigits="0"></NumberFormat>
</telerik:RadNumericTextBox>

Steps to Reproduce
Add the above RadNumericTextBox to a Webform.
Enter a negative number. When the RadNumericTextbox loses focus, the value entered automatically changes to the value set as MinValue.
Enter a number containing a decimal. When the RadNumericTextbox  loses focus, the value entered is automatically rounded to the nearest integer.

I did find the following java snippets in your forum that are suppose to block the user from entering decimals and negative symbols  but neither of them work on both IE and FireFox. 

Delete key does not work in FireFox

<script type="text/javascript">
    function OnKeyPress(sender, args) {
        var keycode = args.get_keyCode()
        if (keycode == 46 || keycode == 110) {
            args.set_cancel(true);
        }
    }
</script>

The following was posted as a solution to work with both FireFox and IE but I can't get it to work on either
<script type="text/javascript">
    function OnKeyPress(sender, args) {
        var keyCharCode = args.get_domEvent().rawEvent.charCode;
 
        if (keyCharCode == sender.get_numberFormat().DecimalSeparator.charCodeAt() || keyCharCode == sender.get_numberFormat().NegativeSign.charCodeAt()) {
            args.set_cancel(true);
        }
    }
</script>

I would like to find a solution to this, but in the mean time I am swapping the RadNumericTextBox for the RadMaskedTextBox.

Marin Bratanov
Telerik team
 answered on 02 Apr 2018
1 answer
236 views

Hi,

I have a problem with this scenario. I need to update a radcombox after a postback of another radcombox inside a raddataform. But it doesn't work. An example is something like that:

 

<telerik:RadAjaxManager ID="radAjaxManager" runat="server" OnAjaxSettingCreating="radAjaxManager_AjaxSettingCreating">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="cmb1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="cmb2" LoadingPanelID="radAjaxLoadingPanel"/>
                      </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

        <telerik:RadAjaxLoadingPanel ID="radAjaxLoadingPanel" Runat="server" IsSticky="false" />

<telerik:RadDataForm runat="server" ID="radDataForm">
            <LayoutTemplate>
                <div id="itemPlaceholder" runat="server">
                </div>
            </LayoutTemplate>
            
            <InsertItemTemplate>

<telerik:RadPageLayout ID="radPageLayout" runat="server" GridType="Fluid" ShowGrid="true" HtmlTag="None">
                    <telerik:LayoutRow RowType="Container">
                        <Columns>
                            <telerik:LayoutColumn Span="3" HiddenMd="true" HiddenSm="true" HiddenXs="true">
                            
                            </telerik:LayoutColumn> 

                            <telerik:CompositeLayoutColumn Span="6" SpanMd="12" SpanXs="12" SpanSm="12">
                                <Content>
                                    <telerik:RadTabStrip ID="radTabStrip" runat="server" MultiPageID="radMultiPage" Align="Justify" 
                                                         ReorderTabsOnSelect="false" ScrollChildren="true" ScrollButtonsPosition="Middle" PerTabScrolling="true">
                                        <Tabs>
                                            <telerik:RadTab Text="Tab1" PageViewID="pg1" Selected="true" />
                                            <telerik:RadTab Text="Tab2" PageViewID="pg2" />
                                           
                                        </Tabs>
                                    </telerik:RadTabStrip>
                                
                                    <telerik:RadMultiPage ID="radMultiPage" runat="server" SelectedIndex="0">
                                        <telerik:RadPageView ID="pg1" runat="server">
                                            <telerik:RadPageLayout ID="radPageLayoutGenerici" runat="server" GridType="Fluid" ShowGrid="true" HtmlTag="None">
                                                <Rows>
                                                    <telerik:LayoutRow RowType="Container">

                                                           <Content>
                                                            <telerik:RadComboBox ID="cmb1" runat="server"  AutoPostBack="true">
                                                                <DefaultItem Text="" Value="" />
                                                            </telerik:RadComboBox>
                                                           
                                                        </Content>
                                                    </telerik:LayoutRow>  
                                                    <telerik:LayoutRow RowType="Container">
                                                        <Content>
                                                            <telerik:RadComboBox ID="cmb2" runat="server"  DataTextField="Descrizione">
                                                                <DefaultItem Text="" Value="" />
                                                            </telerik:RadComboBox>
                                                        </Content>
                                                    </telerik:LayoutRow>  
                                                </Rows>
                                            </telerik:RadPageLayout>
                                            
                                        </telerik:RadPageView>

                                        <telerik:RadPageView ID="pg2" runat="server">

                                        </telerik:RadPageView>
                                
                                    </telerik:RadMultiPage>

                                   
                                </Content>      
                            </telerik:CompositeLayoutColumn>

                            <telerik:LayoutColumn Span="3" HiddenMd="true" HiddenSm="true" HiddenXs="true">
                                
                            </telerik:LayoutColumn> 

                        
                        </Columns>
                    </telerik:LayoutRow>    
                </telerik:RadPageLayout>
            </InsertItemTemplate>


I Just semplify my code only for example. Someone can help me?

Marin Bratanov
Telerik team
 answered on 02 Apr 2018
5 answers
226 views

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"  />
    
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
     <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <div id="divfilter">
    <br />
    <uc1:UCDynamicFilter runat="server" ID="UCDynamicFilter1" />
    <br />
    </div>
    <div id="divdatatable" runat="server" >
        <br />
        <telerik:RadButton ID="RadBtnExp"  runat="server" Text="导出"   OnClick="RadBtnExp_Click"></telerik:RadButton>
        <telerik:RadGrid ID="RadGrid1" runat="server" ClientSettings-Scrolling-AllowScroll="true"   AllowSorting="True"  Height="500px"
            AllowPaging="true" AllowAutomaticUpdates="True" PageSize="30"  DataSourceID="SqlDataSourceSales"   AutoGenerateColumns="false" >
            <ClientSettings>
                <Scrolling SaveScrollPosition="true" UseStaticHeaders="true" />
            </ClientSettings>
            <MasterTableView EditMode="EditForms" DataKeyNames="ID"  >          
                    <Columns>
                        <telerik:GridEditCommandColumn   UniqueName="EditCommandColumn"  ></telerik:GridEditCommandColumn>
                        <telerik:GridBoundColumn UniqueName="ID" DataField="ID" HeaderText="ID" DataType="System.Int32"    ></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn UniqueName="年月" DataField ="年月" HeaderText="年月"  ></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn UniqueName ="公司名称" DataField="公司名称"  HeaderText="地区公司名称" ></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn UniqueName ="营销中心项目名称和分期" DataField ="营销中心项目名称和分期" HeaderText="营销项目名称和分期" ></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn UniqueName="楼栋" DataField="楼栋" HeaderText ="楼栋"  ></telerik:GridBoundColumn>         
                        <telerik:GridBoundColumn UniqueName="物业类型"  DataField="物业类型" HeaderText="物业类型"  ForceExtractValue="Always" DataType="System.Char" ></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn UniqueName ="面积" DataField ="面积" HeaderText="面积(签订-退订)" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign ="Right"  ></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn UniqueName="金额" DataField ="金额" HeaderText="金额(签订-退订)"  DataFormatString="{0:N2}" ItemStyle-HorizontalAlign ="Right" ></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn UniqueName="征收方式" DataField="征收方式" HeaderText="征收方式"  ForceExtractValue="Always" DataType="System.Char" ></telerik:GridBoundColumn>
                    </Columns>
                <EditFormSettings  EditFormType="Template">
                    <FormTemplate>
                        <table id="Table1"  style="border-collapse: collapse;">
                            <tr>
                                <td>地区公司名称</td>
                                <td><asp:Label ID="LabelCompany" runat="server" Text ='<%# Bind("公司名称")%>'></asp:Label>  </td>
                            </tr>
                            <tr>
                                <td>营销中心项目名称和分期</td>
                                <td><asp:Label ID="LableProjectFq" runat="server" Text ='<%# Bind("营销中心项目名称和分期")%>'></asp:Label>  </td>
                            </tr>
                            <tr>
                                <td>楼栋</td>
                                <td><asp:Label ID="LabelBuilding" runat="server" Text ='<%# Bind("楼栋")%>'></asp:Label>  </td>
                            </tr>
                            <tr>
                                <td>物业类型</td>
                                <td>
                                    
                                    <asp:DropDownList ID="RDDListbulidingtype" runat="server" DataSourceID="SqlDataSource1" DataValueField="物业类型" DataTextField="物业类型"  SelectedValue ='<%# Bind("物业类型") %>'  AppendDataBoundItems="true" >
                                         <asp:ListItem Selected="True" Text="Select" Value="">
                                         </asp:ListItem>
                                    </asp:DropDownList>
                                    
                                </td>
                            </tr>
                            <tr>
                                <td> 面积</td>
                                <td><asp:Label  ID="LabelArea" runat="server" Text ='<%# Bind("面积")%>'></asp:Label>  </td>
                            </tr>
                            <tr>
                                 <td> 金额</td>
                                <td><asp:Label ID="LabelAmount" runat="server" Text ='<%# Bind("金额")%>'></asp:Label>  </td>
                            </tr>
                            <tr>
                                 <td>征收方式</td>
                                <td>
                                    <telerik:RadDropDownList ID="RDDListTax" runat="server"  SelectedValue='<%# Bind("征收方式") %>' >
                                    <Items >
                                        <telerik:DropDownListItem Text="" Value="" />
                                        <telerik:DropDownListItem Text="简易" Value="简易" />
                                        <telerik:DropDownListItem Text="一般" Value="一般" />
                                    </Items>
                                    </telerik:RadDropDownList>
                                </td>
                               </tr>
                            <tr>
                                 <td><asp:Button ID="btnUpdate" runat="server" Text="保存" CommandName="Update" /></td>
                                 <td><asp:Button ID="btnCancel" runat="server" Text="取消" CommandName="Cancel" /></td>
                            </tr>
                        </table>
                    </FormTemplate>
                </EditFormSettings>
            </MasterTableView>
          </telerik:RadGrid>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"  ConnectionString="<%$ ConnectionStrings:myAsystemstring %>" SelectCommand="select * from 物业类型表"  ></asp:SqlDataSource>
    <asp:SqlDataSource  ID="SqlDataSourceSales" runat="server"  ConnectionString="<%$ ConnectionStrings:myAsystemstring %>"
        SelectCommand="select * from 销售导入表 where 公司名称=@mycompanyname and 项目名称=@myprojectname and 年月=@mydate "
        UpdateCommand ="update 销售导入表 set 物业类型=@buildingtype, 征收方式=@taxtype where ID=@ID">
             <SelectParameters  >
                 <asp:ControlParameter Name="mycompanyname" ControlID="UCDynamicFilter1" PropertyName="FilterCompanyName" />
                 <asp:ControlParameter Name="myprojectname" ControlID="UCDynamicFilter1" PropertyName="FilterProjectName" />
                 <asp:ControlParameter Name="mydate" ControlID="UCDynamicFilter1" PropertyName="FliterDate" />
             </SelectParameters>
            <UpdateParameters >
                <asp:Parameter Name="buildingtype"  Type="String"  />
                <asp:Parameter Name="taxtype" Type="String" />
                <asp:Parameter Name="ID"  Type="Int32" />
            </UpdateParameters>
    </asp:SqlDataSource>

</asp:Content>

There is not code behind revalent to this part. The RadScriptManager is in the Master Page.
I'm using Radgrid Control EditformTemplate and auto update (in my case I don't need delete, insert and data validation ), but update button doesn't work. I have check another thread work which says by using "Update" to commandName of button attribution it will be automatic. and demo which shows code behind only for validation.  The update action now seems only return null values to database. 

 

Thanks in advance.

Eyup
Telerik team
 answered on 02 Apr 2018
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?