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

I know this is a huge step forward in Telerik release and that's why I am asking...
Migrating from Q3.2009 to Q3.2012 using Telerik wizard, I finally got my radlistbox embeded controls no more rendered in IE...
Do I need to redo the entire page or is there some quickfix I missed?

Best regards,
David
Dave
Top achievements
Rank 2
 answered on 28 Nov 2012
6 answers
162 views
Hello,
I know Telerik Grid does not go back to previous state in case of paging when ajaxfied but i found from telerik we can impement Scriptmanager Naviate method to reset Index but its not working it always go for first index on browser back button.
I have scriptmanager in MasterPage and in webpart i have added script manage Proxy control.

Please find code 
<asp:ScriptManager id="ScriptManager" runat="server"
                       EnableHistory="true"
                       EnablePageMethods="false"
                       EnablePartialRendering="true"
                       EnableScriptGlobalization="true"
                       EnableScriptLocalization="true" />

in Webpart .ascx File
<asp:ScriptManagerProxy ID="wsScriptManagerProxy" runat="server" OnNavigate="ScriptManager_Navigate" />

Code 

private static string pageKey = "p";
protected void ScriptManager_Navigate(object sender, HistoryEventArgs e)
        {
            if (e.State.Count <= 0)
            {
                // Setup default state
                workspaceGrid.MasterTableView.CurrentPageIndex = 0;
                return;
            }
 
            string key = e.State.AllKeys[0];
            string state = String.Empty;
 
            if (String.Equals(key, pageKey))
            {
                state = e.State[key];
                int pageIndex = int.Parse(state);
                workspaceGrid.MasterTableView.CurrentPageIndex = pageIndex;
                workspaceGrid.MasterTableView.Rebind();
            }
        }
protected void workspaceGrid_PageIndexChanged(object sender, GridPageChangedEventArgs e)
        {
            //string state = (sender as RadGrid).MasterTableView.CurrentPageIndex.ToString();
            string state = e.NewPageIndex.ToString();
            ScriptManager.GetCurrent(this.Page).AddHistoryPoint(pageKey, state);
        }

Thanks 
Ronak
Tsvetoslav
Telerik team
 answered on 28 Nov 2012
1 answer
119 views
Hello,
I wanted to test second solution from: http://www.telerik.com/help/aspnet-ajax/grid-performing-batch-updates.html

Client side editing.

In code:

public DataTable ProductsTable
{
 
    get
    {
        DataTable res = (DataTable)this.Session["ProductsTable"];
        if (res == null)
        {
            res = DataSourceHelperCS.GetDataTable("SELECT [ProductID], [ProductName], [Discontinued] FROM [Products]");
            this.Session["ProductsTable"] = res;
        }
 
        return res;
    }
}

I have issue with DataSourceHelperCS. How I can avoid mentioned error?
Angel Petrov
Telerik team
 answered on 28 Nov 2012
6 answers
131 views
Hi

Attached files present the issue. Some appointments are drawn wrong width of 0% in month view.
Is this a known issue ? Is there a solution for it ?

Thanks,
Michał
Plamen
Telerik team
 answered on 28 Nov 2012
1 answer
109 views
Hello,

I tried to implement batch updates. In my first try I used following article:

http://www.telerik.com/help/aspnet-ajax/grid-performing-batch-updates.html

I only used different table from Northwind database and used checkboxes for update.

Here you can see my code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
 
        <telerik:radgrid ID="RadGrid1" runat="server" AllowMultiRowEdit="True" DataSourceID="SqlDataSource1"
  OnItemCommand="RadGrid1_ItemCommand"
    OnItemDataBound="RadGrid1_ItemDataBound">
  <MasterTableView DataKeyNames="ProductID" AutoGenerateColumns="false" EditMode="InPlace"
    CommandItemDisplay="TopAndBottom">
    <Columns>
      <telerik:gridboundcolumn ReadOnly="true" DataField="ProductID" UniqueName="ProductID"
        HeaderText="ProductID">
      </telerik:gridboundcolumn>
      <telerik:gridboundcolumn ReadOnly="true" DataField="ProductName" UniqueName="ProductName"
            HeaderText="ProductName">
      </telerik:gridboundcolumn>
      <telerik:GridCheckBoxColumn DataField="Discontinued" DefaultInsertValue=""
                    HeaderText="Discontinued" UniqueName="Discontinued" DataType="System.int16">
      </telerik:GridCheckBoxColumn>
      <telerik:grideditcommandcolumn UniqueName="EditCommandColumn" />
    </Columns>
    <CommandItemTemplate>
      <asp:Button runat="server" ID="UpdateAll" Text="Update All" CommandName="UpdateAll" /></CommandItemTemplate>
  </MasterTableView>
