Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
288 views
Hi:

What is the best way to wrap long items in a RadComboBox, such that:

1. An ellipsis is displayed for long names;
2. The items do not wrap and span more than 1 line;
3. On hovering on item, full text is displayed as tooltip;

I read that there is a "TextClipper" that can be used for this purpose, but I did not find any examples.

Any help will be appreciated.

Thanks .. Rohit Dehar
Yana
Telerik team
 answered on 09 Dec 2009
2 answers
295 views
I want to create two tabs one with grid and one with radchart and one grid in other tab but it will be invisible .Is it possible to create all these without using usercontrol.Please give some example code.
Thanks
Princy
Top achievements
Rank 2
 answered on 09 Dec 2009
3 answers
425 views
Hi All,

I am calling radwindow through parent.asxp page, within a that radwindow have one child.aspx page and that page have two tab i.e. One, and Two, within a One tab have a One.ascx user control, and Two tab has a Two.ascx user control. Two.ascx user control have one button, when i click on that buttton it should close radwindow as well as refresh radGrid1 available in parent page, without postback.

Please reply me.


Thanks & Regards,
Amit
Georgi Tunev
Telerik team
 answered on 09 Dec 2009
1 answer
161 views
I have a grid with an edit form template.  I am having a heck of a time binding the controls in the edit form when a row is selected.  When I try and perform a find control the control is always null.  Please help!
<asp:ObjectDataSource ID="CurrencyDataSource" runat="server"   
                SelectMethod="RetrieveLookupsByLookupTypeId"   
                TypeName="Graebel.RITS.Components.BusinessManagers.LookupManager">  
                <SelectParameters> 
                    <asp:Parameter DefaultValue="106" Name="lookupTypeId" Type="Int32" /> 
                </SelectParameters> 
            </asp:ObjectDataSource> 
            <asp:ScriptManager ID="ScriptManager1" runat="server">  
            </asp:ScriptManager> 
            <telerik:RadGrid ID="RemittanceGrid" runat="server" AllowAutomaticInserts="True" 
                AllowAutomaticUpdates="True" AllowSorting="True" AutoGenerateColumns="False" 
                GridLines="None" Skin="Telerik" ShowStatusBar="True"   
                OnItemCommand="RemittanceGrid_ItemCommand" AutoGenerateEditColumn="True"   
                onneeddatasource="RemittanceGrid_NeedDataSource"   
                onitemdatabound="RemittanceGrid_ItemDataBound">  
                <pagerstyle mode="NumericPages" alwaysvisible="true" /> 
                <mastertableview width="100%" commanditemdisplay="Top" datakeynames="VendorRemittanceId" 
                    allowautomaticinserts="True">  
                    <Columns> 
                        <telerik:GridBoundColumn UniqueName="RemittanceId" DataField="Remittance.RemittanceId">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn HeaderText="Bank Name" UniqueName="BankName" DataField="Remittance.BankName">  
                        <HeaderStyle HorizontalAlign="Center" /> 
                        <ItemStyle HorizontalAlign="Center" /> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn HeaderText="Account #" UniqueName="Account" DataField="Remittance.AccountNumber">  
                        <HeaderStyle HorizontalAlign="Center" /> 
                        <ItemStyle HorizontalAlign="Center" /> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn HeaderText="Currency" UniqueName="Currency" DataField="Lookups.Text.Description">  
                        <HeaderStyle HorizontalAlign="Center" /> 
                        <ItemStyle HorizontalAlign="Center" /> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn HeaderText="Sequence" UniqueName="Sequence" DataField="SequenceNum">  
                        <HeaderStyle HorizontalAlign="Center" /> 
                        <ItemStyle HorizontalAlign="Center" /> 
                        </telerik:GridBoundColumn> 
                    </Columns> 
                    <EditFormSettings EditFormType="Template">  
                        <FormTemplate> 
                            <table style="width: 100%;">  
                                <tr> 
                                    <td> 
                                        Currency:  
                                    </td> 
                                    <td> 
                                        <asp:DropDownList AppendDataBoundItems="true" ID="DropDownList1" runat="server" DataSourceID="CurrencyDataSource"   
                                        DataTextField="Description" DataValueField="LookupId" > 
                                        <asp:ListItem Text="Select" Value=""></asp:ListItem> 
                                        </asp:DropDownList> 
                                    </td> 
                                    <td> 
                                        Non-Currency Specific Vendor:  
                                    </td> 
                                    <td> 
                                        <asp:CheckBox ID="CheckBox1" runat="server"  /> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        Bank Sequence:  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox1" runat="server" ></asp:TextBox> 
                                    </td> 
                                    <td> 
                                        Account #:  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox2" runat="server" ></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        Payable Name:  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox3" runat="server" ></asp:TextBox> 
                                    </td> 
                                    <td> 
                                        ABA Transit Route #:  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox4" runat="server" ></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        Swift Code:  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox5" runat="server" ></asp:TextBox> 
                                    </td> 
                                    <td> 
                                        ISO Package Received:  
                                    </td> 
                                    <td> 
                                        <asp:CheckBox ID="CheckBox2" runat="server" /> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        Bank Name:  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox6" runat="server" ></asp:TextBox> 
                                    </td> 
                                    <td> 
                                        Bank Address:  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox7" runat="server" ></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        &nbsp;  
                                    </td> 
                                    <td> 
                                        &nbsp;  
                                    </td> 
                                    <td> 
                                        &nbsp;  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox8" runat="server" ></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        City:  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox9" runat="server" ></asp:TextBox> 
                                    </td> 
                                    <td> 
                                        &nbsp;  
                                    </td> 
                                    <td> 
                                        <uc1:StateCountryFields ID="m_stateCountryFields" runat="server" /> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        Zip:  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox10" runat="server" ></asp:TextBox> 
                                    </td> 
                                    <td> 
                                        &nbsp;  
                                    </td> 
                                    <td> 
                                        &nbsp;  
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' 
                                            runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>  
                                        </asp:Button> 
                                        <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" 
                                            CommandName="Cancel"></asp:Button> 
                                    </td> 
                                    <td> 
                                        &nbsp;  
                                    </td> 
                                    <td> 
                                        &nbsp;  
                                    </td> 
                                    <td> 
                                        &nbsp;  
                                    </td> 
                                </tr> 
                            </table> 
                        </FormTemplate> 
                    </EditFormSettings> 
                </mastertableview> 
            </telerik:RadGrid> 
