Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
59 views
Hello,

I use a third party tool (NPOI) with RadGrid to export both rows and charts (images) into Excel. When user clicks to a button it exports the populated data in RadGrid1 which is only Page1. I need to export all the pages in this RadGrid, not only the page RadGrid has been populated. (I can direct connect datatable to NPOI but in this case RadGrid1 related functions like Filtering, Sorting won't work so this is not a solution)

So, how can I export all the pages in a RadGrid but not only the populated page into Excel? I don't use Telerik export method...Any Ideas?

Thank you,
Ervin

ervin
Top achievements
Rank 1
 asked on 07 Feb 2012
1 answer
85 views
Hello,

I have a RadGrid that I'm binding dynamically with different data table based on the choice customer makes but when I "enable" the ViewStateMode of the RadGrid to maintain the filter value, paging messes up.

If I am on page 3 of RadGrid with DataTable "A" then when the datasource of RadGrid is changed to Data Table "B" it shows page 3 instead of page 1. Also, the forward buttons of the pager changes the page but numeric button 2 stays highlighted even if I have clicked 7 times..

Please help!

Best Regards,
Effat
Tsvetoslav
Telerik team
 answered on 07 Feb 2012
4 answers
261 views

CommandItemDisplay

="Bottom" property adds the  "Add new record" and "Refresh" button by default.

But my requirement is want to display only the Refresh button.
The Add New Record Text and Image is not required.

How can i accomplish this??

Kindly help me...

Tsvetoslav
Telerik team
 answered on 07 Feb 2012
2 answers
112 views
hi

I have a  radmenu with default skin.

When i set URL routing in Global.asax to

routes.MapPageRoute(

"login", "{*username}", "~/login.aspx")
it losses all its CSS and theme.

But when i set it to  

routes.MapPageRoute("login", "login/{*username}", "~/login.aspx")
it display normal with all its CSS and theme.

Why it isn't working for the first routing? thanks

 

Kate
Telerik team
 answered on 07 Feb 2012
2 answers
127 views
Hi,

I have some RadGrids on a page, and I'd like a loading panel to show up during AJAX calls. For example, let's focus on a virtual scrolling grid.

On this demo page, we can see virtual scrolling, and a loading panel showing up as you scroll. For some reason, no matter what I try, I can't get the loading panel to show. The AJAX magic does work, though.

Are there common pitfalls that I should be aware of, or something?

My code:
In a first control:

<telerik:RadScriptManager ID="scriptManager" runat="server" />
 
(...)
 
<telerik:RadAjaxManager ID="ajaxManager" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="resultGrid">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="resultGrid" LoadingPanelID="resultAjaxPanel"/>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

In a sub control:

<telerik:RadAjaxLoadingPanel ID="resultAjaxPanel" runat="server" />
 
<telerik:RadGrid ID="resultGrid" runat="server" AutoGenerateColumns="False" ShowHeader="False"
    AllowPaging="True" PageSize="30" PagerStyle-Visible="false" CellSpacing="0" GridLines="None" OnItemCreated="resultGrid_ItemCreated" OnItemCommand="resultGrid_ItemCommand" OnItemDataBound="resultGrid_ItemDataBound">
<MasterTableView>
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
    <Columns>
        <telerik:GridMaskedColumn UniqueName="idColumn" FilterControlAltText="Filter idColumn column" DataField="Id" Visible="false">
        </telerik:GridMaskedColumn>
        <telerik:GridBoundColumn DataField="Extension" FilterControlAltText="Filter extensionColumn column" UniqueName="extensionColumn">
            <ItemStyle Width="20px" CssClass="extensionColumn" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Title" FilterControlAltText="Filter linkColumn column" UniqueName="linkColumn">
            <ItemStyle CssClass="titleColumn" />
        </telerik:GridBoundColumn>
        <telerik:GridTemplateColumn>
            <ItemTemplate>
                <a href='<%# this.ResolveUrl("Preview.ashx?" + Insite.Web.Widgets.FilterSearch.Preview.IdParam + "=" + Eval("Id")) %>' target='_blank'><asp:Image ImageUrl="~/Widgets/FilterSearch/images/icon_loupe.png" runat="server" /></a>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Right" Width="16px" />
        </telerik:GridTemplateColumn>
        <telerik:GridButtonColumn ButtonType="LinkButton" CommandName="Add"
            FilterControlAltText="Filter addColumn column" UniqueName="addColumn" Text="ADD">
            <HeaderStyle HorizontalAlign="Center" />
            <ItemStyle HorizontalAlign="Right" Width="30px" CssClass="addColumn" />
        </telerik:GridButtonColumn>
    </Columns>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
 
<ClientSettings>
    <Scrolling AllowScroll="True" EnableVirtualScrollPaging="true" SaveScrollPosition="True">
    </Scrolling>
</ClientSettings>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
 
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
 
</telerik:RadGrid>
Thomas
Top achievements
Rank 1
 answered on 07 Feb 2012
1 answer
126 views
Hi,

I have a grid control to which I add a GridButtonColumn. Later, I add an OnClick client event. This part works fine. The image is displayed within each row of the grid and if I click on the image, the javascript function is executed.

Now from within the javascript function, I want to access a value from the grid. The value should come from the row which contains the button which was clicked on. Looking on the internet, I have managed to find out how to get this to work if a row has been selected. The problem is that when you click on a grid button, the row containing the grid button is not necessarily selected e.g. If I first select a row and then click on the button, I can get the value, but if I just click on one of the buttons without first selecting a row, I am aunable to determine the row containing the button. The clicked button itself is inside a specific row so there must be some way to get it.

Below are a few snippets of relevent code. Any help would be greatly appreciated.

Creating the button:

var inchisIncomingEmail = new GridButtonColumn();
grid.MasterTableView.Columns.Add(inchisIncomingEmail);

Adding the onclick event to the button
if (e.Item is GridDataItem)
            {
                GridDataItem item = (GridDataItem)e.Item;
                ImageButton btnColumn1 = (ImageButton)item["objhisIncomingEmailID"].Controls[0];
                btnColumn1.Attributes.Add("OnClick", "IncomingEmailClick()");
            }

client side javascript event handler. Only works as expected if a row is selected prior to clicking on the button - even though the button itself is inside a specific row.
function IncomingEmailClick(obj, args) {
            IncomingEmailOpenWindow('<%=ResolveUrl("~/Modules/Common/HistoryDetail.aspx") %>', obj, null);
        }
 
        function IncomingEmailOpenWindow(url, grid, closeFn) {
            var gridc = $find("<%=grid.ClientID%>");
            var items = gridc.get_masterTableView().get_selectedItems();
             
            if (items.length > 0) {
                url = url + '?id=' + items[0].getDataKeyValue('objhisID') + '&type=<%=(int)ListType %>' + '&objId=<%=ItemGuid %>';
            }
            var win = radopen(url, null);
            win.set_modal(true);
            win.setActive(true);
            if (closeFn != null) {
                win.OpenerWindowCloseFn = closeFn;
            }
        }

Ryan
Top achievements
Rank 1
 answered on 07 Feb 2012
2 answers
116 views
hi

based on the example you have http://demos.telerik.com/aspnet-ajax/scheduler/examples/resourceheadertemplates/defaultvb.aspx
where your 4 speakers has static settings in the resource style and mapping.

I am having an eviromment where my speakers are very dynamic. we engage many different speakers on an assignment basis and we insert speaker as we engage them and delete them when don't require their speaking engagement.

Grouping is done vertically and we uses Timeline to display speakers on the left without displaying time.

How do i go about it doing dynamically?

Thanks
Ivana
Telerik team
 answered on 07 Feb 2012
1 answer
239 views
Here is my requirement, when user clicks on a appointment in Month View, say he clicks one appointment on 2nd Feb, and then user selects to go to day view, calendar should go to 2nd Feb.
 I checked the online demos , this is not a default feature of scheduler. I have added a javascript on appointment click to change the selected date, but somehow it is not working, here is the js I am trying
calendarView.set_selectedDate(eventArgs.get_appointment().get_start());
   eventArgs.get_appointment().set_selected();
Ivana
Telerik team
 answered on 07 Feb 2012
1 answer
136 views
Hello,

I'm using filtering on my grid. When the user selects a filter the "Item_Command" event is triggered where I can retrieve the Filter pair from the command argument. From this argument I can get the "filterPair.first", "filterPair.second", ..etc. Using this approach I can get access to the column name that the user is filtering, but I need the associated Column ID. Is it possible to associate more data with this filter or command argument? Maybe I could add an attribute to the filter Textbox when the filter is created, then read it on ItemCommand? 

Please let me know if you have suggestions on the best approach.

protected void grdSummary_ItemCommand(object source, GridCommandEventArgs e)
{
    if (e.CommandName == RadGrid.FilterCommandName)
    {
        Pair filterPair = (Pair)e.CommandArgument;
 
        string strOperator = filterPair.First;    // Starts With, ..etc
        string strColumn = filterPair.Second;    // Column Filtering On
        string searchValue = ((TextBox)(e.Item as GridFilteringItem)[filterPair.Second.ToString()].Controls[0]).Text;
           string columnId = ?? 
Tsvetoslav
Telerik team
 answered on 07 Feb 2012
1 answer
84 views
function SelectRows()
{         
   var masterTable = $find("<%= CandidatesGrid.ClientID %>").get_masterTableView();
   var row = masterTable.get_dataItems();
    for(i =0;i<row.length;i++)
    {
          var check=masterTable.get_dataItems()[i].getDataKeyValue("Check");
          if(check !=0)
          {
                masterTable.get_dataItems()[i].set_selected(true);              
          }
           else
           {            
                 masterTable.get_dataItems()[i].set_selected(false);  
                // How to disable the row here?      
                        
           }
  }
  
 }
How to disable a particular row in RadGrid using javascript(i am using GridClientSelectColumn to select a row)?
Princy
Top achievements
Rank 2
 answered on 07 Feb 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?