</telerik:radgrid>
<asp:SqlDataSource ID="SqlDataSource1"
            ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
            SelectCommand="SELECT [ProductID], [ProductName], [Discontinued] FROM [Products]"
  runat="server"></asp:SqlDataSource>
    </div>
    </form>
</body>
</html>

using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
 
    protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {
        if (e.CommandName == "UpdateAll")
        {
            foreach (GridEditableItem editedItem in RadGrid1.EditItems)
            {
                Hashtable newValues = new Hashtable();
                //The GridTableView will fill the values from all editable columns in the hash
                e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem);
                SqlDataSource1.UpdateCommand = String.Format("Update Products SET Discontinued='{0}' WHERE ProductID='{1}'"
                    , newValues["Discontinued"], editedItem.GetDataKeyValue("ProductID").ToString());
                SqlDataSource1.Update();
                editedItem.Edit = false;
            }
        }
        RadGrid1.Rebind();
    }
 
    protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        if (e.Item is GridDataItem && e.Item.IsInEditMode)
        {
            GridDataItem dataItem = e.Item as GridDataItem;
            //Hides the Update button for each edit form
            dataItem["EditCommandColumn"].Controls[0].Visible = false;
        }
    }
}

It seems that batch update does not work. When I click edit I can change checkbox value but when I click edit on second record change I did disappers. somhow it is not remembered. Can you fix this problem, please?
Angel Petrov
Telerik team
 answered on 28 Nov 2012
1 answer
63 views
By and large the RadEditor control is working very well in our project.

There is one little annoyance.  We run the control with the EditModes="Design".  In this condition, the editor displays a thick featureless grey bar at the bottom.  This is wasted space are far as we're concerned.

Is there any way to get rid of this?  
Rumen
Telerik team
 answered on 28 Nov 2012
1 answer
105 views
Hello,
I am looking for a way to do the following:
http://www.crateandbarrel.com/dining-and-entertaining/individual-bowls/1
In this example they are listing the appropriate data for the page, but they are also "inserting/placing" an image that spans multiple rows and columns that may or may not be part of the dataset.
Has anyone done this with the RadListView or another telerik control?
Thanks.
Galin
Telerik team
 answered on 28 Nov 2012
1 answer
45 views
Hi All,

On my first page of listview i have 10 items with check box in item template.
Suppose user has checked 2 checkboxes and click on 2nd page index.  Then we prompt user that "few items are selected in current page
take appropiate action" in rad window.
If user select any action by clicking on "button".  page index should not be changed because we want item value for checked items.
But if user select "cancel button" then page index should be changed.

How to achieve this functionality in C#?

Thanks,
Dipal

Andrey
Telerik team
 answered on 28 Nov 2012
