Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
143 views
Hi,

We have a gird with a export function. It works very well. However, when there are 5000 items in the grid. Once fire the export function, it will give a exception:"
System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
"

I was wondering if export function has a maximum limit or if you have any solution for this.

I appreciate your help

Thanks,
Feng
Joe
Top achievements
Rank 1
 answered on 23 Sep 2009
7 answers
219 views
I'm following the example  for cascading combo-boxes as found at: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multiplecomboboxes/defaultcs.aspx

In my exmample I just have Country / City(region)

The problem I am having is this... I have the code working where the Country uses the OnClientSelectedIndexChanged which calls my javascript function "BindRegions"...  BindRegions in turn uses the Client-Side API and calls the regionsCombo.requestItems() method to cause an AJAX call to occur back to the server-side code for the apporpriate combo box.  The Regions combo box is databound (refreshed) in that event and then the expected client-side javascript call to ItemsLoaded occurs which selects the 1st item in the list.

When I click a 'Update' button on my form (CommandName="Update" defined on the button - no click event code present) a series of events occur and eventually I invoke a method which populates an entity from the controls on that screen (which actually is a user control template for a grid editor template).   When I check the controls, their values are not set to the expected values - which I suspect is due to not having AutoPostBack enabled - which leaves me in a pinch.

How do I do the "client-side/AJAX" approach but still have the correct values up in the server-side code?   On a prior project where we had cascading combo-boxes (i.e. Country/State or Year/Make/Model) it was done with AutoPostBack enabled and no client-side javascript at all...

So I have 2 questions....

(A) which is the "right" approach - using RadAjaxManager and Post-Backs or the example given from the ComboBox section of the web-site - this was frustrating in that the 'reccomended' approach is what I would expect to find here... 

(B) How do I make the approach shown at the link stated above work while still having access to the right 'selected' values (SelectedItem, SelectedValue, SelectedIndex, etc)...
Brad Hehe
Top achievements
Rank 1
 answered on 23 Sep 2009
7 answers
313 views
Hi,

I'm getting this error after FormView Updated or Inserted :
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Script control 'gridEnderecos' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
Parameter name: scriptControl

