Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
207 views
Hi,

I am using Radgrid, I have a colum with the html link upon clicking on that we are opening a radwindow , I have to preserve the rad windows even when the parent Radgrid refreshes ( Postback), I am using asp.net timer control to refresh the grid at a particular interval, as soon as the grid refreshes the windows disappear , Please suggest me how can I preserve the rad window during postback..

we are using DLL version of  2009.1.311.35.

I have done the below code to achieve that.

protected override object SaveViewState()
        {
            Control windowsManager = ctlVariables.FindControl("listPopupManager");
            Control windows = windowsManager.FindControl("variableValue");
            Object basestate =  base.SaveViewState();
            object[] allStates = new object[10];
              
            allStates[0] = windows.Visible;
            return allStates;
        }
  
        protected override void LoadViewState(object savedState)
        {
            if (savedState != null)
            {
                object[] myState = (object[])savedState;
                if (myState[0] != null)
                {
                    string visible = myState[1].ToString();
                } 
            }



Thanks,
Ambuj

Shinu
Top achievements
Rank 2
 answered on 11 Nov 2011
3 answers
230 views
Hi,
I have a project using a RadGrid connected into a DataSourceObject and using paging to select only the necessary
quantity of records that I need to show on a web page. Everything is working fine, except by one situation that I would
like to know if somebody can help me to solve.

When I press the Insert button on grid , it opens a new empty row to edit the fields values, but the page is moved
to the last page of the grid, generating a call to the select method of objectDataSource with the parameters of
startRowIndex and maximumRows to get data from the last records from a table.

How is possible to avoid this behavior, keep on the same page that was been shown before the insert button be pressed ?

Thanks,
Edson
Jayesh Goyani
Top achievements
Rank 2
 answered on 11 Nov 2011
1 answer
114 views
This must be so simple/obvious I can't find it. I have a context menu set up to supply various details on appointments and I need to display these details in a modal popup type of display with an X or OK button to close it.

Is this something I can/should do from Rad Scheduler or should I just make a modal popup external to the control?

Thanks!
Princy
Top achievements
Rank 2
 answered on 11 Nov 2011
1 answer
204 views
Hi im using RadUpload, a few days ago, I get an exception saying "A potentially dangerous Request.Files value was detected from the client", caused by an illegal character (#) in the filename. I don't want to se validateRequest=false on @page directive. I would like to validate filename client side.
How can I do that?
Shinu
Top achievements
Rank 2
 answered on 11 Nov 2011
1 answer
383 views
I have a usercontrol inside a radajaxpanel of my aspx page. I have a datepicker in this usercontrol.
On page load I have made the datepicker visible false as :-
DateRange.EndDateControl.Style.Value = "display: none";
I need to make the datepicker visible true at client side on onclick of checkbox. I have written a call back function as :-
function MakeControlsVisible(CheckBoxControl) {
                 var endDateControl = "<%= DateRange.EndDateControl.ClientID %>";
        var datePicker = document.getElementById(endDateControl);
  
                    if (CheckBoxControl.checked == true) {
                        datePicker.style.display = "block";
                    }
                                   }
Even after making the datepicker style "display:block" , I am not able to see the datepicker on my page. Can you help me what is going wrong?
Princy
Top achievements
Rank 2
 answered on 11 Nov 2011
1 answer
345 views
Hi there,

I am trying to create an editor programmatically.

A part of my code is :

RadEditor _editor = new RadEditor();
/*Document Manager*/
string documentsPath = "Library/Documents/";           
_editor.DocumentManager.UploadPaths = new string[] { documentsPath };
_editor.DocumentManager.ViewPaths = new string[] { documentsPath };
_editor.DocumentManager.DeletePaths = new string[] { documentsPath };
_editor.DocumentManager.SearchPatterns = new string[] { "*.doc,*.txt,*.docx,*.xls,*.xlsx,*.pdf,*.jpg,*.jpeg,*.eps" };
_editor.DocumentManager.MaxUploadFileSize = 104857600;

It is reading the new extensions allowed, but is neither pulling in the old documents uploaded previously via Document Manager, nor is allowing me to upload any other document. I have attached the screen shots. 

Please help!
Somya
Top achievements
Rank 1
 answered on 11 Nov 2011
5 answers
162 views
After checking the demos i have designed a hierarchy with etailtables.I have a textbox in edititemtemplate of detailtable.How can i access the datakeyvalue and show in this textbox in edit mode?
Shinu
Top achievements
Rank 2
 answered on 11 Nov 2011
8 answers
1.4K+ views
Hello,

1. I want to trigger an onclick method in the c# code-behind when the AccountNumber is clicked. I cannot find an attribute or such an event to trigger an onclick method.

<telerik:GridHyperLinkColumn DataNavigateUrlFields="ID"
    DataNavigateUrlFormatString="Page.aspx?id={0}" DataTextField="AccountNumber"
    HeaderText="Account Number" UniqueName="AccountNumber">


Thanks
Mike McMillan
Top achievements
Rank 1
 answered on 11 Nov 2011
4 answers
174 views
Is it possible to capture the aggregates event that comes from the Radgrid AJAX headercontextaggregatesmenu? I can capture the item click for everything except the aggregates.  The custom aggregate function is also picked up fine.   There is no indication of any specific additional code that I need to capture the aggregates item click event in any of the telerik demos or documentation.

Thanks in advance for your help.
Chad
Top achievements
Rank 1
 answered on 10 Nov 2011
2 answers
328 views
I have a customized gridtemplatecolumn.  I have an HTML table in the gridtemplatecolumn.  I would like the table to fill the entire grid cell so that the lines touch the lining of the grid cell.  Please see screenshot to see what it currently looks like.  The "Open Items by Age" column contains the table.  I am also attaching the aspx code.  Thanks in advance.

          <telerik:RadGrid ID="grdCurrentandPrior" runat="server" AllowRowResize="True" AllowSorting="True" AutoGenerateColumns="False"
                            GridLines="Horizontal" Skin="Web20" Style="margin-right: 0px" Width="897px" Height="252px"
                            OnNeedDataSource="grdCurrentandPrior_NeedDataSource" OnExcelMLExportRowCreated="grdCurrentandPrior_ExcelMLExportRowCreated"
                            OnSortCommand="grdCurrentandPrior_SortCommand"> 
                            <exportsettings filename="OpenItemsCurrentInventory" ignorepaging="True" openinnewwindow="True"
                                exportonlydata="true" excel-format="ExcelML"> 
                            </exportsettings> 
                            <mastertableview commanditemdisplay="Bottom" allownaturalsort="false" usealldatafields="true"> 
                                <CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false"
                                    ShowRefreshButton="false" /> 
                                <Columns> 
                                    <telerik:GridTemplateColumn DataField="Assignee" HeaderText="Assignee" UniqueName="Assignee"
                                        SortExpression="Assignee"> 
                                        <HeaderStyle Font-Bold="True" Width="150px" HorizontalAlign="Center" Font-Names="Arial" /> 
                                        <ItemTemplate> 
                                            <asp:Label ID="lbAssignee" runat="server" Text='<%# Eval("Assignee") %>'></asp:Label> 
                                        </ItemTemplate> 
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> 
                                    </telerik:GridTemplateColumn> 
                                    <telerik:GridTemplateColumn DataField="State" HeaderText="State" UniqueName="State"
                                        SortExpression="State" Visible="false"> 
                                        <HeaderStyle Font-Bold="True" Width="150px" HorizontalAlign="Center" Font-Names="Arial" /> 
                                        <ItemTemplate> 
                                            <asp:Label ID="lbState" runat="server" Text='<%# Eval("State") %>'></asp:Label> 
                                        </ItemTemplate> 
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> 
                                    </telerik:GridTemplateColumn> 
                                    <telerik:GridTemplateColumn DataField="JurisdictionCount" HeaderText="Jurisdictions"
                                        UniqueName="JurisdictionCount" SortExpression="JurisdictionCount"> 
                                        <HeaderStyle Font-Bold="True" Width="80px" HorizontalAlign="Center" Font-Names="Arial" /> 
                                        <ItemTemplate> 
                                            <asp:Label ID="lbJurisdiction" runat="server" Text='<%# Eval("JurisdictionCount", "{0:N0}")%>'></asp:Label> 
                                        </ItemTemplate> 
                                        <ItemStyle HorizontalAlign="Right" ForeColor="Black" /> 
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> 
                                    </telerik:GridTemplateColumn>                  
             <telerik:GridTemplateColumn UniqueName="OpenItemsByAge" > 
        <HeaderTemplate> 
          <table id="Table1" cellspacing="0" cellpadding="0" width="100%" border="0" > 
            <tr> 
              <td colspan="3" align="center"> 
                <b>Open Items by Age</b> 
              </td> 
            </tr> 
           <tr> 
                                    <td align="center" style="width: 33%"> 
<asp:LinkButton CssClass="Button" ID="btnPrioOpen" Text="Prior" 
CommandName='Sort' CommandArgument='OpenItemsCountPrior' runat="server" /></td> 
                                    <td align="center" style="width: 33%"> 
<asp:LinkButton CssClass="Button" ID="btnLastMonth" Text="Last Month" 
CommandName='Sort' CommandArgument='OpenItemsCountLastMonth' runat="server" /></td> 
                                    <td align="center" style="width: 34%"> 
<asp:LinkButton CssClass="Button" ID="btnCurrentOpen" Text="Current" 
CommandName='Sort'  CommandArgument='OpenItemsCountCurrent' runat="server" /></td> 
                                </tr> 
          </table> 
        </HeaderTemplate> 
        <ItemTemplate > 
          <table id="Table2" cellspacing="0" cellpadding="0" width="100%" border="0"  style="margin: 0px 0px 0px 0px;" > 
            <tr> 
              <td align="right" width="33%" style="border-bottom-color:White; border-left-color:White"> 
                <%# Eval("OpenItemsCountPrior", "{0:N0}") %> 
              </td> 
   <td align="right" width="33%" style="border-bottom-color:White"> 
                <%# Eval("OpenItemsCountLastMonth", "{0:N0}")%> 
              </td>               
              <td align="right" width="34%" style="border-bottom-color:White"> 
                <%#  Eval("OpenItemsCountCurrent", "{0:N0}") %> 
              </td> 
                         
            </tr> 
          </table> 
        </ItemTemplate> 
      </telerik:GridTemplateColumn> 
                        
                                    <telerik:GridTemplateColumn DataField="TotalRemainingItems" HeaderText="Items Left to Pay"
                                        UniqueName="TotalRemainingItems" SortExpression="TotalRemainingItems"> 
                                        <HeaderStyle Font-Bold="True" Width="95px" HorizontalAlign="Center" Font-Names="Arial" /> 
                                        <ItemTemplate> 
                                            <asp:Label ID="lblTotalRemain" runat="server" Text='<%# Eval("TotalRemainingItems", "{0:N0}") %>'></asp:Label> 
                                        </ItemTemplate> 
                                        <ItemStyle HorizontalAlign="Right" ForeColor="Black" /> 
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> 
                                    </telerik:GridTemplateColumn> 
                                        <telerik:GridTemplateColumn DataField="CompleteCount" HeaderText="Complete"
                                        UniqueName="CompleteCount" SortExpression="CompleteCount"> 
                                        <HeaderStyle Font-Bold="True" Width="80px" HorizontalAlign="Center" Font-Names="Arial" /> 
                                        <ItemTemplate> 
                                            <asp:Label ID="lblCompleteCount" runat="server" Text='<%# Eval("CompleteCount", "{0:N0}") %>'></asp:Label> 
                                        </ItemTemplate> 
                                        <ItemStyle HorizontalAlign="Right" ForeColor="Black" /> 
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> 
                                    </telerik:GridTemplateColumn> 
                                    <telerik:GridTemplateColumn DataField="PercentComplete" HeaderText="% Complete" UniqueName="clmPctComplete"
                                        SortExpression="PercentComplete"> 
                                        <HeaderStyle Font-Bold="True" Width="85px" HorizontalAlign="Center" Font-Names="Arial" /> 
                                        <ItemTemplate> 
                                            <asp:Label ID="lblPctComplete" runat="server" Text='<%# Eval("PercentComplete", "{0:N2}%")%>'></asp:Label> 
                                        </ItemTemplate> 
                                        <ItemStyle HorizontalAlign="Right" ForeColor="Black" /> 
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> 
                                    </telerik:GridTemplateColumn> 
                      
                                </Columns> 
                            </mastertableview> 
                            <headerstyle borderstyle="Solid" /> 
                            <clientsettings> 
                                <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                            </clientsettings> 
                        </telerik:RadGrid>

aks
Top achievements
Rank 1
 answered on 10 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?