Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
102 views
Is it possible to hide the filter controls depending on the item count of the RadGrid, or if the pager is shown?

Ideally I don't want to show the filter boxes if the results already fit on one page, has anyone done this before?

Cheers

Jon
Jonathan
Top achievements
Rank 1
 answered on 23 Feb 2011
22 answers
294 views
hi
I work with the AdvancedForm Excample. I extend it with a Dropdown, with autopostback. After the Postback all Data Fields (Start,end etc.) are empty.

What can be my mistake?

Regards Markus

 

Peter
Telerik team
 answered on 23 Feb 2011
1 answer
174 views
Hey all,

A common subject is how to validate that a RadListBox with CheckBoxes="true" have at least one item checked (not selected).

Here is a post that explains a good solution to make it work.
http://www.telerik.com/community/forums/aspnet-ajax/listbox/radlistbox-checkboxes-true-and-requiredfieldvalidator.aspx

The solution above says we need to remove the ControlToValidate from the CustomValidator attached to the RadListBox.

This would work great unless you happen to use validation callout extenders to show a tooltip over invalid fields.  In this case, in order to position the tooltip, the validator must have a _controlToValidate property.

So how do we get the RadListBox to work with validation callout extenders?  In our case we dynamically add our validators to the page with extension methods.  I suppose we could add a custom attribute to the validators that would be like ControlToValidate2="rlbStates" and the callout extender could check this property if ControlToValidate was null...

Any ideas that are more "built-in" and less "hacky"?

Thanks!
Thad
Dimitar Terziev
Telerik team
 answered on 23 Feb 2011
3 answers
143 views
Hi all,

I am using radcharts. I want to use custom Dashstyle. I need (long dash and a dot). I looked into dashdot of Dshstyle but i need a longer dash.

Any ideas?

Thanks,
Sharanya
Sia
Telerik team
 answered on 23 Feb 2011
1 answer
125 views
Hi all :)

when I make my RadGrid, I allow automatic insert items, and show it in the grid header, but it make no action in fact

here is my hole code


<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
 
            <script type="text/javascript">
                function rowDblClick(sender, eventArgs) {
                    sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
                }
            </script>
 
        </telerik:RadCodeBlock>
        <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                        <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
                        <telerik:AjaxUpdatedControl ControlID="RadInputManager1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" />
            <telerik:RadAjaxPanel ID="RadAjaxPanel1"
    runat="server" LoadingPanelID="RadLoadingPanel1" Height="324px" Width="597px">
            <telerik:RadGrid ID="RadGrid1" runat="server"
    AutoGenerateColumns="False" GridLines="None"
                AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
                AllowAutomaticUpdates="True" AllowFilteringByColumn="True" AllowPaging="True"
                AllowSorting="True"
                DataSourceID="SqlDataSource1" ShowFooter="True" Skin="Black" Width="682px"
                PageSize="1">
                <MasterTableView DataKeyNames="History_ID" DataSourceID="SqlDataSource1" CommandItemDisplay="Top" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
                    <CommandItemSettings ExportToPdfText="Export to Pdf" />
                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px" />
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="History_ID" DataType="System.Int32"
                            HeaderText="History_ID" ReadOnly="True" SortExpression="History_ID"
                            UniqueName="History_ID" Visible="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="User_ID" DataType="System.Int32"
                            HeaderText="User_ID" SortExpression="User_ID" UniqueName="User_ID"
                            Visible="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="DiesesInformation"
                            HeaderText="Disease Information" SortExpression="DiesesInformation"
                            UniqueName="DiesesInformation">
                        </telerik:GridBoundColumn>
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" />
                        <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
                    </Columns>
                    <EditFormSettings>
                    <EditColumn ButtonType="ImageButton" />                   
                </EditFormSettings>
                </MasterTableView>
                <PagerStyle Mode="Slider" />
                <ClientSettings>
                <ClientEvents OnRowDblClick="rowDblClick" />
            </ClientSettings>
            </telerik:RadGrid>
            <telerik:RadInputManager runat="server" ID="RadInputManager1" Enabled="true">
            <telerik:TextBoxSetting BehaviorID="TextBoxSetting1">
            </telerik:TextBoxSetting>
            <telerik:NumericTextBoxSetting BehaviorID="NumericTextBoxSetting1" Type="Currency"
                AllowRounding="true" DecimalDigits="2">
            </telerik:NumericTextBoxSetting>
            <telerik:NumericTextBoxSetting BehaviorID="NumericTextBoxSetting2" Type="Number"
                AllowRounding="true" DecimalDigits="0" MinValue="0">
            </telerik:NumericTextBoxSetting>
        </telerik:RadInputManager>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" />
            <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            DeleteCommand="DELETE FROM [Ddisease_History] WHERE [History_ID] = @History_ID"
            InsertCommand="INSERT INTO [Ddisease_History] ([User_ID], [DiesesInformation]) VALUES (@User_ID, @DiesesInformation)"
            UpdateCommand="UPDATE [Ddisease_History] SET [User_ID] = @User_ID, [DiesesInformation] = @DiesesInformation WHERE [History_ID] = @History_ID">
            <DeleteParameters>
                <asp:Parameter Name="History_ID" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="User_ID" Type="Int32" />
                <asp:Parameter Name="DiesesInformation" Type="String" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="User_ID" Type="Int32" />
                <asp:Parameter Name="DiesesInformation" Type="String" />
                <asp:Parameter Name="History_ID" Type="Int32" />
            </UpdateParameters>
            </asp:SqlDataSource>
            </telerik:RadAjaxPanel>
        </div>

