Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
330 views
I have a custom grid column like following:

<telerik:GridTemplateColumn HeaderText="Image Url">
        <ItemTemplate>        
        <asp:Label ID="lblImageUrl" runat="server" Text='<%# Shorten(Eval("imageURL"), 20) %>'></asp:Label>
        </ItemTemplate>
        <EditItemTemplate>
        <asp:TextBox ID="txtImageUrl" runat="server" Text='<%# Eval("imageURL") %>'></asp:TextBox>
        </EditItemTemplate>
        </telerik:GridTemplateColumn>

what i need is to display an image when i either click select link or when i mouse over certain row. How do i get the lblImageUrl Text and from within which event handler?

Also i was wondering how do i update/edit record if i don't use SqlDataSource object .. actually i have a class with some methods to bind the grid :
Public Shared Function GetItems() As DataTable
            Dim con As SqlConnection = New SqlConnection("connString")
            Dim table As New DataTable
            Dim reader As SqlDataReader
            Dim cmd As New SqlCommand
            cmd.CommandText = "GetItems"
            cmd.CommandType = CommandType.StoredProcedure
            cmd.Connection = con
            cmd.Parameters.Add("@param", SqlDbType.Int).Value = objectName
            ' execute the stored procedure and return the results
            Try
                cmd.Connection.Open()
                reader = cmd.ExecuteReader()
                table.Load(reader)
                reader.Close()
            Catch ex As Exception
                ' ToDo: catch the error if any
            Finally
                cmd.Connection.Close()
            End Try
            Return table
        End Function

then

Me.RadGridControl.DataSource = ClassName.GetItems
Me.RadGridControl.DataBind()

ANd it works fine. Means, so far so good. But now i am struggling with the update command.

Thank you



El
Top achievements
Rank 1
 answered on 07 Jan 2009
5 answers
162 views
We're launching a radwindow that then plays a flash video (.flv). It works well but when the window is closed the audio from the video continues to play until the page is changed. We're trying to narrow down whether it is a RadWindow, Explorer browser issue (doesn't happen in Firefox) or a flash related issue.

You can view the issue by going to:
https://www.gracieuniversity.com/LC/testcenter_view.aspx?c=63QJ4TGT7X&n=28&t=1
and clicking on any of the links that say "watch demo" and then closing the radwindow while the video is playing. You'll notice that the audio continues to play.

Is there a way to force the "x" out of a RadWindow to kill any elements that are playing in the window?

thanks,
Jeff
Jeff
Top achievements
Rank 1
 answered on 07 Jan 2009
0 answers
109 views
Hi,

I am trying to access a JavaScript function in a repeater, but I get a runtime error of "The name 'RadDatePicker1' does not exist in the current context".  This normally works when the raddatepicker is outside a repeater.  Are there any links to samples?  Thanks.

Example:

<

rada:RadScriptBlock ID="RadCodeBlock1" runat="server">

 

 

    <script type="text/javascript">

 

 

        function ToggleFirstPopup()

 

        {

            $find(

"<%= RadDatePicker1.ClientID %>").showPopup();

 

        }

        </

script>

 

</

rada:RadScriptBlock>

 




 

<asp:DataGrid ID="dgDates" runat="server" >

 

 

<Columns>

 

 

        <ItemTemplate>

 

            <rada:raddatepicker id="RadDatePicker1" mindate="2006-2-1" maxdate="2099-1-1"

 

 

                runat="server" skin="WebBlue" width="75">

 

 

                <DatePopupButton Visible="False"></DatePopupButton>

 

 

                <DateInput onclick="ToggleFirstPopup()" >

 

 

                </DateInput>

 

 

            </rada:raddatepicker>

 

 

        </ItemTemplate>

 

 

</Columns>

 

 

</asp:DataGrid>

 






Mike Causi
Top achievements
Rank 1
 asked on 07 Jan 2009
4 answers
258 views
Hi - I have a Grid with a context menu that appears when you right click on a line.  This project was originally written using Telerik ASPNET Controls, I recently upgraded it to ASPNET AJAX and since I upgraded the context menu isn't working.  When I right click I get the following JS error:  "'null' is null or not an object".  It's not finding the menu.  What could have changed wihen I upgraded Telerik?  Thanks in advance for your help - I'm pulling my hair out. 

Here is the Javascript I am using:

function 

 

RowContextMenu(sender, eventArgs)

 

 

 {

 

var menu = $find("<%#RadMenu1.ClientID %>");

 

 

 

menu.show(eventArgs.get_domEvent());

 

 

 

document.getElementById("radGridClickedRowIndex").value = eventArgs.get_itemIndexHierarchical();

 

 

 

var ownerTable = eventArgs.get_tableView();

 

 

 

document.getElementById("radGridClickedTableId").value = ownerTable._data.UniqueID;

 

 

 

}

 

 

 

 

 

TPerry
Top achievements
Rank 1
 answered on 07 Jan 2009
5 answers
193 views
Hi,
    I am using a tree view control . Based upon the node selection I want to display some text into the text boxes . I have pasted part of my code below.
But I am not getting any value to the text boxes .

 

 



 

 

protected void rtvDetailData_NodeExpand(object sender, RadTreeNodeEventArgs e)
    {
        SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["codingspecialsConnectionString"].ConnectionString);

        SqlCommand selectCommand = new SqlCommand(@"select Heirarchy.childid AS NodeId , Heirarchy.childdescription AS NodeText , Heirarchy.Name, Heirarchy.UPCCode , Heirarchy.CNAN , COUNT(Children.childid) AS ChildCount from Heirarchy LEFT JOIN Heirarchy As Children ON Heirarchy.childid = Children.childid WHERE Heirarchy.ParentID = @parentId GROUP BY Heirarchy.childid , Heirarchy.childdescription , Heirarchy.Name, Heirarchy.UPCCode , Heirarchy.CNAN ", connection);
       

        selectCommand.Parameters.AddWithValue("parentId", e.Node.Value);
        SqlDataAdapter adapter = new SqlDataAdapter(selectCommand);
        DataTable data = new DataTable();
        adapter.Fill(data);
       
        foreach (DataRow row in data.Rows)
        {
            RadTreeNode node = new RadTreeNode();
            node.Text = row["NodeText"].ToString();
            node.Value = row["NodeId"].ToString();

            txtName.Text = row["NodeText"].ToString();
            txtUPCCode.Text = row["UPCCode"].ToString();
            txtCNANNum.Text = row["CNAN"].ToString();
           
            if (Convert.ToInt32(row["ChildCount"]) > 0)
            {
                node.ExpandMode = TreeNodeExpandMode.ServerSideCallBack;
            }
            e.Node.Nodes.Add(node);
        }
        e.Node.Expanded = true;       
    }

