Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
160 views
I have a radgrid that is bound dynamically within the code, the page size is set to 10 as you can see below, however
the paging isn't working correctly. All the rows are displayed and there is no option to page to the next page.

the grid is bound on the click of a button with the following code

       grv_cand_shifts.DataSource = swaps.tbl_shifts_to_give_away;
            grv_cand_shifts.DataBind();





          
please can you help.


 <telerik:RadGrid ID="grv_cand_shifts" runat="server" AllowFilteringByColumn="True" AllowCustomColumns="True" AllowCustomPaging="True"
                AllowPaging="True" ExportSettings-ExportOnlyData="true" ExportSettings-IgnorePaging="true" HeaderStyle-Wrap="true"
                AllowSorting="True" GridLines="None" AutoGenerateColumns="False" Skin="<%$ AppSettings:TelerikControlSkin %>"
                Width="100%" OnPreRender="grv_my_shifts_OnPreRender" OnDataBound="grv_cand_shifts_DataBound" PageSize="10" Message="" OnNeedDataSource="grv_cand_shifts_NeedDataSource" >
                <MasterTableView DataKeyNames="id" Width="100%"  >
                    <Columns>
                        <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn">
                        </telerik:GridClientSelectColumn>
                        <telerik:GridBoundColumn DataField="id" HeaderText="id" SortExpression="id" UniqueName="id"
                            Visible="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="shift_date" HeaderText="Shift date" ReadOnly="True"
                            UniqueName="shift_date" DataFormatString="{0:dd/MM/yyyy}">
                        </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn DataField="start_time" ReadOnly="True" Visible="False" UniqueName="start_time"
                            HeaderText="Start Time">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="end_time" Visible="False" UniqueName="end_time"
                            HeaderText="End Time">
                            </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="person" HeaderText="Person" UniqueName="person"
                            SortExpression="person">
                        </telerik:GridBoundColumn>
                        <telerik:GridDropDownColumn DataField="rota_period_id" DataSourceID="sql_rota_period"
                            HeaderText="Rota period" ListTextField="label" ListValueField="id" UniqueName="rota_period_id">
                            <filtertemplate>
                                            <telerik:RadComboBox ID="RadComboPeriod2" DataSourceID="sql_rota_period" DataTextField="label"
                                                DataValueField="id" AppendDataBoundItems="true" SelectedValue='<%#  ((GridItem)Container).OwnerTableView.GetColumn("rota_period_id").CurrentFilterValue %>'
                                                runat="server" OnClientSelectedIndexChanged="Period2Changed">
                                                <Items>
                                                    <telerik:RadComboBoxItem Text="All" />
                                                </Items>
                                            </telerik:RadComboBox>
                                            <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">

                                                <script type="text/javascript">
                                    function Period2Changed(sender, args) {
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                        tableView.filter("rota_period_id", args.get_item().get_value(), "EqualTo");
                                    }
                        </script>
                    </telerik:RadScriptBlock>                    
                        
</filtertemplate>
                        </telerik:GridDropDownColumn>
                        <telerik:GridBoundColumn DataField="email" HeaderText="Contact" ReadOnly="True" UniqueName="email" Visible="False">
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings >
                    <Selecting AllowRowSelect="True" />
                    <ClientEvents OnFilterMenuShowing="filterMenuShowing" OnGridCreated="getGridObject" />
                </ClientSettings>
                  <PagerStyle AlwaysVisible="True" Mode="NumericPages" />
                <ExportSettings ExportOnlyData="True" IgnorePaging="True">
                </ExportSettings>
              
                <FilterMenu OnClientShown="MenuShowing">
                </FilterMenu>
                <HeaderStyle Wrap="True" />
              
            </telerik:Radgrid>&nbsp;
Pavlina
Telerik team
 answered on 23 Jun 2010