protected void RemittanceGrid_ItemDataBound(object sender, GridItemEventArgs e)  
        {  
            if (e.Item is GridCommandItem && e.Item.IsInEditMode)  
            {  
                DropDownList currency = (DropDownList)e.Item.FindControl("ddlCurrency");  
                HiddenField vrId = (HiddenField)e.Item.FindControl("VendorRemittanceId");  
                CheckBox isGlobal = (CheckBox)e.Item.FindControl("chkGlobalCurrency");  
                RadNumericTextBox sequenceNum = (RadNumericTextBox)e.Item.FindControl("SequenceNum");  
                TextBox ABA = (TextBox)e.Item.FindControl("m_tbABATransitNumber");  
                TextBox accountNumber = (TextBox)e.Item.FindControl("m_tbAccountNumber");  
                TextBox payableName = (TextBox)e.Item.FindControl("m_tbPayableName");  
                TextBox swiftCode = (TextBox)e.Item.FindControl("m_tbSwiftCode");  
                TextBox bankName = (TextBox)e.Item.FindControl("m_tbBankName");  
                CheckBox ISO = (CheckBox)e.Item.FindControl("m_cbISOPackageReceived");  
                UserControl stateCountry = (UserControl)e.Item.FindControl("m_stateCountryFields");  
                TextBox address1 = (TextBox)e.Item.FindControl("m_tbBankAddress");  
                TextBox address2 = (TextBox)e.Item.FindControl("m_tbBankAddress2");  
                TextBox city = (TextBox)e.Item.FindControl("m_tbBankCity");  
                TextBox zip = (TextBox)e.Item.FindControl("m_tbBankPostalCode");  
                HiddenField addressId = (HiddenField)e.Item.FindControl("AddressId");  
 
                VendorPaymentInfoManager vpim = new VendorPaymentInfoManager();  
                int RemittanceId = 0;  
                Int32.TryParse(e.Item.Cells[2].Text, out RemittanceId);  
                Graebel.RITS.Components.RitsEntityDal.VendorRemittance remit = new Graebel.RITS.Components.RitsEntityDal.VendorRemittance();  
                Graebel.RITS.Components.RitsEntityDal.Addresses remitAddress = new Addresses();  
                if (RemittanceId != 0)  
                {  
                    remit = vpim.GetRemittanceInfo(RemittanceId);  
                    remitAddress = vpim.GetRemittanceAddressInfo(remit.Remittance.RemittanceId);  
                }  
                if (currency != null)  
                {  
                    currency.SelectedValue = remit.Lookups.LookupId.ToString();  
                }  
                if (vrId != null)  
                {  
                    vrId.Value = remit.VendorRemittanceId.ToString();  
                }  
                if (isGlobal != null)  
                {  
                    isGlobal.Checked = remit.IsGlobalCurrency;  
                }  
                if (sequenceNum != null)  
                {  
                    sequenceNum.Value = remit.SequenceNum;  
                }  
                if (ABA != null)  
                {  
                    ABA.Text = remit.Remittance.ABATransitRoutingNumber;  
                }  
                if (accountNumber != null)  
                {  
                    accountNumber.Text = remit.Remittance.AccountNumber;  
                }  
                if (payableName != null)  
                {  
                    payableName.Text = remit.Remittance.PayableName;  
                }  
                if (swiftCode != null)  
                {  
                    swiftCode.Text = remit.Remittance.SWIFTCode;  
                }  
                if (bankName != null)  
                {  
                    bankName.Text = remit.Remittance.BankName;  
                }  
                if (ISO != null)  
                {  
                    ISO.Checked = remit.Remittance.HasISOPackage.Value;  
                }  
                if (stateCountry != null)  
                {  
                    RITS.Web.Controls.TypedDropDownList state = (RITS.Web.Controls.TypedDropDownList)stateCountry.FindControl("m_ddlState");  
                    RITS.Web.Controls.TypedDropDownList country = (RITS.Web.Controls.TypedDropDownList)stateCountry.FindControl("m_ddlCountry");  
                    state.SelectedValue = remitAddress.States.StateId.ToString();  
                    country.SelectedValue = remitAddress.Countries.CountryId.ToString();  
                }  
                if (address1 != null)  
                {  
                    address1.Text = remitAddress.Address1;  
                }  
                if (address2 != null)  
                {  
                    address2.Text = remitAddress.Address2;  
                }  
                if (city != null)  
                {  
                    city.Text = remitAddress.City;  
                }  
                if (zip != null)  
                {  
                    zip.Text = remitAddress.Zip;  
                }  
                if (addressId != null)  
                {  
                    addressId.Value = remitAddress.AddressId.ToString();  
                }  
            }  
        }  
 