Can you tell me where I am doing the mistake .

With Thanks & Regards
Manoj

 

 

 

 

 

 

Iggy
Top achievements
Rank 1
 answered on 07 Jan 2009
1 answer
260 views
Hi

i have a radgrid in which total number of records 80 . By using paging  displaying 10 records each time  in grid.
 but if i export grid to excel i m able to get only 10 records in excel but i want 80 records in excel sheet.


also suggest an  example how to export hierarchical grid into an excel sheet.


Advance thanks
Daniel
Telerik team
 answered on 07 Jan 2009
4 answers
549 views
I am currently profiling our ASP.NET web application which is built on Telerik ASP.NET AJAX controls, an Oracle 10g database, and MS LDAP server (ADAM).

I was shocked by the results of my first run with the profiler. Even though this is a small web form that makes several calls to Oracle and to LDAP in the code behind.., the Telerik.Web.UI.RadAjaxControl represents 77+% of our page processing time! In other words the Telerik controls take longer to render HTML than our backend takes to run several SQL & LDAP queries to geographically remote servers.

Looking more deeply revealed that the DecribeComponent() method invokes the reflective method 'GetCustomAttribute' almost 500 times per page request!

Profiler Results

I am trying to understand why an ajax framework would need to make heayweight reflective calls like this, is there anyway to disable this use of relection without porting to a different set of controls?





Jason Clark
Top achievements
Rank 1
 answered on 07 Jan 2009
3 answers
184 views
I have many text boxes in edit form templates in several GridViews. I would like to take advantage of the RadInputManager control. On other hand, I want the text boxes to be styled with one of the telerik built-in skins. The whole advantage of RadInputManager is when I use asp:TextBox controls instead of RadTextBox ones. But I asp:TextBox doesn't get styled with telerik built-in skins.

Is there a way how i can take advantage of the RadInputManager without losing buil-in skins?
AJtheCoder
Top achievements
Rank 1
 answered on 07 Jan 2009
2 answers
208 views
I seemed to be experiencing a problem that I cannot find an answer for. 

Here is my scenario:

I am using  this release: 2008.31125.
I have the following Rad Components on my page (in this order):
RadScriptManager - (Using default settings, has one external script file with not much script)
RadSkinManager - (Using the Office2007 Skin)
RadStyleSheetManager - (Using default settings)
RadFormDecorator - (All controls are decorated except H4H5H6 controls)
RadAjaxPanel - (Contains a formview)

Problem Prelude:

Inside the RadAjaxPanel, I have a formview which has multiline textboxes. I converted these textboxes from RadTextBoxes to regular Texboxes because RadTextBoxes are slow when typing LOTS of text (there was a 1-2 delay before typing appeared). 

The Problem:
Even after removing the RadSkinManager, RadStyleSheetManager, and RadFormDecorator, the multiline textboxes appear, but they do not have a scrollbar even though there should be one and there is one when I remove the RadFormDecorator.

Additional Example: 
I thought that I would add that the about you box on this page has the same problem:
http://demos.telerik.com/aspnet-ajax/FormDecorator/Examples/StyleSheetManagerAndCombo/DefaultCS.aspx

Final Note:  I'm starting to wonder why the RadFormDecorator would allow you to scroll in a multiline textbox using the up and down arrows or by highlighting and dragging the text in the direction you want to go, but not allowing you to use your mouse to scroll and not presenting a scrollbar just seems like a hassle. Is there a way around this?
Clarence
Top achievements
Rank 1
 answered on 07 Jan 2009
8 answers
192 views
Hi,

I have a radGrid as below (partial code):

<Columns>
                   <telerik:GridTemplateColumn DataField="InvoiceDetailID" HeaderText="InvoiceDetailID" UniqueName="InvoiceDetailID" Display="false">
                        <ItemTemplate>
                            <asp:Label ID="lblInvoiceDetailID" runat="server" Text='<%# Bind("InvoiceDetailID") %>' >' </asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox ID="txtInvoiceDetailID" Text='<%# Bind("InvoiceDetailID") %>'  runat="server" ReadOnly="true"></asp:TextBox>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
</Coloumns>

My problem is when the Grid is in Edit or Insert mode, InvoiceDetailID field is visible even when Display property is set to False. Any idea?

Thanks a lot.

Cheers,
Milan G
Milan Gurung
Top achievements
Rank 1
 answered on 07 Jan 2009
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?