Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
419 views
I have a RadGrid control that has been created dynamically and added to the page.

I have enabled paging for it by setting AllowPaging = true.

I have also set the EnableViewState = true for both RadGrid and its MasterTableView.

I've read this page and am using NeedDataSource event already.

Now, Next Page button works fine and I can see that RadGrid_PageIndexChanged event is raised.

However, when I click the Previous Page button, it doesn't work and indeed the RadGrid_PageIndexChanged event is not raised at all!

Why? How to fix this?

Thanks,
Pavlina
Telerik team
 answered on 25 Jul 2012
3 answers
174 views

Dear All,
I am developing product in asp.net using c sharp and I have listbox in my page and i have list items in Listbox which is added staticaly here i need to insert value against partcular listbox item and i have listbox items namely List1,List2,List3,...List10.and also i have one TextBox to insert values.

but here should follow sequencing order for example does not allow inserting List3 value when not inserted List2 value .. how to control this scenario.

my aspx code is,


<telerik:RadListBox ID="radlstExtensionFields" runat="server" Width="400" AutoPostBack="true"
                       OnSelectedIndexChanged="radlstExtensionFields_SelectedIndexChanged">
                       <Items>
                           <telerik:RadListBoxItem Text="List1" runat="server" Value="0" />
                           <telerik:RadListBoxItem Text="List2" runat="server" Value="1" />
                           <telerik:RadListBoxItem Text="List3" runat="server" Value="2" />
                           <telerik:RadListBoxItem Text="List4" runat="server" Value="3" />
                           <telerik:RadListBoxItem Text="List5" runat="server" Value="4" />
                           <telerik:RadListBoxItem Text="List6" runat="server" Value="5" />
                           <telerik:RadListBoxItem Text="List7" runat="server" Value="6" />
                           <telerik:RadListBoxItem Text="List8" runat="server" Value="7" />
                           <telerik:RadListBoxItem Text="List9" runat="server" Value="8" />
                           <telerik:RadListBoxItem Text="List10" runat="server" Value="9" />
                       </Items>
                   </telerik:RadListBox>
Bozhidar
Telerik team
 answered on 25 Jul 2012
1 answer
100 views
Hello everybody,
i'd like to show a RadAjaxLoadingPanel (called via JS) over an java applet.
Unfortunately, the applet hides the LoadingPanel.
I tried to change the z-index but, it doesn't work.

For other controls in this case there is the overlay-property but the RadAjaxLoadingPanel doesn't support it.
Is there any way to show the RadAjaxLoadingPanel over an java applet?

Best Regards,
Marcel

Galin
Telerik team
 answered on 25 Jul 2012
2 answers
100 views
Hey Guys,
I have a radGrid bound to an object data source declaratively.  That source looks at a search box and a category dropdown for search parameters.  The search button calls a rebind.  Everything works great.

Until I turn grouping on.  The grouping works great on first page load, but on subsequent search button postbacks and therefore rebind() calls, there are no records found, even though that search works ok with grouping off.

Anyone know why this might be ?  Find my page below:

<fieldset>
        <legend>Search Help Centre</legend>
        <ul>
            <li>
                <label for="tbSearchText">Search text</label>
                <asp:TextBox ID="tbSearchText" runat="server" />
            </li>
            <li>
                <label for="catSelector">Category</label>
                <ah:CategorySelector ID="catSelector" runat="server" CategoryParentCat="Faq" InsertEmpty="All" />
            </li>
            <li> :</li>
            <li><label for="btnSearch"> </label><telerik:RadButton ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" /></li>
        </ul>
    </fieldset>
 
    <telerik:RadGrid ID="rgFaq" runat="server" DataSourceID="objFaq" GroupingEnabled="true" OnItemDataBound="rgFaq_ItemDataBound" AllowPaging="True" PageSize="200" AllowSorting="False" AutoGenerateColumns="False">
        <MasterTableView DataKeyNames="kbId" ShowHeader="false">
            <GroupByExpressions>
                <telerik:GridGroupByExpression>
                    <GroupByFields>
                        <telerik:GridGroupByField FieldName="CategoryId" />
                    </GroupByFields>
                </telerik:GridGroupByExpression>
            </GroupByExpressions>
            <Columns>
                <telerik:GridTemplateColumn>
                    <ItemTemplate>
                        <%#Eval("kbTitle") %>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
         
    <asp:ObjectDataSource ID="objFaq" EnablePaging="true" SelectMethod="SearchFaqList" SelectCountMethod="SearchFaqList_Count" runat="server" TypeName="ArtsHub.BLL.Faq.Faq">
        <SelectParameters>
            <asp:ControlParameter ControlID="tbSearchText" DefaultValue="" Name="searchText" Type="String" ConvertEmptyStringToNull="false" />
            <asp:ControlParameter ControlID="catSelector" PropertyName="SelectedCategoryId" Name="CategoryId" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
