Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
300 views

Hello,

I am using DeleteCommand of radGrid to delete items from grid. Item gets removed on deletion but paging does not getting refreshed. Initailally my grid was containing 2 pages. I deleted all items from second page, still pager shows 2 page count.

Here is the code,

<

 

telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True"

 

 

AllowSorting="True" AutoGenerateColumns="False" GridLines="Vertical" OnNeedDataSource="RadGrid1_NeedDataSource"

 

 

OnItemDataBound="RadGrid1_ItemDataBound" Skin="WebBlue" AllowMultiRowEdit="True"

 

 

OnDeleteCommand="RadGrid1_DeleteCommand" OnUpdateCommand="RadGrid1_UpdateCommand"

 

 

OnItemCreated="RadGrid1_ItemCreated" Width="1200px" AutoGenerateEditColumn="True"

 

 

OnItemCommand="RadGrid1_ItemCommand" AllowMultiRowSelection="True" AutoGenerateDeleteColumn="True"

 

 

PageSize="22" AllowAutomaticDeletes="True" OnPageIndexChanged="RadGrid1_PageIndexChanged">

 

 

<ExportSettings ExportOnlyData="True" IgnorePaging="True" OpenInNewWindow="True">

 

 

 

<Pdf AllowAdd="false" AllowCopy="true" AllowModify="true" AllowPrinting="true" Author="Anonymous"

 

 

Keywords="None" PageBottomMargin="1in" PageLeftMargin="10px" PageRightMargin="10px"

 

 

PageTopMargin="1in" PageTitle="Admin Report" Subject="RadGrid Export" Title="RadGrid export"

 

 

PaperSize="A4" PageWidth="800px" />

 

 

</ExportSettings>

 

 

<PagerStyle HorizontalAlign="Left" Mode="Slider" />

 

 

<MasterTableView DataKeyNames="Fadder_ID,Referance_Id">

 

 

<RowIndicatorColumn Visible="False">

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn Visible="False" Resizable="False">

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</ExpandCollapseColumn>

 

 

<Columns>

 

 

<telerik:GridTemplateColumn UniqueName="Template1" HeaderText="ID" AllowFiltering="false">

 

 

<HeaderStyle HorizontalAlign="Center" Width="20px" />

 

 

<ItemTemplate>

 

<%# this.RadGrid1.CurrentPageIndex * this.RadGrid1.PageSize + Container.ItemIndex + 1%>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridBoundColumn DataField="Name" HeaderText="Avsender" UniqueName="FedderName"

 

 

ReadOnly="True">

 

 

<HeaderStyle HorizontalAlign="Center" Width="150px" />

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

</telerik:GridBoundColumn>

 

</

 

Columns>

 

 

 

 

 

<EditFormSettings>

 

 

 

 

 

<PopUpSettings ScrollBars="None"></PopUpSettings>

 

 

 

 

 

</EditFormSettings>

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

<GroupingSettings CaseSensitive="False" />

 

 

 

 

 

</telerik:RadGrid>

 

Iana Tsolova
Telerik team
 answered on 20 Aug 2010
1 answer
111 views
Hello,

i have created a radgrid with pivoted data as described Displaying pivot data in the telerik help. I like the first column to have a width of 15%. All other columns (max 5 other columns) should have the same width. I tried to set the width of the columns in the autogeneratedcolumns array of the mastertableview but no luck (columncreated and prerender event).

Is there a way to do this? I attached a screenshot with the problem.

Bye
Pavlina
Telerik team
 answered on 20 Aug 2010
1 answer
101 views
Hi,

I have a little problem.
When I select an item and click the "expand" arrow of an other panel item, the previous item stays selected.
This is OK so far.

But - and here comes my problem - if the user "misses" the arrow and click the header instead, the selected item is lost (unselected).
The rest works as expected - so clicking the header expands / collapses the panel - like a click on the arrow.

Is it possible to expand the "arrow functionality" (expand collapse without "deselecting") to the whole header?
By the way - I don't even need the arrows - most users hate to "fiddle" with these little parts - they just click the header.

Manfred
Nikolay Tsenkov
Telerik team
 answered on 20 Aug 2010
11 answers
173 views
I am working on Rad Spell checker (asp.net ajax),
I am facing problem to implement the following scenario.

Scenario:
Need to create a custom dictionary for doctors. Client can add/Edit/delete words on that dictionary. And when spelling is checked, Suggestion should display words from the custom dictionary not from the default dictionary.

Regards
Animesh Chandra Dey
Rumen
Telerik team
 answered on 20 Aug 2010
3 answers
216 views
Hi,

I have a radpane that is not collapsing when I click on its splitbar that has its collapsemode set to 'Both'. If I click on the arrow to expand it does this no problem, however if I click on the arrow to collapse the arrow just flashes.

Any ideas please anyone as what may cause this?

Regards,

Ian W
Ian Wells
Top achievements
Rank 1
 answered on 20 Aug 2010
2 answers
76 views
I want to show the page number and total number of records if there is only one page like below:

----------------------------------------------------------------------------------
.....
----------------------------------------------------------------------------------
[1]                                                  Page 1 of 1, item 1 to 10 of 10
----------------------------------------------------------------------------------

What radGrid's attribute should I set up?

Thanks
Brew
Brew Hutch
Top achievements
Rank 1
 answered on 20 Aug 2010
