Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
146 views
I added a combobox to a dataform:

<telerik:RadComboBox ID="StatusCombo" runat ="server"  SelectedValue='<%# Eval("OrganisationStatusID")%>' DropDownAutoWidth ="Enabled"  AutoPostBack ="true"   ValueType="System.Int32" Skin="<%#Container.OwnerDataForm.Skin %>" OnItemsRequested ="StatusCombo_ItemsRequested"></telerik:RadComboBox>

However the StatusCombo_ItemsRequested event  does not fire?!

Tried this:

Private Sub MainDataForm_ItemEditing(sender As Object, e As RadDataFormCommandEventArgs) Handles MainDataForm.ItemEditing
        Dim cb As RadComboBox = MainDataForm.FindControl("StatusCombo")

The event fires, but it never finds the combobox.

Are there any samples on how to reference/ databind controls (like a listbox or combobox)  contained in the edit/insert templates of the dataform ?





Vasil
Telerik team
 answered on 19 Nov 2014
1 answer
76 views
I am using Telerik RadGrid (v4.0.30319) and I have a dataset with about 171 columns and approximately 63K records. When I export these records to excel 2010, I get an error "Exception of type 'System.OutOfMemoryException' was thrown." How can I go about exporting such a large file to excel?  

My code is :  

if (e.Button.Text == "Export")
{
    if (SessionVars.ReportID > 0)
    {
        Report rpt = new Report(SessionVars.ReportID);
        foreach (GridColumn c in GridReportData.MasterTableView.Columns)
            c.HeaderStyle.Width = Unit.Empty;
 
        GridReportData.ExportSettings.HideStructureColumns = true;
        GridReportData.ExportSettings.FileName = Gridrpt.Report_Name;
 
        try
        {
            GridReportData.MasterTableView.ExportToExcel();
        }
        catch (System.OutOfMemoryException ex)
        {
            RadWindowManager.RadAlert("Report failed to export.",null, null, "Export Error", "ErrorAlert");
        }
 
        RadAjaxManager1.EnableAJAX = true;
    }
}

Kostadin
Telerik team
 answered on 19 Nov 2014
1 answer
81 views
Can you please direct me to documentation about referencing rows and columns and data and checkbox state, and values in textboxes in template columns in grids from events that do not have access to GridItemEventArgs? For instance, in a textChanged event, There is only EventArgs, so e.Item is not valid. How do I do this?
Konstantin Dikov
Telerik team
 answered on 19 Nov 2014
4 answers
231 views
I have a radgrid inside an usercontrol. I use this usercontrol for using grid on my website. I add columns dynamically from code-behind based on
my requirement of the page. I used to set UseStaticHeaders to true. Everything was working fine but I had some alignment issue with gridlines.
After searching telerik support forum I got a solution that if I set UseStaticHeaders to false then the problem will be fixed. And the problem
got fixed in my website as well. But after setting UseStaticHeaders to false the grid height is set based on the row count. When there is more data
then the grid height increases and when there is no data grid height is minimum. I want to keep the grid height constant for a certain page.
Any solution? I need help badly.
Venelin
Telerik team
 answered on 19 Nov 2014
1 answer
89 views
Please check the example here http://demos.telerik.com/aspnet-ajax/panelbar/examples/functionality/rendermode/defaultcs.aspx?isNew=true in BlackMetroTouch skin

The 1-level items in classic mode has a circle around arrow up/down, however it has been dropped in the lightweight mode. Any reason why? Could you preserve the item rendering in the lightweight mode?
Aneliya Petkova
Telerik team
 answered on 19 Nov 2014
20 answers
489 views
Hi Telerik,

I have AsyncUpload on my page, and I have a very complex validation on the page - this is where server-side validation is used.

When the user does not fill in all mandatory fields / fulfil the submission criteria, error messages will be shown on the page.
At this time, the AsyncUpload control do not keep the earlier uploaded document anymore. 
I believe it was because the PostbackTriggers set to btnSubmit, and the client state is lost.

<telerik:RadAsyncUpload id="RadUpload1" runat="server" PostbackTriggers="btnSubmit" />

Is there anyway for me to preserve the AsyncUpload client state in the server-side?
For example, in the below code, as soon as I have detected that the "IsIdeaValid" is false, I will preserve the AsyncUpload client state.
Please advice.