protected void RemittanceGrid_ItemCommand(object source, GridCommandEventArgs e)  
        {  
            if (e.CommandName == RadGrid.InitInsertCommandName)  
            {  
 
                e.Canceled = true;  
                //Prepare an IDictionary with the predefined values  
                System.Collections.Specialized.ListDictionary newValues = new System.Collections.Specialized.ListDictionary();  
                newValues["IsGlobalCurrency"] = false;  
                newValues["Remittance.AccountNumber"] = string.Empty;  
                newValues["Remittance.PayableName"] = string.Empty;  
                newValues["Remittance.ABATransitRoutingNumber"] = string.Empty;  
                newValues["Remittance.SWIFTCode"] = string.Empty;  
                newValues["Remittance.HasISOPackage"] = false;  
                newValues["Remittance.BankName"] = string.Empty;  
                newValues["Remittance.Addresses.Address1"] = string.Empty;  
                newValues["Remittance.Addresses.Address2"] = string.Empty;  
                newValues["Remittance.Addresses.City"] = string.Empty;  
                newValues["Remittance.Addresses.Zip"] = string.Empty;  
                newValues["Lookups.LookupId"] = string.Empty;  
 
                //Insert the item and rebind  
                e.Item.OwnerTableView.InsertItem(newValues);  
            }              
        } 