Here is only the code of Rad grid and my sqlDatasource


        <telerik:RadGrid ID="RadGrid1" runat="server"
AutoGenerateColumns="False" GridLines="None"
            AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
            AllowAutomaticUpdates="True" AllowFilteringByColumn="True" AllowPaging="True"
            AllowSorting="True"
            DataSourceID="SqlDataSource1" ShowFooter="True" Skin="Black" Width="682px"
            PageSize="1">
            <MasterTableView DataKeyNames="History_ID" DataSourceID="SqlDataSource1" CommandItemDisplay="Top" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
                <CommandItemSettings ExportToPdfText="Export to Pdf" />
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="History_ID" DataType="System.Int32"
                        HeaderText="History_ID" ReadOnly="True" SortExpression="History_ID"
                        UniqueName="History_ID" Visible="False">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="User_ID" DataType="System.Int32"
                        HeaderText="User_ID" SortExpression="User_ID" UniqueName="User_ID"
                        Visible="False">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="DiesesInformation"
                        HeaderText="Disease Information" SortExpression="DiesesInformation"
                        UniqueName="DiesesInformation">
                    </telerik:GridBoundColumn>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" />
                    <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
                </Columns>
                <EditFormSettings>
                <EditColumn ButtonType="ImageButton" />                   
            </EditFormSettings>
            </MasterTableView>
            <PagerStyle Mode="Slider" />
            <ClientSettings>
            <ClientEvents OnRowDblClick="rowDblClick" />
        </ClientSettings>
        </telerik:RadGrid>
 
 
 
 
 
 
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        DeleteCommand="DELETE FROM [Ddisease_History] WHERE [History_ID] = @History_ID"
        InsertCommand="INSERT INTO [Ddisease_History] ([User_ID], [DiesesInformation]) VALUES (@User_ID, @DiesesInformation)"
        UpdateCommand="UPDATE [Ddisease_History] SET [User_ID] = @User_ID, [DiesesInformation] = @DiesesInformation WHERE [History_ID] = @History_ID">
        <DeleteParameters>
            <asp:Parameter Name="History_ID" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="User_ID" Type="Int32" />
            <asp:Parameter Name="DiesesInformation" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="User_ID" Type="Int32" />
            <asp:Parameter Name="DiesesInformation" Type="String" />
            <asp:Parameter Name="History_ID" Type="Int32" />
        </UpdateParameters>
        </asp:SqlDataSource>

my C# code:

using System;
using System.Collections;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Linq;
using Telerik.Web.UI;
 