4 answers
1.5K+ views
I have the following grid:
<telerik:RadGrid ID="RadGridAziendeForUser" runat="server" DataSourceID="ObjectDataSourceAziendeUtente" 
                EnableEmbeddedSkins="False" GridLines="None" Skin="MachinaWeb" AllowAutomaticUpdates="True" 
                AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowMultiRowSelection="True" 
                AutoGenerateEditColumn="True"  
                OnItemCommand="RadGridAziendeForUser_ItemCommand"
                <ClientSettings EnablePostBackOnRowClick="True"
                    <Selecting AllowRowSelect="True" /> 
                    <Scrolling EnableVirtualScrollPaging="True" ScrollHeight="200px" /> 
                </ClientSettings> 
                <MasterTableView AutoGenerateColumns="False" DataSourceID="ObjectDataSourceAziendeUtente" 
                    EditMode="InPlace" CommandItemDisplay="Top" DataKeyNames="IdUtente,IdAzienda"
                    <CommandItemTemplate> 
                        <div style="float: left;"
                            <asp:LinkButton Text="Nuova Azienda" ID="Insert" runat="server" CommandName="InitInsert" /> 
                        </div> 
                    </CommandItemTemplate> 
                    <RowIndicatorColumn> 
                        <HeaderStyle Width="20px" /> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px" /> 
                    </ExpandCollapseColumn> 
                    <Columns> 
                        <telerik:GridBoundColumn DataField="IdUtente" DataType="System.Int64" HeaderText="IdUtente" 
                            ReadOnly="True" SortExpression="IdUtente" UniqueName="IdUtente" Visible="false"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="IdUtenteAsp" HeaderText="IdUtenteAsp" SortExpression="IdUtenteAsp" 
                            UniqueName="IdUtenteAsp" DataType="System.Guid" Visible="false"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="UserName" HeaderText="UserName" ReadOnly="True" 
                            SortExpression="UserName" UniqueName="UserName" Visible="false"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="IdCultura" DataType="System.Int64" HeaderText="IdCultura" 
                            ReadOnly="True" SortExpression="IdCultura" UniqueName="IdCultura" Visible="false"
                        </telerik:GridBoundColumn> 
                        <telerik:GridTemplateColumn> 
                            <HeaderTemplate> 
                                <asp:Label ID="Label46" runat="server" Text="Azienda"></asp:Label> 
                            </HeaderTemplate> 
                            <EditItemTemplate> 
                                <telerik:RadComboBox ID="AziendaRadComboBox" runat="server" DataSourceID="ObjectDataSourceAzienda" 
                                    DataTextField="NomeAzienda" DataValueField="IdAzienda" SelectedValue='<%# Bind("IdAzienda") %>' 
                                    Width="120px" /> 
                            </EditItemTemplate> 
                            <ItemTemplate> 
                                <asp:Label ID="Label47" runat="server" Width="120px" Text='<%# Bind("Azienda") %>'></asp:Label> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridTemplateColumn> 
                            <HeaderTemplate> 
                                <asp:Label ID="Label48" runat="server" Text="Cultura"></asp:Label> 
                            </HeaderTemplate> 
                            <EditItemTemplate> 
                                <telerik:RadComboBox ID="CulturaRadComboBox" runat="server" DataSourceID="ObjectDataSourceCultura" 
                                    DataTextField="Cultura" DataValueField="IdCultura" SelectedValue='<%# Bind("IdCultura") %>' 
                                    Width="70px" /> 
                            </EditItemTemplate> 
                            <ItemTemplate> 
                                <asp:Label ID="Label50" runat="server" Width="70px" Text='<%# Bind("Cultura") %>'></asp:Label> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridTemplateColumn> 
                            <HeaderTemplate> 
                                <asp:Label ID="Label49" runat="server" Text="Gruppo"></asp:Label> 
                            </HeaderTemplate> 
                            <EditItemTemplate> 
                                <telerik:RadComboBox ID="GruppoRadComboBox" runat="server" DataSourceID="ObjectDataSourceGruppoUtente" 
                                    DataTextField="Nome" DataValueField="IdGruppoUtente" SelectedValue='<%# Bind("IdGruppo") %>' 
                                    Width="120px" /> 
                            </EditItemTemplate> 
                            <ItemTemplate> 
                                <asp:Label ID="Label51" runat="server" Text='<%# Bind("Gruppo") %>'></asp:Label> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridTemplateColumn> 
                            <HeaderTemplate> 
                                <asp:Label ID="Label52" runat="server" Text="Stabilimento"></asp:Label> 
                            </HeaderTemplate> 
                            <EditItemTemplate> 
                                <telerik:RadComboBox ID="StabilimentoRadComboBox" runat="server" DataSourceID="ObjectDataSourceStabilimento" 
                                    DataTextField="Denominazione" DataValueField="IdStabilimento" SelectedValue='<%# Bind("IdStabilimento") %>' 
                                    Width="120px" /> 
                            </EditItemTemplate> 
                            <ItemTemplate> 
                                <asp:Label ID="Label53" runat="server" Text='<%# Bind("Stabilimento") %>'></asp:Label> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridTemplateColumn> 
                            <HeaderTemplate> 
                                <asp:Label ID="Label54" runat="server" Text="Reparto"></asp:Label> 
                            </HeaderTemplate> 
                            <EditItemTemplate> 
                                <telerik:RadComboBox ID="RepartoRadComboBox" runat="server" DataSourceID="ObjectDataSourceReparto" 
                                    DataTextField="Reparto" DataValueField="IdReparto" SelectedValue='<%# Bind("IdReparto") %>' 
                                    Width="120px" /> 
                            </EditItemTemplate> 
                            <ItemTemplate> 
                                <asp:Label ID="Label55" runat="server" Text='<%# Bind("Settore") %>'></asp:Label> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" 
                            ConfirmText="Do you really want to delete the selected row?" /> 
                    </Columns> 
                    <EditFormSettings> 
                        <EditColumn> 
                        </EditColumn> 
                    </EditFormSettings> 
                </MasterTableView><FilterMenu EnableEmbeddedSkins="False"
                </FilterMenu> 
                <HeaderContextMenu EnableEmbeddedSkins="False"
                </HeaderContextMenu> 
            </telerik:RadGrid> 

I want to access by code the GridTemplateColumn's HeaderTemplate Labels (for example "Label46") to change the Text property. How can I do this in C#?

Thanks.
Carlos
Top achievements
Rank 2
 answered on 28 Nov 2012
1 answer
165 views
How can i disable autocomplete option in raddatepicker? 
Shinu
Top achievements
Rank 2
 answered on 28 Nov 2012
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?