Here is my code:

    <telerik:RadAjaxManager ID="ajaxManager" runat="server" ClientEvents-OnRequestStart="requestStart" ClientEvents-OnResponseEnd="requestEnd" DefaultLoadingPanelID="loadingPanel" EnablePageHeadUpdate="False"> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="bSalvar"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="formImovel" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="formImovel$gridEnderecos"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="formImovel$gridEnderecos" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
 
    <asp:FormView ID="formImovel" runat="server" Width="100%" DefaultMode="Edit" DataKeyNames="CdImovel" DataSourceID="ldsImovel" OnItemInserted="formImovel_ItemInserted" OnItemInserting="formImovel_ItemInserting" OnItemUpdated="formImovel_ItemUpdated" OnItemUpdating="formImovel_ItemUpdating"> 
        <EditItemTemplate> 
            <table style="margin-bottom: 10px;"> 
                <tr> 
                    <td> 
                        Código: 
                    </td> 
                    <td> 
                        <asp:Label ID="lCdImovel" runat="server" Text='<%# Eval("CdImovel") %>' /> 
                    </td> 
                </tr> 
                <tr> 
                    <td> 
                        Nome: 
                    </td> 
                    <td> 
                        <telerik:RadTextBox ID="iNome" runat="server" Width="300px" MaxLength="100" Text='<%# Bind("NmImovel") %>'> 
                        </telerik:RadTextBox> 
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator_iNome" runat="server" ControlToValidate="iNome"><img src="../../../Imagens/iconErro.gif" style="vertical-align:middle" alt="Erro" /> Obrigatório</asp:RequiredFieldValidator> 
                    </td> 
                </tr> 
                <tr> 
                    <td> 
                        Unidade Gestora Responsável: 
                    </td> 
                    <td> 
                        <telerik:RadComboBox ID="iCdUnidadeGestora" runat="server" DataSourceID="ldsUnidadeGestora" DataTextField="NmUnidadeGestora" DataValueField="CdUnidadeGestora" SelectedValue='<%# Bind("CdUnidadeGestora") %>'> 
                        </telerik:RadComboBox> 
                    </td> 
                </tr> 
                <tr> 
                    <td> 
                        Tipo do Imóvel: 
                    </td> 
                    <td> 
                        <telerik:RadComboBox ID="iTipoImovel" runat="server" DataSourceID="ldsTipoImovel" DataTextField="NmTipoImovel" DataValueField="CdTipoImovel" SelectedValue='<%# Bind("CdTipoImovel") %>'> 
                        </telerik:RadComboBox> 
                    </td> 
                </tr> 
                <tr> 
                    <td> 
                        Área do Terreno: 
                    </td> 
                    <td> 
                        <telerik:RadNumericTextBox ID="iAreaTerreno" runat="server" Width="70" Type="Number" MinValue="1" MaxLength="5" MaxValue="32767" DbValue='<%# Bind("AreaTerreno") %>'> 
                            <NumberFormat DecimalDigits="0" /> 
                        </telerik:RadNumericTextBox> 
                        m² 
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator_iAreaTerreno" runat="server" ControlToValidate="iAreaTerreno"><img src="../../../Imagens/iconErro.gif" style="vertical-align:middle" alt="Erro" /> Obrigatório</asp:RequiredFieldValidator> 
                    </td> 
                </tr> 
                <tr> 
                    <td> 
                        Área Construída: 
                    </td> 
                    <td> 
                        <telerik:RadNumericTextBox ID="iAreaConstruida" runat="server" Width="70" Type="Number" MinValue="1" MaxLength="5" MaxValue="32767" DbValue='<%# Bind("AreaConstruida") %>'> 
                            <NumberFormat DecimalDigits="0" /> 
                        </telerik:RadNumericTextBox> 
                        m² 
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator_iAreaConstruida" runat="server" ControlToValidate="iAreaConstruida"><img src="../../../Imagens/iconErro.gif" style="vertical-align:middle" alt="Erro" /> Obrigatório</asp:RequiredFieldValidator> 
                    </td> 
                </tr> 
                <tr> 
                    <td> 
                        Usuário: 
                    </td> 
                    <td> 
                        <asp:Label ID="lLogUsuario" runat="server" Text='<%# Bind("LogUsuario") %>'></asp:Label> 
                    </td> 
                </tr> 
                <tr> 
                    <td> 
                        Data: 
                    </td> 
                    <td> 
                        <asp:Label ID="lLogData" runat="server" Text='<%# Bind("LogData","{0:d}") %>'></asp:Label> 
                    </td> 
                </tr> 
            </table> 
            <telerik:RadGrid ID="gridEnderecos" runat="server" DataSourceID="ldsEnderecos" OnItemDataBound="gridEnderecos_ItemDataBound" AutoGenerateColumns="False" GridLines="None"> 
                <MasterTableView DataKeyNames="CdEndereco" Caption="Endereços" ClientDataKeyNames="CdEndereco" CommandItemDisplay="Top"> 
                    <CommandItemSettings AddNewRecordText=" Adicionar" RefreshText="" /> 
                    <RowIndicatorColumn Visible="False"> 
                        <HeaderStyle Width="20px" /> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn Resizable="False" Visible="False"> 
                        <HeaderStyle Width="20px" /> 
                    </ExpandCollapseColumn> 
                    <Columns> 
                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataFormatString="{0:00000-000}" DataField="CEP" DataType="System.Decimal" FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="CEP" SortExpression="CEP" UniqueName="CEP" HeaderStyle-Width="80"> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Logradouro" FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="Logradouro" SortExpression="Logradouro" UniqueName="Logradouro" HeaderStyle-Width="320"> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Bairro" FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="Bairro" SortExpression="Bairro" UniqueName="Bairro" HeaderStyle-Width="150"> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Cidade" FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="Cidade" SortExpression="Cidade" UniqueName="Cidade" HeaderStyle-Width="150"> 
                        </telerik:GridBoundColumn> 
                    </Columns> 
                </MasterTableView> 
            </telerik:RadGrid> 
        </EditItemTemplate> 
    </asp:FormView> 
 
    <asp:Button ID="bSalvar" runat="server" CausesValidation="True" OnClick="bSalvar_Click" Text="Salvar" Style="margin-right: 10px;" /> 
 

What is happening??

Regards,

Henrique
Paul
Top achievements
Rank 1
 answered on 23 Sep 2009
1 answer
299 views
Hi,
I trying to put some html as text in a radcombobox but I cant figure out how to turn of the automatically htmlencode.
I'm binding my items codebehind:
RadComboBox radComboBoxStatuses = (RadComboBox)gridEditItem.FindControl("radComboBoxStatuses"); 
IList statuses = EnumHelper.ToLocalizedList(typeof(ActionPlanStatus), Resources.resources.ResourceManager); 
 
                        foreach (KeyValuePair<Enum,string> s in statuses) 
                        { 
                            RadComboBoxItem item = new RadComboBoxItem(); 
                             
                            item.Text = "<span class=\"activityStatus timeline_dataRow" + ActionPlanService.GetActivityStatusColor((ActionPlanStatus)s.Key) + "\"></span><span>" + s.Value + "</span>"; 
                            item.Value = s.Key.ToString(); 
                            radComboBoxStatuses.Items.Add(item); 
                        } 

 <telerik:RadComboBox ID="radComboBoxStatuses" runat="server" AllowCustomText="true" > 
</telerik:RadComboBox> 

/Mattias

Simon
Telerik team
 answered on 23 Sep 2009
