I am receiving records from a web service that are displayed in a
RadGrid. I need to mark certain records as selected based on the
existence of matching records in a database table. The records in
the table were produced from the web service at one time and contain
only matching records. The records are matched via the "AccDesc"
DataKeyNames. Any suggestions would be appreciated.
<radControls:RadGrid ID="AccessoriesGrd" runat="server" Width="780px" AllowMultiRowSelection="true" Visible="true"> <MasterTableView DataKeyNames="AccDesc, Retail, TradeIn" AutoGenerateColumns="false" EnableHeaderContextMenu="true"> <Columns> <radControls:GridClientSelectColumn HeaderText="Select" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="55px" UniqueName="SelectColumn" ItemStyle-VerticalAlign="Top" /> <radControls:GridBoundColumn DataField="AccDesc" AllowSorting="true" HeaderText="Description" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="350px" ItemStyle-VerticalAlign="Top" /> <radControls:GridTemplateColumn HeaderText="Retail" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="55px" SortExpression="Retail" ItemStyle-HorizontalAlign="Right" ItemStyle-VerticalAlign="Top"> <ItemTemplate> <%#Consumers.StandardFunctions.FormatCurrency(Eval("Retail"))%> </ItemTemplate> </radControls:GridTemplateColumn> <radControls:GridTemplateColumn HeaderText="Trade-In" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="55px" SortExpression="TradeIn" ItemStyle-HorizontalAlign="Right" ItemStyle-VerticalAlign="Top"> <ItemTemplate> <%#Consumers.StandardFunctions.FormatCurrency(Eval("TradeIn"))%> </ItemTemplate> </radControls:GridTemplateColumn> </Columns> </MasterTableView> <ClientSettings EnableRowHoverStyle="true" AllowColumnsReorder="true" ColumnsReorderMethod="Reorder"> <Selecting AllowRowSelect="true" /> </ClientSettings> </radControls:RadGrid>
Hello
I'm having a bit of a problem with an AJAX update from within a RadTree, I've had a look around the forums and can't find a proper answer to my prolem although I have stumbled across a couple of posts that given me a couple of ideas. Anyway, here is my problem, I hope someone can help.
What I'm effectivly trying to do is differentiate between clicking on a node in a RadTreeVew (to update the main panel) and dragging a node in a RadTreeView (to update a graph) during an AJAX update, unfortuately it seems that the EventName property of the RadAjaxManager AjaxSetting does not work as mentioned in this post (http://www.telerik.com/community/forums/aspnet-ajax/ajax/ajax-manager-event-filter.aspx) reading on on this post Nicholas Walker (10th post) suggests a workaround in which you use the OnClientNodeClicked and OnClientNodeDropped properties of the RadTreeView to fire some JavaScript which modifies(?) the RadAjaxManager. I can get one or the other to work and I'm not really sure how the JavaScript fits in, ideally for one or the other, I want to disable the opposite manager update but I'm not sure how this could be done with javascript, or whether it could be done at all.
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="radTree" EventName="onTreeViewNodeDrop"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="divWatchMeasureChart1" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="lbMeasureName" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="radTree" EventName="onTreeViewNodeClicked"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="mainRight" LoadingPanelID="RadAjaxLoadingPanel1"/> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <div class="treeHolder"> <telerik:RadTreeView ID="radTree" Runat="server" Skin="Windows7" onclientnodedatabound="OnClientNodeDataBoundHandler" onnodeclick="radTree_NodeClick" EnableDragAndDrop="True" OnNodeDrop="RadTreeView1_NodeDrop" OnClientNodeClicked="onTreeViewNodeClicked" OnClientNodeDropped="onTreeViewNodeDrop"> <WebServiceSettings Path="~\Controls\WebController.aspx" Method="GetChildren" /> </telerik:RadTreeView> <div> <telerik:RadScriptBlock runat="server"> <script language="javascript"> function OnClientNodeDataBoundHandler(sender, e) { var node = e.get_node(); node.set_toolTip(node.get_attributes().getAttribute("ToolTip")); } function onTreeViewNodeClicked(sender, eventArgs) { var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>"); if (ajaxManager != null) { var settings = ajaxManager.get_ajaxSettings(); for (setting in settings) { var initiatingControl = settings[setting].InitControlID; var controls = settings[setting].UpdatedControls; if (initiatingControl == '<%= radTree.ClientID %>') { for (control in controls) { if (controls[control].ControlID != "mainRight") {//disable all other updates perhaps? } } } } ajaxManager.set_ajaxSettings(settings); } } function onTreeViewNodeDrop(sender, eventArgs) { var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>"); if (ajaxManager != null) { var settings = ajaxManager.get_ajaxSettings(); for (setting in settings) { var initiatingControl = settings[setting].InitControlID; var controls = settings[setting].UpdatedControls; if (initiatingControl == '<%= radTree.ClientID %>') { for (control in controls) { if (controls[control].ControlID != "CntrlViewOverview1_divWatchMeasureChart1") {//disable all other updates perhaps? } } } } ajaxManager.set_ajaxSettings(settings); } } </script> </telerik:RadScriptBlock>
Hi,
I am using Radgrid to display/retrieve/update data in an Access database.
Although I am able to delete and addd records, I cannot update.
There are no errors being displayed....I update the field(s) and press OK to accept the changes...but the new changes are not saved..the listing shows again the previous record/field...
As I said, no errors are shown after pressing ok.
Here is the code below (not all, but I assume is where the problem might be?)
II have not changed or added anything manual to the code.
Thank you in advance
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Registro_Planchas_be.mdb" DeleteCommand="DELETE FROM [Tabla Registro Planchas] WHERE [Nº] = ?" InsertCommand="INSERT INTO [Tabla Registro Planchas] ([FECHA], [REFERENCIA], [PROVEEDOR], [REFERENCIA PEDIDO], [MAQUINA], [MARCA], [MEDIDA], [TROQUEL], [DISEÑO]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)" SelectCommand="SELECT * FROM [Tabla Registro Planchas]" UpdateCommand="UPDATE [Tabla Registro Planchas] SET [FECHA] = ?, [REFERENCIA] = ?, [PROVEEDOR] = ?, [REFERENCIA PEDIDO] = ?, [MAQUINA] = ?, [MARCA] = ?, [MEDIDA] = ?, [TROQUEL] = ?, [DISEÑO] = ? WHERE [Nº] = ?"> <DeleteParameters> <asp:Parameter Name="Nº" Type="Int32" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="FECHA" Type="DateTime" /> <asp:Parameter Name="REFERENCIA" Type="String" /> <asp:Parameter Name="PROVEEDOR" Type="String" /> <asp:Parameter Name="REFERENCIA_PEDIDO" Type="String" /> <asp:Parameter Name="MAQUINA" Type="String" /> <asp:Parameter Name="MARCA" Type="String" /> <asp:Parameter Name="MEDIDA" Type="String" /> <asp:Parameter Name="TROQUEL" Type="String" /> <asp:Parameter Name="DISEÑO" Type="String" /> </UpdateParameters> <br> </UpdateParameters><script type="text/javascript"> //<![CDATA[ function mergeFileUploaded(sender, args) { <%= Page.GetPostBackEventReference(LB_doUploadData)%>; } function mergeUplOK(sender, eventArgs) { $telerik.$(".mergeuplErr") .html(''); } function mergeValidationFailed(sender, eventArgs) { $telerik.$(".mergeuplErr") .html('<%= GetTranslation("invalidmergefile") %>'); sender.deleteFileInputAt(0); } //]]> </script> <telerik:RadAsyncUpload ID="RadAsyncUpload_Data" HttpHandlerUrl="~/uploadHandler.ashx" runat="server" MaxFileInputsCount="1" AllowedFileExtensions="csv,xls,xlsx,tsv" OnClientFilesUploaded="mergeFileUploaded" OnClientFileUploading="mergeUplOK" OnClientValidationFailed="mergeValidationFailed" /> <div id="uplErr" class="mergeuplErr"></div>
Telerik.OpenAccess, Version=2010.2.714.1, Culture=neutral, PublicKeyToken=7CE17EEAF1D59342"
Telerik.OpenAccess, Version=2010.3.1125.1, Culture=neutral, PublicKeyToken=7CE17EEAF1D59342"/>erver Error in '/Telerik.CarRental.Web' Application.Could
not load file or assembly 'Telerik.OpenAccess, Version=2010.2.714.1,
Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' or one of its
dependencies. The located assembly's manifest definition does not match
the assembly reference. (Exception from HRESULT: 0x80131040)Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the
error and where it originated in the code.Exception
Details: System.IO.FileLoadException: Could not load file or assembly
'Telerik.OpenAccess, Version=2010.2.714.1, Culture=neutral,
PublicKeyToken=7ce17eeaf1d59342' or one of its dependencies. The located
assembly's manifest definition does not match the assembly reference.
(Exception from HRESULT: 0x80131040)Source Error:Line 190: cmbCarsSearch.Items.Add(new RadComboBoxItem(make, make));Line 191: }Line 192: }Line 193:Line 194: protected void cmbCarsSearch_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)Source
File: c:\Users\Stuart Cook\Documents\Visual Studio
2010\WebSites\CarRental-Origional\CarRental\Telerik.CarRental.Web\DailySchedule.aspx.cs
Line: 192Assembly
Load Trace: The following information can be helpful to determine why
the assembly 'Telerik.OpenAccess, Version=2010.2.714.1, Culture=neutral,
PublicKeyToken=7ce17eeaf1d59342' could not be loaded.