protected void btnSearch_Click(object sender, EventArgs e)
{
    rgFaq.DataBind();
}
 
protected void rgFaq_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridGroupHeaderItem)
    {
        GridGroupHeaderItem item = (GridGroupHeaderItem)e.Item;
        DataRowView groupDataRow = (DataRowView)e.Item.DataItem;
        item.DataCell.Text = groupDataRow["CategoryId"].ToString();
    }
}


Thanks for any help.
Simon
Top achievements
Rank 1
 answered on 25 Jul 2012
1 answer
481 views
Hi,

I have a grid in which I have a single details table. I have set the HierarchyLoadMode="Client".
In my details table I have other columns along with two GridTemplate columns, whose Itemtemplate contains RadNumeric textboxes.
For the Grid in CommandItem I ahve a RadToolBar in which I have a "Save" button.

On the "Save" button click on the server side I want to access all the column values along with the two rad numeric text box values for the DeatilsTable, in the code behind.

Please tell me how to do so. This is what I have defined for the grid

<telerik:RadGrid ID="rgBrokerageSettlements" runat="server" AutoGenerateColumns="False"
            BorderStyle="None" Width="100%" EnableLinqExpressions="false" OnNeedDataSource="rgBrokerageSettlements_NeedDataSource"
            OnItemCommand="rgBrokerageSettlements_ItemCommand"
            OnDetailTableDataBind="rgBrokerageSettlements_DetailTableDataBind">
            <MasterTableView DataKeyNames="SettlementHeaderSK" ClientDataKeyNames="SettlementHeaderSK"
                Name="rgBrokerageSettlementsMasterTable" HierarchyLoadMode="Client" AllowSorting="false"
                PagerStyle-Mode="NextPrevAndNumeric" EditMode="InPlace" TableLayout="Fixed" CommandItemDisplay="Top">
                <CommandItemTemplate>
                    <telerik:RadToolBar ID="rtbBrokerageSettlements" runat="server" Width="100%" OnButtonClick="rtbBrokerageSettlements_ButtonClick"
                        OnClientButtonClicking="rgBrokerageSettlements_OnClientButtonClicking">
                        <Items>
                            <telerik:RadToolBarButton Text="Save" ImageUrl="~/Images/save.png" Value="Save" CommandName="Save" />
                        </Items>
                    </telerik:RadToolBar>
                </CommandItemTemplate>
                <Columns>
                    <telerik:GridClientSelectColumn UniqueName="Select" HeaderStyle-Width="25px" ItemStyle-HorizontalAlign="Center"
                        HeaderStyle-HorizontalAlign="Center" />
                    <telerik:GridBoundColumn UniqueName="Document" DataField="Document" HeaderText="Document"
                        DataType="System.String">
                        <HeaderStyle Width="70px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn DataField="DocDate" HeaderText="Doc Date" UniqueName="DocDate"
                        DataType="System.String" SortExpression="DocDate" HeaderStyle-Width="70px">
                        <ItemTemplate>
                            <asp:Label ID="lblDocDate" runat="server" Text='<%# Eval("DocDate") %>' />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>                   
                </Columns>
                <DetailTables>
                    <telerik:GridTableView Name="rgBrokerageSettlementsDetail" AllowFilteringByColumn="False"
                        EnableHeaderContextMenu="false">
                        <Columns>
                            <telerik:GridBoundColumn UniqueName="ItemAndDescription" DataField="ItemAndDescription"
                                HeaderText="Item" DataType="System.String">
                                <HeaderStyle Width="125px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="ItemAmt" DataField="ItemAmt" HeaderText="Item Amount"
                                DataType="System.String">
                                <HeaderStyle Width="125px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="ProgramAmt" DataField="ProgramAmt" HeaderText="Program Amt"
                                DataType="System.String">
                                <HeaderStyle Width="125px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="UnpaidAmt" DataField="UnpaidAmt" HeaderText="Unpaid Amt"
                                DataType="System.String">
                                <HeaderStyle Width="125px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn DataField="" HeaderText="Approved Amt" UniqueName="ApprovedAmt"
                                DataType="System.String" SortExpression="" HeaderStyle-Width="70px">
                                <ItemTemplate>
                                    <telerik:RadNumericTextBox ID="radnumtxtbxApprovedAmtDetailsGrid" runat="server"
                                        Width="80px" NumberFormat-NegativePattern="$ -n" NumberFormat-PositivePattern="$ n"
                                        IncrementSettings-InterceptArrowKeys="false">
                                        <ClientEvents OnBlur="radnumtxtbxApprovedAmtDetailsGrid_OnBlur" />
                                    </telerik:RadNumericTextBox>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn DataField="" HeaderText="Write off Amt" UniqueName="WriteOffAmt"
                                DataType="System.String" SortExpression="" HeaderStyle-Width="70px">
                                <ItemTemplate>
                                    <telerik:RadNumericTextBox ID="radnumtxtbxWriteOffAmtDetailsGrid" runat="server"
                                        Width="80px" NumberFormat-NegativePattern="$ -n" NumberFormat-PositivePattern="$ n"
                                        IncrementSettings-InterceptArrowKeys="false">
                                        <ClientEvents OnBlur="radnumtxtbxWriteOffAmtDetailsGrid_OnBlur" />
                                    </telerik:RadNumericTextBox>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn UniqueName="" DataField="" HeaderText="Remaining Amt" DataType="System.String">
                                <HeaderStyle Width="125px" />
                            </telerik:GridBoundColumn>
                        </Columns>
                    </telerik:GridTableView>
                </DetailTables>
            </MasterTableView>
            <ClientSettings AllowExpandCollapse="true">
                <Selecting AllowRowSelect="true" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                <ClientEvents OnRowSelected="rgBrokerageSettlements_RowSelected" OnRowDeselected="rgBrokerageSettlements_RowDeselected"
                    OnGridCreated="ResizeGrid" OnHierarchyExpanding="rgBrokerageSettlements_OnHierarchyExpanding"
                    OnRowSelecting="rgBrokerageSettlements_RowSelecting" />
            </ClientSettings>
        </telerik:RadGrid>