8 answers
143 views
I handle the OnCommand client-side event for a Grid. I pull out the ID of the record of interest. Part of that record is a byte stream that contains the contents of a PDF file. The OnCommand handler calls radopen to display an aspx page:
            function RadGrid1_OnCommand(sender, eventArgs) {  
                var nID = sender.get_masterTableView().get_dataItems()[0].getDataKeyValue("ID");  
                var commandName = eventArgs.get_commandName();  
                if (commandName == "PDF") {  
                    var wnd = window.radopen("/ShowInvoicePDF.aspx?ID=" + nID, null);  
                    return false;  
                }  
            }  
 
The ShowInvoicePDF markup is just like the VS2010 wizard created it and I added nothing to it. I do this in the Page_Load method.
        protected void Page_Load(object sender, EventArgs e)  
        {  
            int nID = Convert.ToInt32(Request.QueryString["ID"]);  
            Invoice invoice = Invoice.FindByID(nID);  
 
            Response.Clear();  
            Response.ClearContent();  
            Response.ClearHeaders();  
            Response.Buffer = true;  
            Response.ContentType = "Application/pdf";  
            Response.AddHeader("Accept-Ranges""bytes");  
            Response.AddHeader("Accept-Header", invoice.PDFData.Length.ToString());  
            Response.AddHeader("Cache-Control""public");  
            Response.AddHeader("Cache-Control""must-revalidate");  
            Response.AddHeader("Pragma""public");  
            Response.AddHeader("expires""0");  
            //Response.BinaryWrite(invoice.PDFData);  
            Response.OutputStream.Write(invoice.PDFData, 0, invoice.PDFData.Length);  
            //Response.Flush();  
            //Response.Close();  
            Response.End();  
        }  
 
When the webapp is run using IE 8 under Windows 7, the radwindow comes up but all I see is the rotating RadAjaxLoadingPanel wheel. If I use FireFox it works fine. If I run the ShowInvoicePDF.aspx file directly from the IE browser, it works fine, so there must be some kind of interaction with javascript/ajax/radwindow happening. Why is this happening (an answer of "because you are using MS IE" is not a valid response)? What do I need to do to make it work on all browsers?
Daniel
Telerik team
 answered on 23 Jun 2010
1 answer
173 views
i have used in my project telerik captcha in the registeration page,
i got display on the page every thing working is fine but when i type the characters from the captcha image in to text box it is telling "The code you typed is in correct" even i typed correctly it is telling like this
so please can any one tell why it is telling like this...

i used basic version of telerik captcha
Pero
Telerik team
 answered on 23 Jun 2010
1 answer
123 views
Hi dear all,

I want to add treeview on the left side of the page and make it PinUnpin. But it doesn't work.
I choice Defaultcommand= PinUnpin
When I run it this error occour.

"Telerik.Web.UI.RadDock with ID='RadDock1' is docked into a Telerik.Web.UI.RadDockZone with ID='RadDockZone1', but it is not allowed to dock. Please, set the DockMode property to Docked, or undock the Telerik.Web.UI.RadDock control."

Pls, help me how to do it work smoothly.

Thanks and best Regards
Naunton
Pero
Telerik team
 answered on 23 Jun 2010
3 answers
62 views
Hello,

I used the RadEditor in Moss. And my client want a mix between the 2 mode ShowOnFocus and [PageTop].

ShowOnFocus because when the top of the textbox is visible, it's strange to have the toolbar at the top of the Windows.
[PageTop] because if the user scroll down and the top textbox is not visible, he cannot access the toolbar.
Moreover I have a bug with the [PageTop] mode, the text cursor is flashing very fast which is very tiring.

Do you know I can do that ? by adding javascript to the page ? by modifying the RadEditor .js ?

Thanks,

Regards,
Pascal.
Rumen
Telerik team
 answered on 23 Jun 2010
