Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
97 views
Hi,

I want to make a column in a RadGrid readonly dependent of the value of a different field in the dataset. This field is not shown in the grid. How do I do this?

Paul
Shinu
Top achievements
Rank 2
 answered on 05 Mar 2013
1 answer
101 views
I have an application where I populate the RadGrid from a CSV file (ie using it in unbound mode).  I define the columns as

Dim dt As New DataTable()

dt.Columns.Add("Date"
etc
and populate them using

 

Value = {Dte$, Item$, Type$, Recordid$}

dt.Rows.Add(Value)

All this works fine.

I now need to add a checkbox and image column.  Can you direct me to a sample. I was not able to find any.

Thanks

Allen

 

 

 

 

 

Shinu
Top achievements
Rank 2
 answered on 05 Mar 2013
1 answer
206 views
Hi,

Is it possible to change the style of the RadToolBar button once it is clicked?

Thank you,
Ivy.
Princy
Top achievements
Rank 2
 answered on 05 Mar 2013
1 answer
77 views
Hi,

I want to remove the blank space intended for adding images to toolbar buttons. Please help.

Thank you,
Ivy
Princy
Top achievements
Rank 2
 answered on 05 Mar 2013
1 answer
94 views
Hi,

In my webpage I dont want the AjaxLoadingPanel to appear over the updated control. Instead I want to display it on a certain
position on my page. Is this possible?

Any help appreciated,
Freddy
Princy
Top achievements
Rank 2
 answered on 05 Mar 2013
16 answers
549 views
Ok, in Visual Studio 2008, after simply dragging a RadDatePicker (Ajax) onto my form, I'm seeing the following warnings in the error list...

Validation (ASP.Net): Element 'DateInput' is missing required attribute 'runat'.

and

Validation (ASP.Net): Element 'Calendar' is missing required attribute 'runat'.

I imagine this is a bug with your control (probably in the [ToolboxData()] for the RadDatePicker class)

My question is: should I go ahead and manually add "runat='server'" for those tags in my declarative? Or is there some trick to make Visual Studio not display these warnings?

Thanks.

 

 

DuelingCats
Top achievements
Rank 2
 answered on 04 Mar 2013
0 answers
58 views
Solved. Been a long day. ;)

 
Danny
Top achievements
Rank 2
 asked on 04 Mar 2013
2 answers
175 views
Hi there,

I am using a RadDatePicker filter with the DisplayDateFormat="MM/dd/yyyy" and filter function=LessThanOrEqualTo. It seems the filter not returning the correct data, for example, if I set the RadDatePicker ="07/12/1996", the filter returning date prior to December 7th, 1996, while I am actually expecting date prior to July 12th, 1996.

Please see my following code (database is NorthWind), any help is greatly appreciated.