Marin
Telerik team
 answered on 25 Jul 2012
1 answer
111 views
From my searching around, I can't seem to find a definitive answer to this. I want my user-defined method to run once after the Upload button is clicked.

The FileExplorer ItemCommand event executes with ever file selected (I have EnableAsyncUpload as True). ItemCommand would cause my user-defined method to run per uploaded file, when I only want the method to run after the final upload.

I tried to keep track of RadFileExplor1.Upload.UploadedFiles.Count, thinking I could execute my method when MyCount == UploadedFiles.Count. The UploadedFiles.Count returns zero (0) on the Page_Load event (when the page is initially opened), but when Page_Load runs again on a postback (after clicking the Upload button), UploadedFiles.Count always throws a null exception.

So how do I get my method to run once immediately after the Upload button is clicked?

Thank You,
Steven
Princy
Top achievements
Rank 2
 answered on 25 Jul 2012
7 answers
289 views
1) I export radgrid to PDF fine but one column is not wide enough in PDF output. How can I increase the column size before it actually exports the data to PDF?

2) One column's values are shown as hyperlink in PDF as well as in Excel. How can I tell it to export the values as text as opposed to links when exporting the radgrid to PDF and to Excel?

Thank you.
Shinu
Top achievements
Rank 2
 answered on 25 Jul 2012
3 answers
95 views
http://www.trirand.net/demoaspnetmvc.aspx - in the 'ship name' column. It has a nice auto complete filter which I can't see in the RadControls demos, the closest I found were: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/filteringcombo/defaultcs.aspx
Shinu
Top achievements
Rank 2
 answered on 25 Jul 2012
1 answer
104 views
Hi
We need to add an extra column to Scheduler and in that column to display the week number and some other data: http://screencast.com/t/QB0pLhgL - check yellow square
What is the best way of doing this?
For the moment we tried creating a separate table and to align (glue it) to the scheduler table, but is a bit trickier than expected.
Any help is appreciated.
Ivana
Telerik team
 answered on 24 Jul 2012
2 answers
215 views
I have created a number of controls that inherit from standard web controls.  I pass data from the server to the client by doing a MyWebControl.Attributes.Add("Name","Value"), then on the client, I do a MyControl.getAttribute("Name") to get the value.

This doesn't work for the RadEditor.  Is there a similar mechanism I can use to do this with the RadEditor?  What about other RadControls?

Thank you.
LeBear
Top achievements
Rank 1
 answered on 24 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?