Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
73 views
Hi,
    I am facing issue with updating the radgrid using PopUp edit FormTemplate.
  •   I have used NHibernate datasource<(IList<>) to bind the Radgrid.       
  •   I have used formtemplate in radgrid to update or insert using radcontext menu.

    
DataSource=

 

 

 

 

IQuery query = session.GetNamedQuery("sp_Sample");

 

 

 

 

IList<Sample>result = query.List<

 

Sample>();

How do i get the updated values from the PopUp screen in RadGrid1_ItemCommand()

 

  • when i am clicking the update button in the popup screen RadGrid1_ItemCommand() method
    is firing but it has only old values.
  • if i will get the updated values, then it will be helpful to update() the database.
  • Please help in this.

 

 

I have used below code to get the updated values but it is not working.

 

 

 

 

if (e.CommandName == RadGrid.UpdateCommandName)

 

 

{

 

 

 

 

GridEditableItem editedItem = e.Item as GridEditableItem;

 

 

Hashtable

 

 

 

newValues = new Hashtable();

 

 

newValues[

 

 

"Name"] = (editedItem.FindControl("txtName") as TextBox).Text;

 

 

newValues[

 

 

"Address1"] = (editedItem.FindControl("txtAddress1") as TextBox).Text;

 

 

newValues[

 

 

"Address2"] = (editedItem.FindControl("txtAddress2") as TextBox).Text;

 

 

newValues[

 

 

"Address3"] = (editedItem.FindControl("txtAddress3") as TextBox).Text;

 

 

newValues[

 

 

"PhoneNumber"] = (editedItem.FindControl("txtPhoneNumber") as TextBox).Text;

 

 

}


RadGrid.aspx Code:

 

 

<

 

 

 

telerik:RadPanelBar ID="RadPanelBar2" runat="server" OnClientItemCollapse="OnClientItemCollapsed" Skin="Telerik" Width="100%" >

 

 

 

 

 

 

 

 

 

 

 

 

<Items >

 

 

 

 

 

 

 

 

 

 

 

 

<telerik:RadPanelItem Text="RadGrid With Data" runat="server">

 

 

 

 

 

 

 

 

 

 

 

 

<Items>

 

 

 

 

 

 

 

 

 

 

 

 

<telerik:RadPanelItem runat="server" />

 

 

 

 

 

 

 

 

 

 

 

 

</Items>

 

 

 

 

 

 

 

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

 

 

 

 

 

 

<!-- Empty template to suppress global template -->

 

 

 

 

 

 

 

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

 

 

 

 

 

 

 

</telerik:RadPanelItem>

 

 

 

 

 

 

 

 

 

 

</Items >

 

 

 

 

 

 

 

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

 

 

 

 

 

 

<div class="module" style="width:100%;float:left">

 

 

 

 

 

 

 

 

 

 

 

 

<br />

 

 

<

 

 

 

asp:Panel ID="GridViewPanel1" runat="server">

 

 

 

 

 

 

 

 

 

 

 

 

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

 

 

 

 

 

 

 

 

 

 

 

 

AllowPaging="True" AllowSorting="True" GridLines="None"

 

 

 

 

 

 

 

 

 

 

 

 

ShowGroupPanel="True" Skin="Hay" AllowAutomaticUpdates="true" OnItemCommand="RadGrid1_ItemCommand" >

 

 

 

 

 

 

 

 

 

 

 

 

<MasterTableView EditMode="PopUp" >

 

 

 

 

 

 

 

 

 

 

 

 

<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>

 

 

 

 

 

 

 

 

 

 

 

 

<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"><HeaderStyle Width="20px"></HeaderStyle></RowIndicatorColumn>

 

 

 

 

 

 

 

 

 

 

 

 

<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"><HeaderStyle Width="20px"></HeaderStyle></ExpandCollapseColumn>

 

 

 

 

 

 

 

 

 

 

 

 

<EditFormSettings EditFormType="AutoGenerated" >

 

 

 

 

 

 

 

 

 

 

 

 

<FormTemplate>

 

 

 

 

 

 

 

 

 

 

 

 

<table id="Table1" cellspacing="1" cellpadding="1" width="250" border="0">

 

 

 

 

 

 

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

 

 