1 answer
191 views
I can find information relating to "batch update", but what I'd like to do is have a grid where the user inputs a number of rows which are displayed client-side (possibly with calculated fields and footers), possibly edited, then input to the database in one go with a button click.

Is there any "help" or "how to" for this?

Thanks
John
Iana Tsolova
Telerik team
 answered on 20 Aug 2010
2 answers
132 views
I hate having to ask this as I am sure it is something simple, but I wanted to post it while I continue to look for the answer.

I am using inlione edit on my grid, and have a Command Item Bar to allow adding a new row to the grid.

The problem I am having is that after hittiing the 'PerformInsert' and rebinding to the grid, the new row still shows at the bottom of the grid.  

How can I make it go away once i hit 'Save' and rebind to the grid?

protected void rgACWF1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
    GridEditableItem editedItem;
    switch (e.CommandName)
    {
        case "Update":
            editedItem = (GridEditableItem) rgACWF1.EditItems[0];
            UpateACWFValue(editedItem, e);
            break;
        case "PerformInsert":
            editedItem = rgACWF1.MasterTableView.GetInsertItem();                    
            orgManager.SaveACWF1Value(AddACWFValue(editedItem, e));                                        
            break;
        case "Delete":
            editedItem = (GridDataItem) e.Item;
            Guid acwfValueID = new Guid(editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["ID"].ToString());
            orgManager.DeleteAssetCriticalityWeightingFactorValue(acwfValueID);
            break;
    }

    rgACWF1.Rebind();
}
Clint Leonard
Top achievements
Rank 1
 answered on 20 Aug 2010
10 answers
163 views
Hi,

I´ve seen the filter grid by combobox demo and I´m wondering if this functionality can be applied with some of the other controls such as menu, tabstrip, toolbar etc.? I have kind of a "Northwind - Category/products" relationship and I was hoping to have an easy way of populating a menu with the categories and with a click on the menu filter my grid with products.

If any one have some ideas or links to video´s or forum post´s, just let me know.

Thanks
Johnny
Johnny
Top achievements
Rank 1
 answered on 20 Aug 2010
3 answers
330 views
I have a web user control which contains a Repeater control inside a RadAjaxPanel.  The Repeater control has an ItemTemplate which contains several table columns, one of which is a RadNumericTextBox.

What I want to happen is, when the user changes the value in the RadNumericTextBox it should via Ajax refresh the Repeater control.  What is actually happening is a full page-postback.

Here is the ascx code:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ShoppingBasketPanel.ascx.cs" Inherits="myapp.Controls.ShoppingBasketPanel" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<div>
    <div style="margin-top:10px; clear:both;">
          
    </div>
    <div style="width: 600px; margin: auto;">
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="600px" EnableAJAX="true"
            LoadingPanelID="RadAjaxLoadingPanel1" EnablePageHeadUpdate="True"
            HorizontalAlign="NotSet">
         
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" />
        <asp:Repeater ID="rptBasket" runat="server" onitemdatabound="rptBasket_ItemDataBound">
            <HeaderTemplate>
                <table style="width: 100%;">
                    <thead>
                        <tr>
                            <th align="left">Quantity</th>
                            <th align="left">Product</th>
                            <th align="right">Item Price</th>
                            <th align="right">Item Total</th>
                            <th> </th>
                            <th> </th>
                        </tr>
                    </thead>
            </HeaderTemplate>
 
            <ItemTemplate>
                <tr>
                    <td align="left"><telerik:RadNumericTextBox ID="txtQuantity" runat="server" MaxLength="3" MinValue="1" MaxValue="999" Width="40px"
                                            DataType="System.Int32" ShowSpinButtons="True" NumberFormat-DecimalDigits="0" AutoPostBack="True"
                                            OnTextChanged="txtQuantity_OnTextChanged" /></td>
                    <td align="left"><asp:Label ID="lblProduct" runat="server" /></td>
                    <td align="right"><asp:Label ID="lblItemPrice" runat="server" /></td>
                    <td align="right"><asp:Label ID="lblTotal" runat="server" /></td>
                    <td><asp:HiddenField ID="hfCode" runat="server" /><asp:HiddenField ID="hfOption" runat="server" /> </td>
                    <td style="margin-left:5px;"><asp:ImageButton ID="imgbRemove" runat="server" ImageUrl="~/Images/delete.png" Width="16" Height="16" /></td>
                </tr>
            </ItemTemplate>
 
            <FooterTemplate>
                    <tfoot>
                        <tr>
                            <td> </td>
                            <td> </td>
                            <td colspan="2" align="right"><strong>Total  </strong><asp:Label ID="lblBasketTotal" runat="server" Text="0" /></td>
                            <td> </td>
                            <td> </td>
                        </tr>
                    </tfoot>
                </table>
            </FooterTemplate>
        </asp:Repeater>
 
        </telerik:RadAjaxPanel>
    </div>
</div>

The txtQuantity_OnTextChanged method does some internal processing and then:

rptBasket.DataSource = CartItems;
rptBasket.DataBind();

The Page_Load method doesn't do anything unless IsPostBack is FALSE.

The aspx page containing the user control has no Ajax on it.  Any assistance much appreciated!
Maria Ilieva
Telerik team
 answered on 20 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?