Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
222 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
83 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
481 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
149 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
100 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
81 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
70 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
3 answers
87 views
I am trying to make the drag and drop from a tree view put the dragged content into the appropriate section of a hierarchical grid (adjacent to the row it was dropped on).

I am capturing the itemIndexHierarchical of a row in the OnRowMouseOver event on the client.  I am saving this in a hidden field so that I can look up the row in some server code (the event handler for the tree view drop event). 

How can I get the row and or dataKeyValues given the itemIndexHierarchical key?  Surely there is a server side call that can do this for me, am I missing something?

Thanks,
Kenny Long
Kenny
Top achievements
Rank 1
 answered on 18 Nov 2014
9 answers
106 views
We have a PanelBar that we would like to add a context menu only to the children (RadPanelItem's) that would allow users to add the link to their favorites (within site).  And if they are within the Favorites Panel item and they right click it would be "Remove link"

The user couldn't click on "Home" to "Add to Favorites" but they could click on "Organization Chart".  Once they linked "Organization Chart" as a favorite, if they right click again it would be "Remove Favorite", as well as if they were under the "Favorites" panel and right clicked. 

Is it possible?
<telerik:RadPanelBar runat="server" ID="RadPanelBar1"
                            ExpandMode="FullExpandedItem"
                            Width="300" PersistStateInCookie="True" Height="100%"
                            OnClientItemExpand="OnClientItemExpand">
                            <Items>
                                <telerik:RadPanelItem Text="HOME" Expanded="True" ImageUrl="images/Menu/Home.png" Visible="true" Font-Bold="true">
                                    <Items>
                                        <telerik:RadPanelItem ImageUrl="images/Menu/Home_OrgChart.png" NavigateUrl="/pdf/OrgChart.pdf" Target="_blank" Text="Organizational Chart"></telerik:RadPanelItem>
                                        <telerik:RadPanelItem ImageUrl="images/Menu/Home_PersonalPolicy.png" NavigateUrl="/pdf/OrgChart.pdf" Target="_blank" Text="Personnel Policy"></telerik:RadPanelItem>
                                        <telerik:RadPanelItem ImageUrl="images/Menu/Home_Phone-16.png" NavigateUrl="/pdf/VoiceMail.pdf" Target="_blank" Text="Voice Mail Reference Sheet"></telerik:RadPanelItem>
                                        </telerik:RadPanelItem>
                                    </Items>
                                </telerik:RadPanelItem>
                                <telerik:RadPanelItem Text="FAVORITES" Expanded="True" ImageUrl="images/Menu/Favorites.png" Visible="false" Font-Bold="true">
 
                                </telerik:RadPanelItem>
                            </Items>
                            <ExpandAnimation Type="OutQuart" />
                            <CollapseAnimation Type="OutQuart" />
                        </telerik:RadPanelBar>
Kurt Kluth
Top achievements
Rank 1
 answered on 18 Nov 2014
1 answer
112 views
I'm writing a page that requires me to upload the file to the Azure for the purposes of keeping an archive.  So I have the upload working but I can't seem to figure out how to access the files.  So I have this to loop through after the upload and attach it to an e-mail notification.

//Attachments
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(ConfigurationManager.AppSettings["StorageConnectionString"].ToString());
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
CloudBlobContainer container = blobClient.GetContainerReference("sitedata");
foreach (Telerik.Web.UI.CloudUploadFileInfo file in RadCloudUpload1.UploadedFiles)
{
CloudBlockBlob blockBlob = container.GetBlockBlobReference(file.KeyName);
Stream mem = new MemoryStream();
blockBlob.DownloadToStream(mem);
MAttach = new System.Net.Mail.Attachment(mem, file.OriginalFileName);
msg.Attachments.Add(MAttach);
}

I'm getting 0k attachments.  Any suggestions or thoughts?

Thanks,

Richard
Hristo Valyavicharski
Telerik team
 answered on 18 Nov 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?