Name:

 

 

 

 

</td>

 

 

 

 

 

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

 

 

 

 

 

<asp:TextBox ID="txtName" Text='<%# Bind( "Name") %>' runat="server">

 

 

 

 

 

 

 

 

 

 

 

 

</asp:TextBox>

 

 

 

 

 

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

 

 

Number:

 

 

 

 

</td>

 

 

 

 

 

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

 

 

 

 

 

<asp:TextBox ID="txtClientNumber" Text='<%# Bind( "Number") %>' runat="server">

 

 

 

 

 

 

 

 

 

 

 

 

</asp:TextBox>

 

 

 

 

 

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

 

 

Address1:

 

 

 

 

</td>

 

 

 

 

 

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

 

 

 

 

 

<asp:TextBox ID="txtAddress1" Text='<%# Bind( "Address1") %>' runat="server">

 

 

 

 

 

 

 

 

 

 

 

 

</asp:TextBox>

 

 

 

 

 

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

 

 

 

 

 

 

<td colspan="2">

 

 

 

 

 

 

 

 

 

 

 

 

<hr />

 

 

 

 

 

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

 

 

Address2:

 

 

 

 

</td>

 

 

 

 

 

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

 

 

 

 

 

<asp:TextBox ID="txtAddress2" runat="server" Text='<%# Bind( "Address2" ) %>'>

 

 

 

 

 

 

 

 

 

 

 

 

</asp:TextBox>

 

 

 

 

 

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

 

 

Address3:

 

 

 

 

</td>

 

 

 

 

 

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

 

 

 

 

 

<asp:TextBox ID="txtAddress3" runat="server" Text='<%# Bind( "Address3") %>'>

 

 

 

 

 

 

 

 

 

 

 

 

</asp:TextBox>

 

 

 

 

 

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

 

 

PhoneNumber:

 

 

 

 

</td>

 

 

 

 

 

 

 

 

 

 

 

 

<td>

 

 

 

 

 

 

 

 

 

 

 

 

<asp:TextBox ID="txtPhoneNumber" runat="server" Text='<%# Bind( "PhoneNumber") %>'>

 

 

 

 

 

 

 

 

 

 

 

 

</asp:TextBox>

 

 

 

 

 

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

 

 

 

 

 

</table>

 

 

 

 

 

 

 

 

 

 

 

 

<table style="width: 100%">

 

 

 

 

 

 

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

 

 

 

 

 

 

<td align="right" colspan="2">

 

 

 

 

 

 

 

 

 

 

 

 

<asp:Button ID="Button1" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'

 

 

 

 

 

 

 

 

 

 

 

 

runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' OnClick="Button1_Click">

 

 

 

 

 

</asp:Button>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">

 

 

 

 

 

 

 

 

 

 

 

 

</asp:Button>

 

 

 

 

 

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

 

 

 

 

 

</table>

 

 

 

 

 

 

 

 

 

 

 

 

</FormTemplate>

 

 

 

 

 

 

 

 

 

 

 

 

<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>

 

 

 

 

 

 

 

 

 

 

 

 

</EditFormSettings>

 

 

 

 

 

 

 

 

 

 

 

 

<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>

 

 

 

 

 

 

 

 

 

 

 

 

<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>

 

 

 

 

 

 

 

 

 

 

 

 

<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>

 

 

 

 

 

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

 

 

 

 

 

 

<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" Visible="false" />

 

 

 

 

 

 

 

 

 

 

 

 

</Columns>

 

 

 

 

 

 

 

 

 

 

 

 

<EditFormSettings>

 

 

 

 

 

 

 

 

 

 

 

 

<EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>

 

 

 

 

 

 

 

 

 

 

 

 

</EditFormSettings>

 

 

 

 

 

 

 

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

 

 

 

 

 

 

 

<ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True">

 

 

 

 

 

 

 

 

 

 

 

 

<ClientEvents OnRowContextMenu="RowContextMenu"></ClientEvents>

 

 

 

 

 

 

 

 

 

 

 

 

<Selecting AllowRowSelect="true" />

 

 

 

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" />

 

 

 

 

 

 

 

 

 

 

 

 

</ClientSettings>

 

 

 

 

 

 

 

 

 

 

 