2 answers
106 views
If I place a tooltip manager on a page and hard code in its width and height, the tooltip renders smoothly.  As im generating the contents of the tooltip panel dynamically from a database, the height will vary depending on the amount of text returned, so I cant hardcode the height, but as soon as I remove the height property, the tooltip renders very slowly and 'jerky'.  Is this a known bug ?  I cant fix the height since I dont know what it will be until runtime when its contents are retrieved

 <telerik:RadToolTipManager runat="server" AnimationDuration="300" ShowDelay="200" 
            HideDelay="1" ID="RadToolTipManager1" Width="450px"  RelativeTo="Element" 
            Animation="Slide" Position="BottomCenter" OnAjaxUpdate="OnAjaxUpdate"  
        Skin="Sunset" HideEvent="LeaveToolTip" /> 


c#

this.RadToolTipManager1.TargetControls.Add(this.ImageGuarantee.ClientID, "Guarantee", true); 
                this.RadToolTipManager1.TargetControls.Add(this.ImageWhy.ClientID, "Why", true); 
                this.RadToolTipManager1.TargetControls.Add(this.ImageVIP.ClientID, "VIP", true); 

Svetlina Anati
Telerik team
 answered on 23 Jun 2010
1 answer
55 views
Sir ,
I have used two <telerik:RadDateTimePicker>.
In first <telerik:RadDateTimePicker> , I have set default value from codebehind as  Datetime.Now.
Now I am selecting Date from Second <telerik:RadDateTimePicker> , I want to compare Date as well as time with First <telerik:RadDateTimePicker>

When I select Date from Second <telerik:RadDateTimePicker>  , it takes 00.00 time. I dont want in this manner.
From DateControl ,only date should be selected & from TimeControl only time should be selected .

&
I want to separate Date & time in javascript.
See Attachement.
Shinu
Top achievements
Rank 2
 answered on 23 Jun 2010
1 answer
125 views

Hi,

i'm using telerik radwindow and radgrid in my page.
when i double click on grid record my pop-up window displayed. i have 'Close' asp button on my child page.
i'm calling CloseandRebind() javascript function on 'Close' click. it will refresh my parent page. RadAjaxmanager displays the loading panel while refresh of the parent page.

my child rad window displays 'X' button on Top Right corner. i have written OnClientClose function on my parent page window defination like below.
owin.OnClientClose = "OnClientClose"
but page is not getting refreshed on click of 'X'. also loading panel also not displayed.

//java script

function OnClientClose(sender,args)

{

//window.location.href = window.location.href;// - will refresh the page by reloading the URL

$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");

}

function CloseAndRebind(args)
{      
    GetRadWindow().Close();
    GetRadWindow().BrowserWindow.refreshGrid(args);
}

  function refreshGrid(arg) {
                if (!arg) {
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
                }
                else {
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");
                }
            }

please sugggest some solution so that both the close buttons works proper and loading panel displays on click of both buttons.

Thanks
Sweta

Maria Ilieva
Telerik team
 answered on 23 Jun 2010
3 answers
197 views
Hi Stanimir,
 I'm afraid now that I've gotten the solution working from this article, I've found another fatal flaw or bug.

 If I enter a url such as - http://test.moss/_layouts/settings.aspx into the Hyperlink manager on a page....
 
...at a subsite level such as - http://test.moss/demo/test/ and set the configuration to strip out the 'http://test.moss/ part of the URL, I end up with a final rendered URL of :-

http://test.moss/demo/test/_layouts/settings.aspx

How can I avoid this so that the hyperlink manager is ignoring the link entered in context with the subsite?

Thanks,
Jason.
Stanimir
Telerik team
 answered on 23 Jun 2010
1 answer
82 views
I encountered a strange problem for my working project. I have a menu on the top of the page using custom theme. But if I the page is set idle for 20 minutes it will log out which is correct. However if I log back on, the menu will lost the style and shows as hyperlinks. Also I will receive a error message "Microsoft JScript runtime error: Sys.ScriptLoadFailedException: The script  could not be loaded." If I refresh the page, then everything will be fine. Does anyone had similar problem and I really appreciate if you can help me to solve this.

Anthony
Dobromir
Telerik team
 answered on 23 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?