protected void btnSubmit_Click(object sender, EventArgs e)
        {         
            ErrorMessage = "";
            if(!IsIdeaValid())
                return;
Andy
Top achievements
Rank 1
 answered on 19 Nov 2014
2 answers
155 views
I have one textbox and a check box in a grid. In the TextChanged server event I have some code that executes. When done with that code I need the cursor to go to the next textbox. As it is, it goes back to the textbox for the first record in the grid. Is it possible to make the cursor go to the textbox in the next record when tab or enter is pressed? The textbox is Amount Approved. 

<telerik:RadGrid ID="gridFundingBills" runat="server" Width="1110px" AllowMultiRowSelection="True"
                AutoGenerateColumns="False"
                OnNeedDataSource="gridFundingBills_NeedDataSource"
                OnItemDataBound="gridFundingBills_ItemDataBound"
                OnItemCreated="gridFundingBills_ItemCreated"
                SelectedItemStyle-CssClass="selectedrow"
                GridLines="None" >
                <MasterTableView DataKeyNames="FundingDtlID,SourceBankAcctID,RemainingAmt" EditMode="InPlace" Width="1090px"
                    NoMasterRecordsText="There are no open funding bills at this time">
                    <Columns>
                        <telerik:GridBoundColumn DataField="CustomerNm" FilterControlAltText="Filter CustomerNm column" HeaderText="Property" SortExpression="CustomerNm" UniqueName="CustomerNm" ItemStyle-Width="100px" HeaderStyle-Width="125px" HeaderStyle-HorizontalAlign="Left">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="VendorNm" FilterControlAltText="Filter VendorNm column" HeaderText="Vendor" SortExpression="VendorNm" UniqueName="VendorNm" ItemStyle-Width="150px" HeaderStyle-Width="150px" HeaderStyle-HorizontalAlign="Left">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="BankAcct" FilterControlAltText="Filter BankAcct column" HeaderText="Bank" ReadOnly="True" SortExpression="BankAcct" UniqueName="BankAcct" ItemStyle-Width="125px" HeaderStyle-Width="125px" HeaderStyle-HorizontalAlign="Left">
                        </telerik:GridBoundColumn>
                        <telerik:GridHyperLinkColumn UniqueName="BillNo" HeaderText="Bill Reference #" DataTextField="BillNo" DataNavigateUrlFields="BillUrl" DataNavigateUrlFormatString="http://{0}" Target="_blank" ItemStyle-Width="175px" HeaderStyle-Width="150px">
                        </telerik:GridHyperLinkColumn>
                        <telerik:GridBoundColumn DataField="BillURL" FilterControlAltText="Filter BillURL column" ReadOnly="True" SortExpression="BillURL" UniqueName="BillURL" Visible="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="BillPeriod" FilterControlAltText="Filter BillPeriod column" HeaderText="Bill Period" ReadOnly="True" SortExpression="BillPeriod" UniqueName="BillPeriod" ItemStyle-Width="125px" HeaderStyle-Width="125px" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="DueDt" DataType="System.DateTime" FilterControlAltText="Filter DueDt column" HeaderText="Due Date" SortExpression="DueDt" UniqueName="DueDt" DataFormatString="{0:d}" ItemStyle-Width="75px" HeaderStyle-Width="75px">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="TotalAmt" DataType="System.Decimal" FilterControlAltText="Filter TotalAmt column" HeaderText="TotalAmt" SortExpression="Total Due" UniqueName="TotalAmt" DataFormatString="{0:F}" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" HeaderStyle-Width="60px">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="RemainingAmt" DataType="System.Decimal" FilterControlAltText="Filter RemainingAmt column" HeaderText="Remaining Balance" ReadOnly="True" SortExpression="RemainingAmt" UniqueName="RemainingAmt" DataFormatString="{0:F}" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" HeaderStyle-Width="60px">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="FundingDtlID" DataType="System.Guid" FilterControlAltText="Filter FundingDtlID column" HeaderText="FundingDtlID" ReadOnly="True" SortExpression="FundingDtlID" UniqueName="FundingDtlID" Visible="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="SourceBankAcctID" DataType="System.Guid" FilterControlAltText="Filter BankAcctID column" HeaderText="BankAcctID" ReadOnly="True" SortExpression="BankAcctID" UniqueName="BankAcctID" Visible="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn HeaderText="Amount Approved" UniqueName="AmtApproved" HeaderStyle-Width="70px"
                            ItemStyle-Width="70px" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right">
                            <ItemTemplate>
                                <asp:TextBox ID="AmountApproved" runat="server" Width="55px" OnTextChanged="AmountApproved_TextChanged"
                                    AutoPostBack="true" CssClass="numericAlign"></asp:TextBox>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="50px" ItemStyle-Width="50px">
                        </telerik:GridClientSelectColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true">
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" ScrollHeight="300px"></Scrolling>
                    <ClientEvents OnRowSelected="handleTextBoxValue" OnRowDeselected="handleTextBoxValue" OnActiveRowChanged="sumAmtApproved" />
                    <Selecting AllowRowSelect="true" UseClientSelectColumnOnly="true" />
                    
                </ClientSettings>
            </telerik:RadGrid>

 protected void AmountApproved_TextChanged(object sender, EventArgs e)
    {
        //code to update values, 
        UpdateBalances();
        //need to tab to AmountApproved in next record
    }
Konstantin Dikov
Telerik team
 answered on 19 Nov 2014
0 answers
103 views
Our customer has a web application developed in VS 2008.  Developed in VB.net and has Telerik controls.  What are the steps involved in migrating this to VS 2012.

Thanks in advance for any suggestions.

Pramod
Pramod
Top achievements
Rank 1
 asked on 19 Nov 2014
1 answer
86 views
I am using the editor as a textbox and want to use a button outside the editor to fire it's paste command.
The function below works to insert text but what I am trying to do is paste a screenshot from the clipboard into the editor using IE 11 clipboardData.

function Paste() {

var editor = $find("<%=RadEditor1.ClientID%>");
//var clipBoardData = window.clipboardData.getData("URL");
editor.setFocus();
editor.pasteHtml("1234");
}

Using the editor's paste button works for this but I am trying to use the editor to load the screenshot and as a large preview textbox before saving it.

when I hide the toolbar if you put the cursor in the editor and do a ctrl - v it does paste the screenshot but if you right click there is no paste option.

I am trying to have a paste button outside the editor to make it more intuitive for the users.


Thanks in advance,
Dave
Ianko
Telerik team
 answered on 19 Nov 2014
1 answer
72 views
I have a radgrid where I hide the expand column using the code mentioned in the link below.
http://www.telerik.com/help/aspnet-ajax/grid-hide-expand-collapse-images-when-no-records-in-self-referencing-hierarchy.html

This works fine and hide the expand button correctly.
The problem arises when I move the columns.
On moving a column to a different position the grid reloads and then the Expand button appears.

Why is this happening? How can i solve the issue.
One strange thing I have observered is that on moving the columns around the page postback and the grid_PreRender event fires before the grid_NeedDataSource. I think PreRender event should fire after NeedDataSource event. Can this be the cause of this issue? How can I solve it?
Kostadin
Telerik team
 answered on 19 Nov 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?