Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
151 views

We have developed the application on Windows 7 and it comes by default with IE 8. We tested the application first time on IE 7 and all the look and feel changed completely.

 The grid is not being displayed properly, it's all distorted

Please advise asap

erwin
Top achievements
Rank 1
Veteran
Iron
 answered on 28 Dec 2012
5 answers
96 views
Hi
I add a RadSiteMap to page and set it's 'dir' attribute to 'rtl'. it cause 'RadSiteMap_rtl' class gets added to the rendered html.
But it seem that 'Telerik.Web.UI.WebResource.axd?...' do not return any _rtl css classes for RadSiteMap and
.RadSiteMap .rsmColumn {
    floatleft;
} affect all 'ul' tags to float left.It can get fixed by a simple css class ,But I just want you to know and if I'm right make your wonderful package better. Thank you
Ivan Zhekov
Telerik team
 answered on 28 Dec 2012
1 answer
166 views

I have the AutoCompletBox working on a form, but I want to make sure that I'm doing this right and that there isn't a more efficient way to use this control.

It appears that we have to have this code block below in the postback section of the webpage in order for the AutoCompleteBox to work properly.  We are setting the DataSource to a datatable.  This datatable will end up having over 10,000 rows.  Since this has to be in the postback section to work, everytime the form does a post back it has to retrieve all of those rows whether the user is typing in the AutoCompleteBox or not.  And it will retrieve all 10,000 rows and then filter them down with every 3 second pause in the typing of the AutoCompleteBox.

I assume that there is a better way to do this.  I suppose that we could use a webservice, but doesn't it still require all 10,000 rows to be pulled in each time even after the user has typed a few letters?  Am I correct that this tool always wants the full list and then it filters the rows down afterward?  Does it require this list of rows to be retrieved with each postback?

Code block in postback:

ACInSite.DataSource = SQLRowToDt(ConnStr, "Select siteName, siteID From site")
                    ACInSite.DataTextField = "siteName"
                    ACInSite.DataValueField = "siteID"
                    ACInSite.DataBind()


Princy
Top achievements
Rank 2
 answered on 28 Dec 2012
5 answers
731 views
Hi
i have a column called image in my grid and this images i am binding from database and it's displaying in the radgrid but this image is not exporting to excel using Exporttoexcel command name.

what is the code/properties to export grid data with images into excel.



Thanks
Santosh
Shinu
Top achievements
Rank 2
 answered on 28 Dec 2012
1 answer
772 views
Hi,
I have added a dropdown in InsertItemTemplate as below:

<InsertItemTemplate>
<asp:DropDownList ID="ddlGender" runat="server">
 <asp:ListItem Text="Male" Value="Male"></asp:ListItem>
 <asp:ListItem Text="Female" Value="Female"></asp:ListItem>
</asp:DropDownList>
</InsertItemTemplate>

How to add the dropdown in ItemTemplate as well as the EditItemTemplate of the RAD Grid.

How to set the selectedValue in the ItemTemplate and EditItemTemplate?

Thanks
Princy
Top achievements
Rank 2
 answered on 28 Dec 2012