<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <%--Needed for JavaScript IntelliSense in VS2010--%>
                <%--For VS2008 replace RadScriptManager with ScriptManager--%>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>
        <script type="text/javascript">
            //Put your JavaScript code here.
        </script>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"></telerik:RadAjaxLoadingPanel>
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" CellSpacing="0"
            GridLines="None" Width="800px" AllowFilteringByColumn="true" EnableLinqExpressions="false" AutoGenerateColumns="false" OnNeedDataSource="RadGrid1_NeedDataSource" ShowFooter="True">
            <MasterTableView AutoGenerateColumns="false" EditMode="InPlace" AllowFilteringByColumn="True"
            ShowFooter="True" TableLayout="Auto">
                <Columns>
                    <telerik:GridTemplateColumn DataField="Freight" HeaderText="Freight" SortExpression="Freight" AutoPostBackOnFilter="true" CurrentFilterFunction="GreaterThanOrEqualTo"
                        ShowFilterIcon="false">
                            <ItemTemplate>
                                <asp:LinkButton ID="lbl_freight" runat="server" Text='<%#Eval("Freight")%>' Visible="true"/>
                            </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn DataField="ShipName" HeaderText="Ship Name" SortExpression="ShipName" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                    ShowFilterIcon="false">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbl_name" runat="server" Text='<%#Eval("ShipName")%>' Visible="true"/>
                        </ItemTemplate>
                   </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn DataField="OrderDate" UniqueName="OrderDate" HeaderText="Order Date" SortExpression="OrderDate">
                    <FilterTemplate>
                        <telerik:RadDatePicker ID="filterOrderDate" runat="server" Width="100%" ClientEvents-OnDateSelected="DateSelected"
                            DbSelectedDate='<%# SetOrderDate(Container) %>'><DateInput ID="DateInput1" runat="server"  DateFormat="MM/dd/yyyy" DisplayDateFormat="MM/dd/yyyy"></DateInput
                        </telerik:RadDatePicker
                        <telerik:RadScriptBlock ID="RadScriptBlock3" runat="server">
                            <script type="text/javascript">
                                function DateSelected(sender, args) {
                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
  
                                    var date = FormatSelectedDate(sender);
  
                                    tableView.filter("OrderDate", date, "LessThanOrEqualTo");
                                }
                                function FormatSelectedDate(picker) {
                                    var date = picker.get_selectedDate();
                                    var dateInput = picker.get_dateInput();
                                    var formattedDate = dateInput.get_dateFormatInfo().FormatDate(date, dateInput.get_displayDateFormat());
  
                                    return formattedDate;
                                }
                            </script>
                        </telerik:RadScriptBlock>
                    </FilterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lbl_duedate_gv" runat="server" Text='<%#Eval("OrderDate", "{0:MM/dd/yyyy}")%>' Visible="true"/>
                    </ItemTemplate>
               </telerik:GridTemplateColumn>
             </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </form>
</body>


cs code
public partial class RadGridFilterTest : System.Web.UI.Page
{
    protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        LoadData();
    }
  
    private void LoadData()
    {
        RadGrid1.DataSource = GetDataTable("SELECT OrderID, OrderDate, Freight, ShipName, ShipCountry FROM Orders");
    }
  
    public DataTable GetDataTable(string query)
    {
        String ConnString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
        SqlConnection conn = new SqlConnection(ConnString);
        SqlDataAdapter adapter = new SqlDataAdapter();
        adapter.SelectCommand = new SqlCommand(query, conn);
  
        DataTable myDataTable = new DataTable();
  
        conn.Open();
        try
        {
            adapter.Fill(myDataTable);
        }
        finally
        {
            conn.Close();
        }
  
        return myDataTable;
    }
  
    protected DateTime? SetOrderDate(GridItem item)
    {
        if (item.OwnerTableView.GetColumn("OrderDate").CurrentFilterValue == string.Empty)
        {
            return new DateTime?();
        }
        else
        {
            DateTime DT = new DateTime();
              
            DT = DateTime.ParseExact(item.OwnerTableView.GetColumn("OrderDate").CurrentFilterValue, "MM/dd/yyyy", null);
            //DT = DateTime.Parse(item.OwnerTableView.GetColumn("OrderDate").CurrentFilterValue);
            return DT;
        }
    }
}
Meng
Top achievements
Rank 1
 answered on 04 Mar 2013
3 answers
384 views
I want to call a javascript function when a radButton receives focus by tabbing onto the control.  Similarly, call a javascript function when radButton loses focus.  How can this be accomplished?
Mark
Top achievements
Rank 1
 answered on 04 Mar 2013
11 answers
596 views
I am working in C# for ASP.NET in Visual Studio version 2008.  I recently updated my environment to include the following:$0* 3.5 .NET Framework Service Pack.$0$0* 2008-08-20 release of the AJAX Control Toolkit.$0$0$0$0$0As soon as I made the upgrades listed above I started to receive the following message: 'ASP.NET Ajax client-side framework failed to load.'$0$0$0$0$0The error occurs due to the presence of the Telerik RadScriptManager control on a page.  If I replace that control with the standard AJAX ScriptManager control the error goes away.$0$0$0$0$0Any information you could provide would greatly be appreciated.$0$0$0$0$0Thank You,$0$0$0$0$0David Nowak.$0
Travis
Top achievements
Rank 1
 answered on 04 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?