Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
356 views
Hi,

My radgrid editing mode = In-line. After i successful edited the selected row, the edit textbox still remain there. How should i close it?

And when i insert the new record, after successful insert the data, the add new row still at there. It cannot automatically close it after successfully inserted.

I'm using RadGrid_InsertCommand() and RadGrid_UpdateCommand().

Please advice. Thanks.


Regards,
Minnie
soo
Top achievements
Rank 1
 answered on 11 Apr 2008
1 answer
248 views
I'm currently using a RadGrid with one level of Detail Tables under the Parent.  When I attempt to update or delete with either the MasterTableView or the DetailsTable, the ItemUpdated event and ItemDeleted event don't seem to fire.  I've got my page running in debug mode, I've set a breakpoint at the instantiation of both events, and it never hits those breakpoints, meaning I get no update or delete.

Am I missing a step or something wrong with the Grid?
Sebastian
Telerik team
 answered on 11 Apr 2008
1 answer
165 views
Hi guys,
I have the following situation
I have a page Page1.aspx which loads a table (Table1) by codebehind from a DataSet. This page has a button which opens a Radwindow
within a second page. I manually modify the dataset from the radwindow page and after that I would like to throw an event (or
something like that) to Page1 in order to update Table1.
Is there any way to achieve this ?
Table1 is a simple table, not any grid

Thanks,

François
Georgi Tunev
Telerik team
 answered on 11 Apr 2008
1 answer
110 views
Hi all,

I posted this once before but did not get any responses.  I am having a terrible time with my ASP.Net user control.  I have user control that contains 2 radGrids.  Each RadGrid has an GridEditCommandColumn.  When clicked, I want to display another user control that allows the data to be edited.  I have one user control for each radGrid.  Everything works fine when I click the GridEditCommandColumn on the first radGrid.  But if I click on the GridEditCommandColumn on the second radGrid, the entire radGrid disappears!  The first RadGrid still displays though. 

This is driving me crazy!  I cannot find any examples showing how to do this.  I am new to Telerik controls so maybe I am missing something obvious.  Can anyone help out or at least point me in the right direction?  I can post code if needed.

Thanks,
Bob
Ves
Telerik team
 answered on 11 Apr 2008
1 answer
190 views
I want to provide different tooltip for labels lying on x axis. How to achieve this functionality?
Giuseppe
Telerik team
 answered on 11 Apr 2008
1 answer
104 views
Hi,
How can I get the current sortcolumn and sortorder in the event NeedDataSource?
        [code]protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            skip = RadGrid1.CurrentPageIndex * RadGrid1.PageSize;
            take = RadGrid1.PageSize;
            string sortColumn = "";
            bool sortOrder = true; //false
            RadGrid1.DataSource = GetData(sortColumn, sortOrder, skip, take);
        }[/code]

Thanks,
Mattias
Ves
Telerik team
 answered on 11 Apr 2008
5 answers
209 views
Hi,
I'm testing RadUpload Prometheus and don't find a possibility to localize the buttons. Is this not implemented yet?

Thanks for answering,
Andreas
Sophy
Telerik team
 answered on 11 Apr 2008
1 answer
163 views
I have a very basic implementation of a column total that is doubling the value. I have searched through the posts on here and most of them involve other routines that are causing the ItemDataBound to fire twice. I don't believe that's the problem with mine since it's a VERY simple design.

Can someone tell me what I might be doing wrong here? Here is the code behind:

Imports System 
Imports System.Data 
Imports System.Data.SqlClient 
Imports System.IO 
Imports Telerik.Web.UI 
 