0 answers
88 views
Hi,
I am inserting data in grid but i want to keep grid in edit mode if validation false. For that i am using e.canceled=true in else part.
But after that cancel is not working in one time i have to click it two times. Please help
 
 protected void rgBankAccount_UpdateCommand(object source, GridCommandEventArgs e)
        {
            if (ViewState["CommandName"] != null)
                strCommandName = ViewState["CommandName"].ToString();
            if (e.Item.OwnerTableView.Name == "Master")
            {
                UserControl ParentUserControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);
                TextBox txtAccount = ParentUserControl.FindControl("txtAccount") as TextBox;
               //Label lblError = ParentUserControl.FindControl("lblError") as Label;
                RadDatePicker rdpAsof = ParentUserControl.FindControl("rdpAsof") as RadDatePicker;
                RadNumericTextBox RNTXTAccountNumber = ParentUserControl.FindControl("RNTXTAccountNumber") as RadNumericTextBox;
                RadNumericTextBox RNTXTBeginningBalance = ParentUserControl.FindControl("RNTXTBeginningBalance") as RadNumericTextBox;
                if (strCommandName == "Update")
                {
                    int AccountID = 0;
                    if (ViewState["AccountID"] != null)
                        AccountID = Convert.ToInt32(ViewState["AccountID"].ToString());
                    int AccountCount = objGetData.GetAccountExist(txtAccount.Text, AccountID, GroupID);
                    if (AccountCount == 0)
                    {
                        objUpdateData.UpdateBankAccount(AccountID, rdpAsof.SelectedDate.ToString(), txtAccount.Text,                        RNTXTAccountNumber.Text, Convert.ToDouble(RNTXTBeginningBalance.Text));
                        ViewState["AccountID"] = null;
                        lblError.Visible = false;
                     
                    }
                    else
                    {
                        lblError.Visible = true;
                        lblError.Text = "Please select another name";
                                             e.Canceled = true; *********************************** //// I have used it here
                    }
                }
                else
                {
                    int AccountCount = objGetData.GetAccountExist(txtAccount.Text, 0, GroupID);
                    if (AccountCount == 0)
                    {
                    objAddData.AddBankAccount(rdpAsof.SelectedDate.ToString(), txtAccount.Text, RNTXTAccountNumber.Text, Convert.ToDouble(RNTXTBeginningBalance.Text), GroupID);
                    lblError.Visible = false;
                    }
                    else
                    {
                        lblError.Visible = true;
                        lblError.Text = "Please select another name";
                       e.Canceled = true; *********************************** //// I have used it here
                    }
                }
            }
        }

Thanks
Manish
Manish
Top achievements
Rank 2
 asked on 28 Dec 2012
3 answers
283 views
Hi,

I am adding TreeListSelectColumn programatically:

 

 

Dim selectColmn As New TreeListSelectColumn()

 

selectColmn =

 

New TreeListSelectColumn()

 

selectColmn.HeaderText =

 

"select"

 

selectColmn.UniqueName =

 

"select"

 

RadTreeList1.Columns.Add(selectColmn)


and I have a template column for displaying Invoice # but column value is 'inv_id'

templateColumn =

 

New TreeListTemplateColumn()

 

templateColumn.HeaderText =

 

"Invoice #"

 

 

 

templateColumn.UniqueName = "inv_id"

 

templateColumn.ItemTemplate =

 

New InvTemplColumn(templateColumn.DataField)

 

RadTreeList1.Columns.Add(templateColumn)

After selecting few invoices I want to perform some actions like- export,print, for which I need inv_id of selected rows(inv_id is not visible in treelist), but I am not able to get inv_id of selected rows.Is there any option using which I can bind value to selectcolumn. Please let me know if you have any solution. It's very urgent.
Thanks in advance.

Shinu
Top achievements
Rank 2
 answered on 28 Dec 2012
0 answers
48 views

RadPane2 is hidden initially on my page. However, I have RadGrid1 in RadPane1, which is visible.

So when I select a row from RadGrid1, this causes the indexchanged event method to fire.  RadPane2.Visible is set to True in that method and I populate the detail fields.  Using the debugger, I see values going into those detail fields. Unfortunately, on my page RadPane2 does not refresh and show me those updated fields.

What am I missing? Any suggestions?


code:
----------------------------

        public void RadDataGrid1_IndexChanged(object sender, EventArgs e)
        {
            RadGrid grid = (sender as RadGrid);
 
            if (grid != null && RadDataGrid1.SelectedIndexes.Count > 0)
            {
                int index = grid.SelectedIndexes[0].GetIntOrZeroIfError();
 
                item = grid.Items[index];

                // Detail fields                  lblDetail_Name.Text = item["Name"].Text;
                lblDetail_Address.Text = item["Address"].Text;



                
                RadPane2.Visible = true;             }         }

----------------------------
Thanks,
Tammie

Tammie
Top achievements
Rank 1
 asked on 27 Dec 2012
2 answers
341 views
I have a grid where I would like to maintain the scroll position when an item in the grid is deleted, but I would like to reset the scroll position to the top when the page is changed.

I think it might be easier to set the SaveScrollPosition to true and reset the scroll on page change, but I am not sure how to implement this in the code behind.  I am using the "NeedDataSource" event to populate the grid.

Thanks.