public partial class R253H283HtlR1010L64_Lvu4evrR007e12_RwHaAnMza2832010_Pages_DeseaseHistory : System.Web.UI.UserControl
{
 
  
    protected void Page_Load(object sender, EventArgs e)
    {
        SqlDataSource1.ConnectionString = ConnectionString.connectionString();
        SqlDataSource1.SelectCommand = "SELECT [DiesesInformation], [History_ID], [User_ID] FROM [Ddisease_History] WHERE [User_ID]=" + Session["UserInAdminPage"].ToString();
    }
 
}

Marin
Telerik team
 answered on 23 Feb 2011
1 answer
87 views
Hello,

I'm trying to get File Explorer hooked up to a SQL Server 2008 database, and I can't get past this error.  It displays the folders, and I can see it hitting the database and returning records, but when the page loads it throws this error:

Microsoft JScript runtime error: 'Sys.WebForms.PageRequestManager' is null or not an object

Does anyone have a solution for this error?  Also, the files are being saved as binary streams, so if anyone has any code on how to convert these back into files using File Explorer, I'd be in much gratitude.

Thanks,

Scott
Dobromir
Telerik team
 answered on 23 Feb 2011
1 answer
173 views
Hi Telerik,

This should (hopefully!) be really simple.

I have this:

.RadDock .rdTop{text-align:center;}

This does basically what I want -- it centers the title of the RadDock. But, when the calculation is made on where to center it, it takes into consideration the far LHS of the RadDock to the start of the first command on the RHS. This is causing my text to be displayed off-center compared to the content in the RadDock.

Is there a way to do something like text-align:center text-shift-right: 38px? I tried using text-indent, but it seems to indent how far the icons are from the RHS and not the text itself.

Thanks!
Pero
Telerik team
 answered on 23 Feb 2011
1 answer
159 views
Hi

I open my window in code behind using VisibleOnPageLoad and AjaxRequest.  I also set a navigation url in this ajax request. When I want to close window I call javascript function on page which was loaded as content of the window. Function look like this:
<script type="text/javascript">
    
    function GetRadWindow() {
        var oWindow = null;
        if (window.radWindow) oWindow = window.radWindow;
        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
        return oWindow;
    }
 
    function CloseAndRebind() {
        GetRadWindow().BrowserWindow.selectionFinalize();
        GetRadWindow().Close();
        return false;
    }
    
</script>
>

But when window is closed, it opening itself.
Shinu
Top achievements
Rank 2
 answered on 23 Feb 2011
1 answer
123 views
Hi people, 

I'm new at this forum, so I hope I post this in the right place. I have a database with several data in. I want to select a data in database with dropdownlist. When you select the value in ddl, the selected data should come to chart.... My example;
 - Database: ProblemDescription,
 - My Tables:  ID, Name, Department, Problems, Description, Date, Hour

I show the items of Department in dropdowlist, what I want is; when you choose a department you must see the Problems in Xaxis and I count the items in Yaxxis. My query; SELECT Department, Problems, COUNT(*) AS totalProblems FROM tblProblemDescription GROUP BY Department, Problems
Does anyone show me a way how to solve this problem with databinding in RadChart.
Bartholomeo Rocca
Top achievements
Rank 1
 answered on 23 Feb 2011
4 answers
110 views
In your Tooltipified Radgrid I have implemented everything that I see. 
However, after I load the page, I currently don't databind anything (or retrieve any data) and the tooltip appears as if it's loading and then it disapears a second later.  When it disapears, it causes the page to completely referesh.

Any idea what's happening here?

Let me give you a little FYI about my scenario:
This is a user control within a user control.  I use a radajaxmanagerproxy object in the user control that represents the tooltip.  The first usercontrol is a customized grid that I use through out the web app. 

I've registered the tooltip control on the grid control page (which appears to be fine).  I've written the events on the the grid page for ondatabind/onajaxupdate simarlily (again just trying to get the tooltip to show up.

Thanks for any help.  I'm kind of at my wits end on this one.
Iana Tsolova
Telerik team
 answered on 23 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?