Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
328 views

Using the classic rad grid I was able to get a cell's value by doing the following:
VB code:

Public

Function GetDataTable(ByVal query As String) As DataTable

Dim connection2 As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\ENG101Exam.accdb;Persist" & _

" Security Info=True")

Dim adapter2 As New OleDbDataAdapter

adapter2.SelectCommand =

New OleDbCommand(query, connection2)

Dim table2 As New DataTable

connection2.Open()

Try

adapter2.Fill(table2)

Finally

connection2.Close()

End Try

Return table2

End Function

 

Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.WebControls.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource

RadGrid1.DataSource = GetDataTable(

"SELECT Teacher FROM [Teacher List] ")

End Sub

I can't get these routines to work using the grid for ASP.NET AJAX. 
Can anyone help?

Thanks,
Tony

Shinu
Top achievements
Rank 2
 answered on 30 Jun 2008
1 answer
178 views
Hi, I am from Thailand. I tried your demo on this web where it show how date picker can do globalization. When I changed culture to Thai, the year correctly showed Buddhist year (2551). However when I tried to do date pick the year reverted back to Christian year. Is there a way to fix this?

Thanks,
Vlad
Telerik team
 answered on 30 Jun 2008
1 answer
87 views
Hi,

Looking for some simple support on the webgrid: http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Programming/WebGrid/DefaultCS.aspx

I'm trying to use this as a demo on my existing DB. I've used my own columns (all gridbound) and the demo EditFormSettings.

The grid displays the values fine (SELECT works) but when I try to edit or delete. I just get the following error:
Incorrect syntax near '?'.

I'm pretty sure there is a easy fix to this. can someone tell me what mistake I'm making. Thanks!

Here is a snippet of my datasourcecode:

       <asp:SqlDataSource ID="SessionDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MarinaConnectionString %>"
            ProviderName="System.Data.SqlClient"
            SelectCommand="SELECT OrderID, FirstName, LastName, Email, Phone, BabyName, BabyAge, DiaperSize, Notes FROM [Orders]"
            DeleteCommand="DELETE FROM [Orders] WHERE [OrderID] = ?"
            InsertCommand="INSERT INTO Orders(FirstName, LastName, Email, Phone, BabyName, BabyAge, DiaperSize, Notes) VALUES (?, ?, ?, ?, ?, ?, ?, ?)"
            UpdateCommand="UPDATE [Orders] SET [FirstName] = ?, [LastName] = ?, [Email] = ?, [Phone] = ?, [BabyName] = ?, [BabyAge] = ?, [DiaperSize], [Notes] = ? WHERE [OrderID] = ?"
            OldValuesParameterFormatString="original_{0}"
            ConflictDetection="CompareAllValues">
            <DeleteParameters>
                <asp:Parameter Name="OrderID" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="FirstName" Type="String" />
                <asp:Parameter Name="LastName" Type="String" />
                <asp:Parameter Name="Email" Type="String" />
                <asp:Parameter Name="Phone" Type="String" />
                <asp:Parameter Name="BabyName" Type="String" />
                <asp:Parameter Name="BabyAge" Type="String" />
                <asp:Parameter Name="DiaperSize" Type="String" />
                <asp:Parameter Name="Notes" Type="String" />
                <asp:Parameter Name="OrderID" Type="Int32" />
            </UpdateParameters>
...


Daniel
Telerik team
 answered on 30 Jun 2008
1 answer
144 views
I am having trouble with adding the Ajax manager to my Grid when everything (Grid, DataSource, RadScriptManager) are in the content form, where there are no controls listed in the Configure Ajax window.  However if I do the exact same thing in a non MasterPage it works fine.  Ideally I'd like to have the RadScriptManager in my MasterPage....but for now I'd be happy if it worked at all in the content page.  Here's my content page and masterpage....when I choose Configure Ajax Manager from design mode...there are no controls listed. My masterpage is configured as default.

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Sample.master.cs" Inherits="SGWWeb.MasterPages.Sample" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server">  
    <title>Untitled Page</title> 
    <asp:ContentPlaceHolder ID="head" runat="server">  
    </asp:ContentPlaceHolder> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">  
          
        </asp:ContentPlaceHolder> 
    </div> 
    </form> 
</body> 
</html> 
 


<%@ Page Language="C#" MasterPageFile="~/MasterPages/Sample.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="MyWeb.WebForm1" Title="Untitled Page" %> 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">  
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    </telerik:RadScriptManager> 
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"   
        OldValuesParameterFormatString="original_{0}"   
        SelectMethod="GetHomepageProducts"   
        TypeName="MyApp.BLL.Items.HomepageItemsManager"></asp:ObjectDataSource> 
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True"   
        DataSourceID="ObjectDataSource1" GridLines="None">  