-Angie
Angie
Top achievements
Rank 1
 answered on 27 Dec 2012
8 answers
1.0K+ views
I am trying to create two of my columns of telerik:GridBoundColumn as Hyperlinks. When the user clicks on the column a popup window comes with the value of the column and user can update that value. I am also using the SUM to add the columns(Price, Price2) and the Grand Total(That is sum of two columns Price, Price2).
I am able to do the SUM and the Grand Total but i am not able to make my two columns (Price and Price2) as links and when user click on the column Price or Price2 a window pops up with the value of the Column. Then the User can update the value and then it updates the SUM and the Grand Total.
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
   <telerik:RadGrid ID="RadGrid1" Width="100%" AllowSorting="True" ShowFooter="True" OnPreRender="RadGrid1_PreRender"
       PageSize="15" AllowPaging="True" OnItemDataBound="RadGrid1_ItemDataBound" AllowMultiRowSelection="True"
       ShowChooser="true" EnableLinqExpressions="False" runat="server" GridLines="None"
       AutoGenerateColumns="False" CellSpacing="0" DataSourceID="SqlDataSource1">
       <MasterTableView Width="100%" Summary="RadGrid table" RetrieveAllDataFields="false"
           DataSourceID="SqlDataSource1">
           <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
           <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
           </RowIndicatorColumn>
           <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
           </ExpandCollapseColumn>
           <Columns>
               <telerik:GridBoundColumn DataField="ProductID" HeaderText="ProductID" DataType="System.Int32"
                   SortExpression="ProductID" FilterControlAltText="Filter ProductID column" ReadOnly="True"
                   UniqueName="ProductID">
               </telerik:GridBoundColumn>
               <telerik:GridBoundColumn DataField="ID" HeaderText="ID" DataType="System.Int32" FilterControlAltText="Filter ID column"
                   SortExpression="ID" UniqueName="ID">
               </telerik:GridBoundColumn>
               <telerik:GridBoundColumn DataField="ProductName" HeaderText="ProductName" FilterControlAltText="Filter ProductName column"
                   SortExpression="ProductName" UniqueName="ProductName">
               </telerik:GridBoundColumn>
               <telerik:GridBoundColumn DataField="Price" HeaderText="Price" SortExpression="Price" UniqueName="price">
               </telerik:GridBoundColumn>
               <telerik:GridBoundColumn DataField="Price2" HeaderText="Price2" SortExpression="Price2" UniqueName=Price2>
               </telerik:GridBoundColumn>
         
           </Columns>
           <EditFormSettings>
               <EditColumn FilterControlAltText="Filter EditCommandColumn column">
               </EditColumn>
           </EditFormSettings>
       </MasterTableView>
       <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
       <FilterMenu EnableImageSprites="False">
       </FilterMenu>
   </telerik:RadGrid>
   <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Rajeev_DBConnectionString %>"
       SelectCommand="SELECT * FROM [product]"></asp:SqlDataSource>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Business;
using Telerik.Web.UI;
 
namespace Telerik_Master_Pages
{
    public partial class TestSum : System.Web.UI.Page
    {
 
        Decimal total;
        Decimal total2;
        Decimal grantotal;
        protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            
            if (e.Item is GridDataItem)
            {
                GridDataItem dataItem = e.Item as GridDataItem;
                Decimal fieldValue = Convert.ToDecimal(dataItem["Price"].Text);
                Decimal Fieldvalue2 = Convert.ToDecimal(dataItem["Price2"].Text);
 
 
                total += fieldValue;
                total2 += Fieldvalue2;
               // grantotal = fieldValue + Fieldvalue2;
            }
            if (e.Item is GridFooterItem)
            {
                grantotal = Convert.ToDecimal(total) + Convert.ToDecimal(total2);
 
                GridFooterItem footerItem = e.Item as GridFooterItem;
                footerItem["Price"].Text = "total: " + total.ToString();
 
                footerItem["Price2"].Text = "total Price2: " + total2.ToString() + "      " + " Grand Total " + grantotal;
 
                 
 
            }
 
 
           
        }
        protected void RadGrid1_PreRender(object sender, EventArgs e)
        {
             
        }
 
    }
}
Rajeev
Top achievements
Rank 1
 answered on 27 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?