<%

 

 

--<FilterMenu EnableImageSprites="False"></FilterMenu>--%>

 

 

 

 

 

 

 

 

<

 

 

 

HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>

 

 

 

 

 

 

 

 

 

</

 

 

 

telerik:RadGrid>

 

 

 

 

 

 

 

 

 

 

 

 

</asp:Panel>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<telerik:RadContextMenu ID="RadMenu1" runat="server" OnItemClick="RadMenu1_ItemClick" EnableRoundedCorners="true" EnableShadows="true">

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<Items>

 

 

 

 

 

 

 

 

 

 

 

 

<telerik:RadMenuItem Text="Add" />

 

 

 

 

 

 

 

 

 

 

 

 

<telerik:RadMenuItem Text="Edit" />

 

 

 

 

 

 

 

 

 

 

 

 

<telerik:RadMenuItem Text="Delete" />

 

 

 

 

 

 

 

 

 

 

 

 

</Items>

 

 

 

 

 

 

 

 

 

 

 

 

</telerik:RadContextMenu>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

</div>

 

 

 

 

 

 

 

 

 

 

 

 

</ItemTemplate>

 

 

</

 

 

 

telerik:RadPanelBar>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Princy
Top achievements
Rank 2
 answered on 29 Mar 2011
5 answers
94 views
Hi

I was using telerik:RadChart in my page. I have got the graph very well implemented in the page but cannot get any type of property or function to get the mouse Rollover event as shown in the given site :

http://data.cnbc.com/quotes/GOOG/tab/2

Please help me how to get the mouse movement in the line graph to implement it in my telerik chart.

thanks
Suraj



Giuseppe
Telerik team
 answered on 29 Mar 2011
3 answers
160 views
Hello,

In our web application we use several schedulers using advanced edit form displayed in a radwindow.  This is working well for us.  Because of the limitations of the multi-day view splitting appointments between days and irregular width I had to create a custom control for one of our pages.  I am using the same radwindow edit forms that we use on scheduler. 

Functionally everything works great but the rad window edit forms lack styling.

Is there an easy way to include the CSS used by scheduler and the advanced insert/edit modal templates when scheduler is not present on the page?
Peter
Telerik team
 answered on 29 Mar 2011
1 answer
71 views
Hi all,
I am using the Telerik controls for my application. We reference it in our project and have been using the default controls, styles till now. I need to modify the Skins, Default styles to custom stuff. I need to know where to find the RadControls Folder, as I need to copy the base css files from there and include in my custom Css/Skins folder.
There is no RadControls directory created when we launch our application (from IIS or ASP.NEt development server on Visual Studio 2010). I need to know where to download these base css files from.
Currently when I run the application from the ASP.NET development server I see that the default css classes are being fetched from WebResource_1.axd?d=asasdsad.... some file of this sort.
Please help with this issue. This is very urgent.

Thanks,
Vandana
Sebastian
Telerik team
 answered on 29 Mar 2011
3 answers
255 views
I get the following error but i can not seem to find anybody else who has on the forum. Thanks

adUpload Ajax callback error. Source url returned invalid content:



<html>

    <head>

        <title>The resource cannot be found.</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>



    <body bgcolor="white">



            <span><H1>Server Error in '/newcart' Application.<hr width=100% size=1 color=silver></H1>



            <h2> <i>The resource cannot be found.</i> </h2></span>



            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">



            <b> Description: </b>HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. &nbsp;Please review the following URL and make sure that it is spelled correctly.

            <br><br>



            <b> Requested URL: </b>/newcart/Admin/Telerik.RadUploadProgressHandler.ashx<br><br>



            <hr width=100% size=1 color=silver>



            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053



            </font>



    </body>

</html>

<!--

[HttpException]: The file '/newcart/Admin/Telerik.RadUploadProgressHandler.ashx' does not exist.

   at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)

   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)

   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

Peter Filipov
Telerik team
 answered on 29 Mar 2011
1 answer
83 views
Hi,

we have been using telerik controls throught different webparts during 6 or 7 months. At the beggining we were using the dll version 2010.2.713.35, but for some reasons some projects we had to use 2010.2.826.35 (the radgrid didn´t work properly on a toolpart).