<MasterTableView datasourceid="ObjectDataSource1">  
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
</MasterTableView> 
    </telerik:RadGrid> 
&nbsp;<telerik:RadAjaxManager runat="server">  
    </telerik:RadAjaxManager> 
</asp:Content> 
 
Konstantin Petkov
Telerik team
 answered on 30 Jun 2008
1 answer
83 views
What is the control library version that first included the drag and drop?

I have dropped the demo code onto an aspx page but cannot access the Row Drop attributes for the Grid or Client Settings:

Validation (ASP.Net): Attribute 'AllowRowsDragDrop' is not a valid attribute of element 'ClientSettings'.

Validation (ASP.Net): Attribute 'OnRowDropping' is not a valid attribute of element 'ClientEvents'

OnRowDrop is also not a valid attribute of RadGrid...

I tried version 5.1.3.0 of the RadGrid.Net2.dll and version 2007.3.1425.20 of the Telerik.Web.UI.dll, but cannot get them to use the Drop and Drag attributes.

Thanks,
Derrick
Pavel
Telerik team
 answered on 30 Jun 2008
8 answers
293 views
Is it possible to set the RadSlider VALUE server side?  I know how to do it client-side but I have a need to do it via server.

THANKS
Patrick
Top achievements
Rank 1
 answered on 30 Jun 2008
2 answers
124 views
How to Close a Tab on client side event while click the close icon in the tab?
Just like Firfox does. We click the close icon in  the tab, the tab will be closed by javascript.

I can add a close icon into tab with imgurl property. but i can fire the icon click event in the client.

Can you give me some advise about how to achive this?

Best regards.

John Liu
Paul
Telerik team
 answered on 30 Jun 2008
8 answers
181 views
Is there a way, we can change only one column of a grid in edit mode. By using ClientAPI, onColumnClick, we can get the index of the column being clicked, is there a way using that Index, I can make that column editable?

Thanks.
Konstantin Petkov
Telerik team
 answered on 30 Jun 2008
1 answer
166 views
I downloaded an ajax version of ASP.NET Trial Version as i want to have trial run of Ajax version before buying registered version..

I made an asp.net project in VS2008, i added a Telerik.web.UI.dll as a reference to my project, using this i got all telerrik ajax controls in my toolbox, i tried RADGRID , i binded it to a datatable i specified skin as Office2007

But grid is not displaying look and feel of Telerik....


what am i missing???? Please help 
Shinu
Top achievements
Rank 2
 answered on 30 Jun 2008
1 answer
131 views
Hi there,

I just ported my old telerik controls (classic) to the new prometheus controls and discovered a weird behaviour with the new RadMenu when it's viewed on firefox 3 browser. I'm not sure if this happens on IE 7 as well because I havent tested it on IE yet.

Firefox allows you to open a page in a new tab by right-clicking on the link or clicking on the mouse's middle scroll button on a link. I noticed that if you have a RadMenu on a webpage and you left-click on one of the menu items, it will redirect you to the link but if you try to open the menu items on a new tab, it will load the same page on the new tab. This happens on all nodes in the RadMenu control whenever you try to load a page on a new tab.

For e.g.,

You have a simple web application that contains 1 master page file and 2 aspx files which are referenced to the master page file. and the RadMenu sits on the masterpage file.The nodes in the menu and referenced to the 2 aspx files such that the Menu displays 2 links.

WebForm1 | WebForm2

If you turn on debugging and is currently on WebForm1.aspx, it will show the RadMenu in the manner shown above..

now if you left-click on the WebForm2 link, The masterpage's page_load gets called first followed by the RadMenu's ItemClick event which redirects you current tab to WebForm2. This is followed by the loading of WebForm2's page_load and everything's fine and dandy...

However, if you did a right-click on the WebForm2 link and selected "Open Link in new tab" Or "Open Link in new Window" option. It will straight away just go to WebForm1's page_load instead of going to RadMenu's ItemClick event. As a result, you end up opening the same page on a new browser/page.

This means that the RadMenu's ItemClicked and OnItemClicked events dont get fired at all when you try to use the "Open link in a new Window" or "Open link in a new tab" feature...

Do you have any workarounds to this problem?








Jonathan
Top achievements
Rank 2
 answered on 30 Jun 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?