Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
208 views
Hi,

I have a RadGrid wired up to an ObjectDataSource.

When I export with IgnorePaging set to False, it works fine, but only exports the current page of results (20 results).

When I export with IgnorePaging set to True, it exports the column headers, but no results.

How do I get it to return all the results from the ObjectDataSource?

Thanks,

Rob
Ahmed
Top achievements
Rank 1
 answered on 23 Mar 2015
2 answers
104 views
Hi,

I'd like to conditionally format data in a column series.

The demo for this that is in the demos section purports to being conditional formatting but it isn't.  It is actually simple series formatting.(http://demos.telerik.com/aspnet-ajax/htmlchart/examples/functionality/custombarcolor/defaultvb.aspx?show-source=true).  I don't want to have to have two series merged into one or to fiddle with the sql code.

I want to be able to do the following:
Value is above 90 colour the column green
Between 70 and 90 colour it orange
Below 70 colour it red

That is conditional formatting.  I am happy doing it in a data bound type event however there are no samples that I could see for this.  Please could one be generated and added to the demo lists.

Regards

Jon
Jon
Top achievements
Rank 1
 answered on 23 Mar 2015
3 answers
179 views
I have a grid where a user can right click on a row and a popup menu is displayed. Well I don't like right click functionality on a row in a webpage because it's not really standard UI behavior. I want to have the user click a button in the row to then show this same popup dialog.

I'm using a GridButtonColumn with the OnCommand.

So far I've not been able to get access to the get_DomEvent.

You can see in the javascript function I call that when I attempt to show the menu dialog that the "get_DomEvent" is
not a method that is available to me in the eventArgs. Is there some way I can get access to the get_DomEvent after
clicking on a button within the row of the grid?

Here is the code:

ASPX:
<Columns>
                            <telerik:GridTemplateColumn HeaderStyle-Width="5px"><ItemTemplate> </ItemTemplate></telerik:GridTemplateColumn>
                            <telerik:GridHyperLinkColumn HeaderStyle-Width="70px" DataTextField="CustomerNumber" DataNavigateUrlFields="CustomerNumber" DataNavigateUrlFormatString="~\Common\CustomerEdit.aspx?Customer={0}" HeaderText="Cust No." SortExpression="CustomerNumber" UniqueName="CustomerNumber" />
                            <telerik:GridHyperLinkColumn HeaderStyle-Width="300px" DataTextField="CustomerName" DataNavigateUrlFields="CustomerNumber" DataNavigateUrlFormatString="~\Common\CustomerEdit.aspx?Customer={0}" HeaderText="Name" SortExpression="CustomerName" UniqueName="CustomerName" />
                            <telerik:GridBoundColumn HeaderStyle-Width="125px" DataField="Address.City" HeaderText="City" SortExpression="Address.City" UniqueName="City" />
                            <telerik:GridBoundColumn HeaderStyle-Width="125px" DataField="Address.State" HeaderText="State" SortExpression="Address.State" UniqueName="State" />
                            <telerik:GridBoundColumn HeaderStyle-Width="75px" DataField="Address.ZipCode" HeaderText="ZipCode" SortExpression="Address.ZipCode" UniqueName="ZipCode" />
                            <telerik:GridBoundColumn HeaderStyle-Width="55px" DataField="Status" HeaderText="Status" SortExpression="Status" UniqueName="Status" />
                            <telerik:GridHyperLinkColumn HeaderStyle-Width="50px" DataNavigateUrlFields="CustomerNumber" DataNavigateUrlFormatString="~\Common\UserList.aspx?Customer={0}" HeaderText="Show" Text="Users" />
                            <telerik:GridHyperLinkColumn HeaderStyle-Width="50px" DataNavigateUrlFields="CustomerNumber" DataNavigateUrlFormatString="~\Returns\FilingEntityList.aspx?Customer={0}" Text="Entities" />
                            <telerik:GridButtonColumn ButtonType="PushButton" DataTextField="Status"  CommandName="CustomerRadGridUpdateStatusMenu" UniqueName="ChangeStatus" />
                        </Columns>
                        <PagerTemplate>
                            <vtx:GridPager ID="gridPagerControl" AddLabel="Add Customer" OnAddClicked="AddNewCustomerButton_Click" runat="server" />
                        </PagerTemplate>
                    </MasterTableView>
                    <ClientSettings>
                        <ClientEvents OnRowContextMenu="CustomerRadGridRowContextMenu"
                         OnCommand="CustomerRadGridUpdateStatusMenu"
                        />
                        <Selecting AllowRowSelect="True" />
                    </Client