Princy
Top achievements
Rank 2
 answered on 09 Dec 2009
1 answer
170 views
I am using the following code to change the header on a grid:

protected

 

void RouteInquiryGrid_ItemDataBound(object sender, GridItemEventArgs e)

 

{

 

if ((e.Item is GridHeaderItem))

 

{

 

GridHeaderItem header = (GridHeaderItem)e.Item;

 

 

if (SessionHelper.Instance.WeightUOM.Id == WeightUOM.English.Id)

 

{

header[

"ContainerWeightQty"].Text = "Weight" + WeightUOM.GetAsString(WeightUOM.English.Id);

 

}

 

else

 

{

header[

"ContainerWeightQty"].Text = "Weight" + WeightUOM.GetAsString(WeightUOM.Metric.Id);

 

}

}

}

This works great and the header text is changed.  However, when I do this I lose the ability to sort on the column.  Is there an easy way to get the sort active again.

Thanks,

- Adam

Shinu
Top achievements
Rank 2
 answered on 09 Dec 2009
2 answers
198 views
Inside templatecolumn of radGrid, I have a radio Button. I want to check its value on client side. I had written following code

 var grid = $find("<%=radGridQuotes.ClientID%>");
    var MasterTable = grid.get_masterTableView();
    var Rows = MasterTable.get_dataItems();  
    for (var i = 0; i < Rows.length; i++)
    {
        var row = Rows[i];

//After this i dont know how to find the radio button control. i tried    var radioButton = row.findControl("radioButtonApprove");  but this is throwing error as propert cant be found. can anyone help me on this?....

}

Abhinav Katiyaar
Top achievements
Rank 1
 answered on 09 Dec 2009
2 answers
67 views
Hi guys,

I got a problem regarding user chooses a specified option in combobox, poping up a new window for user.

the aspx code just put a telerik radcombobox on the web page and set SelectIndexChanged event
backend code are:

 protected void ddlClient1_SelectedIndexChanged(object sender, EventArgs e)
      {
         if (ddlClient1.SelectedValue.Equals("-1"))
            {
            string script = "alert('aabb')";

            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), ((Telerik.Web.UI.RadComboBox)sender).ClientID, script, true);
         }
      }

but it doesn't work.

Thanks

Alex
Simon Durant
Top achievements
Rank 1
 answered on 08 Dec 2009
0 answers
113 views
Is there a limit to the number of PageViews and/or content of the PageView before performance starts to suffer?

I have a tabstrip with five PageViews.  Each page view has 15 to 20 controls in it.

When I switch tabs, there is a very noticeable lag (about 1s) between each click.

Any AJAX that fires inside these views show lag as well.

Jaime Fuhr
Top achievements
Rank 1
 asked on 08 Dec 2009
0 answers
151 views
Hi - I need a way to associate a file got form a form post to the Radupload control on the destination page.

Consider there is a source form(form1) that has an upload control and from there you Submit using POST  it to the other form(form2), in the destination form(form2) we want to attach any file(s) from the previous form to the RadUpload in the code behind before the page (form2) renders. This will give a chance for the user to view the upload file on form2 and submit to DB from here.

Thanks,
~Naga

Naganand Mavnur
Top achievements
Rank 1
 asked on 08 Dec 2009
0 answers
101 views
Hello,

I assign 4-5 ites for date as 8 December at that time all items are alphabatic order , but when i copy this item and paste it on the next date / add new item to the next date i.e 9 dec, and then i check the Order of 8th Dec , item, itsnot set in alphabatic order... the appoint ment position is changed upon everytime adding a item to any other date...?

Hoe can i maintain the alphabatic order , such that its not changed upon adding / removing items to any other date on this calendar..

Regards
Samir
Samir Patel
Top achievements
Rank 1
 asked on 08 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?