Partial Class rpt_bistatus 
    Inherits System.Web.UI.Page 
 
    Private startFilter As String 
    Private endFilter As String 
    Private total As Double = 0 
 
    Protected Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 
        If Not Page.IsPostBack Then 
            startFilter = Request.QueryString("start") 
            endFilter = Request.QueryString("end") 
        End If 
    End Sub 
 
    Protected Sub Page_LoadComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LoadComplete 
        EmpID.Text = Master.loginID 
    End Sub 
 
    Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource 
        Dim sql As String = "" 
        If startFilter <> "" And endFilter <> "" Then 
            RadGrid1.DataSource = GetDataTable("SELECT [requests].[request_id], [requests].[title], [requests].[savings], FORMAT([requests].[release_date], 'mm/dd/yyyy') AS [release_date], IIF([requests].[complete_date] IS NULL, [requests].[due_date], [requests].[complete_date]) AS [report_date], [requests].[status], [tEmployee].[EmpFNm] + ' ' + [tEmployee].[EmpLNm] AS [analyst_nm] FROM [requests] LEFT JOIN [tEmployee] ON [tEmployee].[EmpID] = [requests].[analyst_id] WHERE (([requests].[status] <> 'Cancelled' AND [requests].[status] <> 'Deferred') AND (IIF([requests].[complete_date] IS NULL, [requests].[due_date], [requests].[complete_date]) <= #" & endFilter & "# AND IIF([requests].[complete_date] IS NULL, [requests].[due_date], [requests].[complete_date]) >= #" & startFilter & "#) AND ([requests].[request_type]='BI Request'))") 
        Else 
            RadGrid1.DataSource = GetDataTable("SELECT [requests].[request_id], [requests].[title], [requests].[savings], FORMAT([requests].[release_date], 'mm/dd/yyyy') AS [release_date], IIF([requests].[complete_date] IS NULL, [requests].[due_date], [requests].[complete_date]) AS [report_date], [requests].[status], [tEmployee].[EmpFNm] + ' ' + [tEmployee].[EmpLNm] AS [analyst_nm] FROM [requests] LEFT JOIN [tEmployee] ON [tEmployee].[EmpID] = [requests].[analyst_id] WHERE (([requests].[status] <> 'Cancelled' AND [requests].[status] <> 'Deferred') AND (IIF([requests].[complete_date] IS NULL, [requests].[due_date], [requests].[complete_date]) = #12/31/9999#) AND ([requests].[request_type]='BI Request'))") 
        End If 
    End Sub 
 
    Public Function GetDataTable(ByVal query As String) As DataTable 
        Dim connstr As String = ConfigurationManager.ConnectionStrings("LocalSqlServer").ToString 
        Dim dbconn As New OleDb.OleDbConnection(connstr) 
        Dim dbadapter As New System.Data.OleDb.OleDbDataAdapter(query, dbconn) 
        Dim oTable1 As New DataTable() 
        Try 
            dbadapter.Fill(oTable1) 
            dbadapter = Nothing 
        Finally 
            dbconn.Close() 
        End Try 
 
        Return oTable1 
    End Function 
 
    Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid1.ItemDataBound 
        If TypeOf e.Item Is GridDataItem Then 
            Dim dataItem As GridDataItem = CType(e.Item, GridDataItem) 
            If CType(dataItem.FindControl("lbl_savings"), Label).Text <> "" Then 
                total += Double.Parse(CType(dataItem.FindControl("lbl_savings"), Label).Text) 
            End If 
        End If 
 
        If TypeOf e.Item Is GridFooterItem Then 
            Dim footerItem As GridFooterItem = CType(e.Item, GridFooterItem) 
            footerItem("Savings").Text = total.ToString() 
            footerItem("Title").Text = "Total Annual Savings in Hours: " 
        End If 
    End Sub 
End Class 

And here is the grid call:

<telerik:RadGrid ID="RadGrid1" 
    EnableEmbeddedSkins="false" 
    Skin="EIS" 
    EnableAjax="false" 
    ImagesPath="images/grid/" 
    AllowSorting="true" 
    PageSize="25" 
    ShowFooter="true" 
    AllowPaging="false" 
    ShowGroupPanel="false" 
    GroupingEnabled="false" 
    OnNeedDataSource="RadGrid1_NeedDataSource" 
    OnItemDataBound="RadGrid1_ItemDataBound" 
    Width="950" 
    runat="server"> 
    <MasterTableView Name="master" CommandItemDisplay="None" DataKeyNames="request_id" Width="100%" HorizontalAlign="NotSet" AutoGenerateColumns="False" AllowSorting="true" NoMasterRecordsText="There are no Requests that match the criteria"> 
        <Columns> 
            <telerik:GridTemplateColumn HeaderText="Request #" DataField="request_id" UniqueName="request_id" SortExpression="request_id" Groupable="false"> 
                <ItemStyle Width="75" /> 
                <ItemTemplate> 
                    <a href='request.aspx?id=<%# Eval("request_id") %>' style="cursor:pointer;"><asp:Label Width="65" CssClass="gridLabel" runat="server" ID="lbl_request_id" Text='<%# Eval("request_id") %>' /></a> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Purpose" UniqueName="title" SortExpression="title" Groupable="false"> 
                <ItemTemplate> 
                    <asp:Label CssClass="gridLabel" runat="server" ID="lbl_title" Text='<%# Eval("title") %>' /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Savings" UniqueName="savings" DataField="savings" SortExpression="savings"> 
                <ItemStyle Width="65" /> 
                <ItemTemplate> 
                    <asp:Label Width="60" CssClass="gridLabel" runat="server" ID="lbl_savings" Text='<%# Eval("savings") %>' /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Release Date" UniqueName="release_date" SortExpression="release_date" Groupable="false"> 
                <ItemStyle Width="90" /> 
                <ItemTemplate> 
                    <asp:Label Width="85" CssClass="gridLabel" runat="server" ID="lbl_release_date" Text='<%# Eval("release_date") %>' /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Status" UniqueName="status" DataField="status" SortExpression="status" Groupable="false"> 
                <ItemStyle Width="65" /> 
                <ItemTemplate> 
                    <asp:Label Width="60" CssClass="gridLabel" runat="server" ID="lbl_status" Text='<%# Eval("status") %>' /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Assigned To" UniqueName="analyst_nm" DataField="analyst_nm" SortExpression="analyst_nm" Groupable="false"> 
                <ItemStyle Width="105" /> 
                <ItemTemplate> 
                    <asp:Label Width="100" CssClass="gridLabel" runat="server" ID="lbl_analyst_nm" Text='<%# Eval("analyst_nm") %>' /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
        </Columns> 
    </MasterTableView> 
    <ClientSettings AllowDragToGroup="True" AllowGroupExpandCollapse="True"> 
        <Selecting AllowRowSelect="True" /> 
        <Scrolling AllowScroll="false" UseStaticHeaders="True" /> 
        <ClientEvents OnGridCreated="GridCreated" /> 
    </ClientSettings> 
    <PagerStyle Mode="NextPrevAndNumeric" /> 
</telerik:RadGrid> 

I'm using the RadAjaxManager for the grid, but I tried deleting all the code for the RadAjaxManager and my total was still double.

Thanks.
Vlad
Telerik team
 answered on 11 Apr 2008
2 answers
132 views
Just ramping up on the RadFormDecorator and I ran into a problem. Should it work on a modal RadWindow? It works terrific on my main app, but when I bring up a modal window the radio buttons are not styled as expected.
Rich
Top achievements
Rank 1
 answered on 10 Apr 2008
4 answers
133 views
There may be a simple answer to this that I have overlooked, but I've not been able to find it.

I'm dynamically creating new Docks in a DockZone.  The new Docks have DockMode set to Docked.  The DocZone has Orientation = "Vertical".

When I do:
    RadDocZond1.Controls.Add(dock);
the new Docks appear at the top of the DocZone.  When I do:
    RadDocZond1.Controls.AddAt(RadDocZond1.Controls.Count, dock);
the new Docks still appear at the top of the DocZone.

It's pretty important, for us to get the new Docks to appear beneath the already-existing Docks, rather than above them, and this seems like such a simple thing.  Is there something I'm missing?


Jeff
Top achievements
Rank 1
 answered on 10 Apr 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?