JavaScript:
// Select row prior to context menu appearing
           function CustomerRadGridUpdateStatusMenu(sender, eventArgs)
           {
               // Get row index
               if (eventArgs.get_commandName() == "CustomerRadGridUpdateStatusMenu")
               {
                   var MasterTable = sender.get_masterTableView();
                   var index = eventArgs.get_commandArgument();
                   var row = MasterTable.get_dataItems()[index]; 
               }
 
               // Find row and select it
               sender.set_activeRow(row.get_element());
 
               // Fetch customer number   
               var columnCell =  MasterTable.getCellByColumnUniqueName(row, "CustomerNumber");
                 
 
               $get(clientID + 'customerNumberDisplay').innerHTML = columnCell.innerText;
               $get(clientID + 'customerNumberHidden').value = columnCell.innerText;
 
               // Fetch status
               columnCell = MasterTable.getCellByColumnUniqueName(row, "Status");
 
               $get(clientID + 'status' + columnCell.innerHTML).checked = true;
               $get(clientID + 'statusInactive').disabled = true;
               $get(clientID + 'statusActive').disabled = false;
               $get(clientID + 'statusDisabled').disabled = false;
               $get(clientID + 'statusDeleted').disabled = false;
                
               var menu = $find("<%= gridContextRadMenu.ClientID %>");
 
               if (columnCell.innerHTML == "Inactive")
               {
                   $get(clientID + 'statusActive').disabled = true;
                   $get(clientID + 'statusDisabled').disabled = true;
               }
 
               // Apply security as last option
               if (!allowDelete && !allowDisable)
               {
                   menu.findItemByValue("CS").disable();
               }
               else
               {
                   if (!allowDelete)
                   {
                       $get(clientID + 'statusDeleted').disabled = true;
                   }
 
                   if (!allowDisable)
                   {
                       $get(clientID + 'statusDisabled').disabled = true;
                   }
               }
 
               // Show menu
               var domEvent = eventArgs.get_domEvent();
               menu.show(domEvent);
 
               eventArgs.cancelBubble = true;
               eventArgs.returnValue = false;
 
               if (eventArgs.stopPropagation)
               {
                   eventArgs.stopPropagation();
                   eventArgs.preventDefault();
               }
           }

Marin
Telerik team
 answered on 23 Mar 2015
4 answers
337 views
Hey guys I have a page with a RadListView and have in it an ItemTemplate with a RadEditor.
As soon as I started to use a RadAjaxManager to be able to have a RadAjaxLoadingPanel, the page rendering was incorrect, the height of the RadPanes was very small and the custom buttons I did for the RadEditor crashed and began to display the following message:

The command CustomCommand is not implemented yet.

However I have implemented the Custom Commands immediately below the RadEditor's statement as follows:

...
</telerik:RadEditor>
<script type="text/javascript">
 //<![CDATA[
 //inserir imagens que fazem parte da lista de anexos
 Telerik.Web.UI.Editor.CommandList["ImageManager"] = function (commandName, editor, args) { ... some code ... };
 ...
 ...
 other custom commands
 ...
 ...
</script>

And all my RadPanes I set the Height="100%"

This text was translated from Portuguese into English by the translator google
Márcio
Top achievements
Rank 2
 answered on 23 Mar 2015
1 answer
88 views
Hello

We have a page (div) that represents an invoice.  The current export to pdf does a great job at exporting the invoice, however, there is a RadTab, in which tab 2 contains a list of parts.

Is it possible to include Tab 2 (which is not rendered on the page as it is not active) as an additional page to the same pdf.  If so, can you direct  or provide an example

Thanks in advance
Hristo Valyavicharski
Telerik team
 answered on 23 Mar 2015
1 answer
85 views
Two issues:

1) I am trying to export a radgrid to CSV. The button is configured to call back to C# and I see the code hit MasterTableView.ExportToCSV(), but I step over that line and nothing happens.
2) After hitting the export button and going through the code, the data in the table disappears.

ASP
<telerik:RadGrid ID="rgResources" runat="server" AutoGenerateColumns="false" ShowGroupPanel="false"
    OnPreRender="rgResources_PreRender1" OnColumnCreated="rgResources_ColumnCreated" OnItemCommand="rgResources_ItemCommand"
    GroupingEnabled="false" ShowFooter="true">
    <ClientSettings>
        <Selecting AllowRowSelect="false"></Selecting>
        <Scrolling AllowScroll="true" SaveScrollPosition="true" FrozenColumnsCount="2" UseStaticHeaders="true"
            ScrollHeight="150px"></Scrolling>
    </ClientSettings>
    <MasterTableView DataKeyNames="Resource" CommandItemDisplay="Top" AllowSorting="false"
        AutoGenerateColumns="true" ShowGroupFooter="true">
        <CommandItemSettings ShowExportToCsvButton="true" ShowAddNewRecordButton="false"  ShowRefreshButton="false" />
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        </ExpandCollapseColumn>
    </MasterTableView>
    <ExportSettings IgnorePaging="true">
        <Csv FileExtension="CSV" />
    </ExportSettings>
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
    <ClientSettings EnableRowHoverStyle="true">
    </ClientSettings>
</telerik:RadGrid>

C#
protected void rgResources_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
{
    if (e.CommandName == Telerik.Web.UI.RadGrid.ExportToCsvCommandName)
    {
        rgResources.MasterTableView.ExportToCSV();
    }
}

I'm very new to this so I'm sure I'm missing something obvious but could use some help being pointed in the right direction.

Thanks
Konstantin Dikov
Telerik team
 answered on 23 Mar 2015
3 answers
171 views
On the demos page for the Q2 2012 release,there is a demo called 'telerik Image Gallery.'  Is there any sample source code or documentation regarding this demo available?
Thanks
Konstantin Dikov
Telerik team
 answered on 23 Mar 2015
1 answer
116 views
I have a grid with an Export to CSV button.  Since we have users who call automatic "screen-scraping" programs, is there a way to do a csv download via a URL parameter or similar?  In other words, can I automatically start a csv download from the URL command?
Kostadin
Telerik team
 answered on 23 Mar 2015
2 answers
130 views
I'm trying to create a shortcut style menu, using RadMenu. Now I need the Image to be above the Text.
Is this possible using a RadMenu or other Telerik control?
ORT BRAUDE COLLEGE
Top achievements
Rank 1
 answered on 23 Mar 2015
1 answer
129 views
Is it possible to using a RadFlowDocument to build a Word document with several sections from various html files, and then also to build a table of contents with the page numbers of each section? 
Petya
Telerik team
 answered on 23 Mar 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?