2 answers
180 views
Hi I insert radinput in Template Column  gird .
Now I want To get the row index that the radinput is in that grid  when key press happen at the client side for that radinput  
 . how can do it ?
    <!------------Radgridname =RadGrid1---------------> 
 
    <telerik:GridTemplateColumn DataField="Name_Item" HeaderText="type description"  
                UniqueName="column1"> 
    
                <ItemTemplate> 
                    <telerik:RadTextBox ID="RadTextBox3" Runat="server" Width="100%"> 
            <ClientEvents  OnKeyPress="keypress" /> 
                    </telerik:RadTextBox> 
                </ItemTemplate> 
    
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="350px" /> 
                <ItemStyle HorizontalAlign="Center" Width="350px" /> 
            </telerik:GridTemplateColumn> 
         
        ....... 
         
        function keypress(sender, eventArgs) 
        { 
            //??????? I want row index , when click on radinput or any key press row selected event not call then I cant get row index with 
            //row selected event 
             
        } 

hamid mn
Top achievements
Rank 1
 answered on 23 Sep 2009
1 answer
90 views
Hi,
i would like to change the order of menus in javascript 
the functionlity i'm trying to provide is let user change the order in javascript 
i have written code for the same(separate popup with menu names where user can reorder the menu names ) but can not able to reflect changes in menu.

Regards
Rakesh Jaimini
Benjamin
Top achievements
Rank 1
 answered on 23 Sep 2009
2 answers
121 views
Hi,
I have been trying to figure out how to make a multicolum combo look nice. I would like to have a border on each side of the table cells but I've found that when I do that there is a gap at the top and bottom of each cell. This makes the border on each side look silly.
How can I make the border on the left and right of each cell look like a single line going down the columns?
Thanks ... Ed


I have the following snippets to illustrate.

.tdMultiColDLL  
{  
    border-style: none solid none solid;  
    border-width: 1px;  
    border-color: #000000;  
}  
 
 
 
                        <telerik:RadComboBox ID="ddlVoucher" runat="server" Skin="Vista" Width="500" MaxHeight="200"   
                            HighlightTemplatedItems="true" AutoPostBack="true" CausesValidation="false">  
                            <HeaderTemplate> 
                                <table style="width: 480px; text-align: left" cellpadding="0" cellspacing = "0">  
                                    <tr> 
                                        <td style="width: 60px;"  align="right" class="tdMultiColDLL">Voucher #</td> 
                                        <td style="width: 250px;"  class="tdMultiColDLL">Vendor/Staff/Customer</td> 
                                        <td style="width: 80px;" align="right"  class="tdMultiColDLL">Pmt Date</td> 
                                        <td style="width: 80px;" align="right" class="tdMultiColDLL">Invoice #</td> 
                                    </tr> 
                                </table> 
                            </HeaderTemplate><ItemTemplate>  
                                <table style="width: 480px; text-align: left" cellpadding="0" cellspacing="0">  
                                    <tr> 
                                    <td style="width: 60px;"   align="right" class="tdMultiColDLL">  
                                       <%#DataBinder.Eval(Container.DataItem, "VoucherId")%>   
                                    </td> 
                                    <td style="width: 250px;" class="tdMultiColDLL" > 
                                       <%#DataBinder.Eval(Container.DataItem, "VendorOrStaff")%>   
                                    </td> 
                                    <td style="width: 80px;" align="right" class="tdMultiColDLL">  
                                       <%#CDate(DataBinder.Eval(Container.DataItem, "PaymentDate")).ToShortDateString%>   
                                    </td> 
                                    <td style="width: 80px;" align="right" class="tdMultiColDLL">  
                                       <%#DataBinder.Eval(Container.DataItem, "InvoiceNumber")%>&nbsp;   
                                    </td> 
                                </tr> 
                            </table> 
                        </ItemTemplate> 
                    </telerik:RadComboBox> 
Ed Staffin
Top achievements
Rank 1
 answered on 23 Sep 2009
3 answers
82 views
is it possible to disable the edit on the back end.. I need to have the user still click the subject however I want to do something different on the back end...  I tried to do 

rsLocationCalendar.AllowEdit =

false;
however it did not do anything... I saw a sample but cannot seem to get it to work in the front end... Any help you can give would be great.

 

Gina
Top achievements
Rank 1
 answered on 23 Sep 2009
2 answers
223 views
Hi,

I have a rad grid which has a calculated column.

<

 

telerik:GridCalculatedColumn HeaderText="User's Name" UniqueName="UsersName" DataType="System.String"

 

 

DataFields="FirstName, LastName" Expression='{0} + "&nbsp;" + {1}' AllowFiltering="true"/>

If an user's name is Peter James and I filter the grid by first name or last name it works fine.If I filter for the full name Peter James,there are no records displayed in the grid.

Could you please let me know how I can filter the grid by full names( FirstName LastName).

Thanks,
Nandita.

 

Nandita Kotha
Top achievements
Rank 1
 answered on 23 Sep 2009
1 answer
117 views

Hello,

I have a client-side OnCommand handler setup for the RadGrid.  It's setup for a page event on the client side, but for some reason, it's being called twice.  I don't know what the issue is there... why would it be called twice?

Thanks.

Brian Mains
Top achievements
Rank 1
 answered on 23 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?