We have realized now that in some pcs with versions 2010.2.713.35 and  2010.2.826.35 installed. Controls like RadComboBox, stop working. Throwing exceptions like Telerik.Web.UI.RadComboBox is not compatible with control type Telerik.Web.UI.

All the controls are used in Visual WebParts with the <%@ Register directive with the specified version some ones uses 713 others 826. 


What shall we do? Is it possible to have different projects using different dlls on the same pc?

Thanks

Apologize for my English skills, i will be happy to answer any questions.
Helen
Telerik team
 answered on 29 Mar 2011
2 answers
91 views
Hi,

I'am using this exemple :
http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/checkboxes/defaultcs.aspx

Each node is equal to a text, but to insert it in the database i need to pass an ID.
So is there a way to get ID from all the checkbox that are seleted?
By ID i mean the id that i passing from the database

Ex : If the user click the node
École Donat-Robichaud then this school as an unique id from the database = 1
École Secondaire-Assomption same thing id = 19

I hope i explan my self correctly

Here how i create my treeView :


<telerik:RadTreeView runat="server" ID="RadTreeView1" 
               DataSourceID="SqlRegionEcole" DataFieldID="id" 
               DataFieldParentID="parentId" CheckBoxes="true" TriStateCheckBoxes="true"  CheckChildNodes="true"
               DataValueField="Luc" Skin="Sunset">
                   <DataBindings>
                       <telerik:RadTreeNodeBinding TextField="Name" />
                         
                   </DataBindings>
              </telerik:RadTreeView>

With this i code i get all the name that are selected :
But i don't want the FullPath i need the ID that is selected

Protected Sub ShowCheckedNodes(ByVal treeView As RadTreeView)
        Dim message As String = String.Empty
        Dim nodeCollection As IList(Of RadTreeNode) = treeView.CheckedNodes
        For Each node As RadTreeNode In nodeCollection
                  message += node.FullPath + "<br/>"
        Next
        Label4.Text = message
    End Sub
  
  
  
    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
        ShowCheckedNodes(RadTreeView1)
    End Sub

Tks
Luc
Veronica
Telerik team
 answered on 29 Mar 2011
1 answer
113 views
Hi
I'm totally new to Telerik.
Is there a combobox component that populate results into a selectbox?
And not only that. I want a text field that I can search a term there, and the results populates into a selectbox, which I can work with.

Was I clear enough?

Thank you.
Shlomi.
Princy
Top achievements
Rank 2
 answered on 29 Mar 2011
2 answers
99 views
I have using RadAjaxManager.Redirect("url") to redirect a page within the server.  This is work well in Window 7 and Windows server 2008.  When I try to run this code in window 2003, it not work.  I change it to response.redirect, it work in window 2003 but not work in windows 7 and window server 2008.  Any idea why this happen and how i can solve it? Please help.
Derick
Top achievements
Rank 1
 answered on 29 Mar 2011
1 answer
74 views

Hi there –

 

This is Carlos Mendoza from Accenture, US.

I’m not sure if this is also the same email address for requesting technical assistance so I’d appreciate it if you just forward to the correct group if so.

Our project purchased Telerik’s HTML editor product, and implemented it on our corporate web site, www.accenture.com

That web site is built on MOSS 2007. We have another web site, microsite.accenture.com, built in MOSS 2007 too, in which Telerik’s HTML editor is implemented in there too.

On the Microsite web site, Telerik’s toolbar is able to retrieve the site’s alternate CSS file (.css), and display the CSS classes defined inside the CSS file on the Style dropdown of Telerik’s toolbar, so they can be used by our end users. See screenshot below, or see my attached images.

 

On the www.accenture.com web site, this is not happening on Telerik’s Style dropdown section.

Our clients would like the same behavior of the Style dropdown as the Microsites web site. Is there any configuration or line of code we should implement on the www.accenture.com platform so additional CSS classes defined on the site’s alternate CSS would appear on the Style dropdown of Telerik’s HTML editor toolbar?

 

Please advise.

 

I’d be glad to hop into a call if needed. Just tell me the telephone number of your technical support team.

 

Looking forward to hearing from you!

Rumen
Telerik team
 answered on 29 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?