Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
182 views
I have some code that works fine in an aspx page but I would like to use it in a radwindow.
On the page I have numerous input controls but one of the things is a table that has a button that allowas the user to add another row of inputs.  When they hit the button it creates another row in the dynamically created table, but since the rows are created each time I need to reload the old data into the past rows.

private void SetPreviousAccountData(int rowsCount)
       {
           if (Page.IsPostBack)
           {
               Table table = (Table)Page.FindControl("Table1");
               if (table != null)
               {
                   for (int i = 0; i < rowsCount; i++)
                   {
                       //Extracting the Dynamic Controls from the Table
                       DropDownList ddAccount = (DropDownList)table.Rows[i].Cells[1].FindControl("ddAccount" + i + "Col_1");
                       //Use Request objects for getting the previous data of the dynamic textbox
                       ddAccount.Text = Request.Form["ddAccount" + i + "Col_1"];
                       TextBox txtProxy = (TextBox)table.Rows[i].Cells[3].FindControl("txtProxy" + i + "Col_3");
                       //Use Request objects for getting the previous data of the dynamic textbox
                       txtProxy.Text = Request.Form["txtProxy" + i + "Col_3"];
                   }
               }
           }
       }
       private void AddAccount(int rowsCount, bool addNewRow)
       {
           //Sore the current Rows Count in ViewState
           if (addNewRow)
           {
               rowsCount++;
               ViewState["AccountRowCount"] = rowsCount;
           }
           //Creat the Table and Add it to the Page
           Table table = new Table();
           table.ID = "Table1";
           AccountSpan.Controls.Add(table);
           for (int i = 0; i < rowsCount; i++)
           {
               TableRow tRow = new TableRow();
               TableCell lblAccountCell = new TableCell();
               TableCell tcAccountCell = new TableCell();
               TableCell lblProxyCell = new TableCell();
               TableCell tcProxyCell = new TableCell();
               DropDownList ddAccount = new DropDownList();
               TextBox txtProxy = new TextBox();
               lblAccountCell.Text = "Account Number:";
               lblProxyCell.Text = "Proxy:";
               ddAccount.ID = "ddAccount" + i + "Col_1";
               txtProxy.ID = "txtProxy" + i + "Col_3";
               if (ddClientID.SelectedIndex > 0)
               {
                   ClientDataContext db = new ClientDataContext();
                   var query = from p in db.ProxyAccounts
                               where p.ClientID == Int32.Parse(ddClientID.SelectedValue)
                               select new
                               {
                                   p.ProxyAccountID,
                                   Account = p.NameOnAccount + ": " + p.AccountNumber
                               };
                   ddAccount.DataSource = query.ToList();
                   ddAccount.DataTextField = "Account";
                   ddAccount.DataValueField = "ProxyAccountID";
                   ddAccount.DataBind();
                   ddAccount.Items.Insert(0, "");
               }
               tcAccountCell.Controls.Add(ddAccount);
               tcProxyCell.Controls.Add(txtProxy);
               tRow.Cells.Add(lblAccountCell);
               tRow.Cells.Add(tcAccountCell);
               tRow.Cells.Add(lblProxyCell);
               tRow.Cells.Add(tcProxyCell);
               table.Rows.Add(tRow);
           }
           SetPreviousAccountData(rowsCount);
       }


The problem is the line  Table table = (Table)Page.FindControl("Table1");  does not find the table.

I guess if I could find a way to simply just add a new row to the table on the button push this issue would be solved but have not be able to figure that out yet. 

Marin Bratanov
Telerik team
 answered on 03 Jun 2011
1 answer
120 views
I am using coding to call the database. I want to create sub level rad menu
look like below link
http://demos.telerik.com/aspnet-ajax/panelbar/examples/functionality/firstlook/defaultcs.aspx

and different menu have different images , also bind from database, any one can help???

Dimitar Terziev
Telerik team
 answered on 03 Jun 2011
8 answers
306 views
HI,

I am using telerik datagrid paging advanced (Mode="NextPrevNumericAndAdvanced")feature in my project, buttons are not working proper,  only click on any numeric number is woking ,please find attached image for the same

Can any one share share any ideas? Do I need to write any event handlers for making functional/ or telerik is providing the built in feature

<

 

 

telerik:RadGrid runat="server" ID="dgFilingManager" AutoGenerateColumns="False" Height="350px" GridLines="None" Skin="Windows7" OnItemDataBound="dgFilingManager_ItemCommand">

 


 

 

<MasterTableView TableLayout="Fixed" GroupLoadMode="Client" AllowPaging="true" PagerStyle-Mode="NextPrevNumericAndAdvanced" PagerStyle-Position="TopAndBottom" PagerStyle-HorizontalAlign="Center" PagerStyle-PageButtonCount="4" >

 


 

 

<Columns>
<telerik:GridTemplateColumn HeaderText=" FILING" DataField="UCCTYPE" UniqueName="FILING" HeaderStyle-Width="10%" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
<ItemTemplate><asp:Label ID="lblFiling" runat="server" Text="" Visible="true"></asp:Label></ItemTemplate>
</telerik:GridTemplateColumn>
<
telerik:GridBoundColumn DataField="UCCTYPE" HeaderText="UCCTYPE" UniqueName="UCCTYPE" ItemStyle-HorizontalAlign="Left" Visible="false" />
<telerik:GridBoundColumn DataField="LienRefNumber" HeaderText="LIENREFNUMBER" UniqueName="LIENREFNUMBER" Visible="false" />
</Columns>

 

</telerik:RadGrid>
Lp1
Top achievements
Rank 1
 answered on 03 Jun 2011
2 answers
217 views
Dear Telerik development team,

is there any way to create CheckBox columns in RadGrid fully programmatically in the code-behind? 

I have List<string> collection and I would like to add RadGrid (with two columns) to my aspx page. However, I must do this fully programmatically by code-behind. Please, do not ask me why such scenario ;) . 
So, the first column should contain items from List<string> collection, and the second one should contain enabled checkboxes.
Finally, a RadButton to get which items from the RadGrid rows are selected, should be added under the RadGrid.

Can somebody help me to accomplish described scenario by code-behind only, please?
Thank you very much.

Miro
Miroslav
Top achievements
Rank 1
 answered on 03 Jun 2011
9 answers
435 views
please see attached image:
Kate
Telerik team
 answered on 03 Jun 2011
2 answers
193 views
This problem happens only in IE7, the same application works fine in chrome and firefox, i have read all the post in this website but the problem still happens, cannot set the width in the columns because the header text doesn't fix, the grid have a scroll but the space keeps comming, it doesn't happens when MasterTableView TableLayout set to "Fixed", but the columns content doesn't fix.

attach an picture of the problem.


i hope you can help me,

regards

Andres G.

andres
Top achievements
Rank 1
 answered on 03 Jun 2011
1 answer
65 views
Hi

I refered the  Window / RadWindow And MDI from demos Now when i open any new window using javascript from a opened page how to bring the opened page text in tadstrip.

Help !!!

Marin Bratanov
Telerik team
 answered on 03 Jun 2011
2 answers
145 views
Hello,

I'm trying to embed the rotator as mentioned in the telerik examples, but it is not fading the images. The images are moving from right to left and they are not performing the fade effect even the sample is copy paste from the telerik samples.

Here is the code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
  
<head runat="server">
    <title></title>
     <style type="text/css">
        .rotatorBackground
        {
            float: left;
            margin-left: 50px;
            margin-top: 10px;
            width: 440px;
            height: 185px;
            border: solid 2px #dedede;
            -moz-border-radius: 15px;
            -webkit-border-radius: 15px;
        }
        .rotatorStyle
        {
            margin: 40px auto 0px;
        }
        .rotatorStyle .RotatorItem
        {
            margin:5px;
            height: 100px;
            width: 100px;
        }
        .rotatorCarouselStyle
        {
            margin: 0px auto;
        }
        .RotatorItem
        {
            border: solid 1px #dff3ff !important;
        }
        .mainDiv
        {
            margin-bottom: 20px;
        }
        .configurationPanel
        {
            width: 290px;
            border: 0px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
      
    </telerik:RadScriptManager>
    <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="Server" Transparency="30"
        EnableSkinTransparency="false" BackColor="#E0E0E0">
    </telerik:RadAjaxLoadingPanel>
     
    <telerik:RadAjaxPanel ID="AjaxPanel1" runat="server" LoadingPanelID="LoadingPanel1">
        <div class="mainDiv">
            <div class="rotatorBackground">
                
                <telerik:RadRotator ID="RadRotator1" runat="server" Width="224px" Height="112px"
                    CssClass="rotatorStyle" ItemHeight="112" ItemWidth="112" 
                    SlideShowAnimation-Type="Fade" SlideShowAnimation-Duration="3000"  >
                    <Items>
                        <telerik:RadRotatorItem>
                            <ItemTemplate>
<asp:Image runat="server" ID="Image" ImageUrl='Img/Northwind/Customers/Thumbs/ANATR.jpg'
CssClass="RotatorItem" AlternateText="Customer Image" />
                            </ItemTemplate>
                        </telerik:RadRotatorItem>
                        <telerik:RadRotatorItem>
                            <ItemTemplate>
<asp:Image runat="server" ID="Image1" ImageUrl='Img/Northwind/Customers/Thumbs/ANTON.jpg'
CssClass="RotatorItem" AlternateText="Customer Image" />
                            </ItemTemplate>
                        </telerik:RadRotatorItem>
                        <telerik:RadRotatorItem>
                            <ItemTemplate>
<asp:Image runat="server" ID="Image2" ImageUrl='Img/Northwind/Customers/Thumbs/BOTTM.jpg'
CssClass="RotatorItem" AlternateText="Customer Image" />
                            </ItemTemplate>
                        </telerik:RadRotatorItem>
                        <telerik:RadRotatorItem>
                            <ItemTemplate>
<asp:Image runat="server" ID="Image3" ImageUrl='Img/Northwind/Customers/Thumbs/CACTU.jpg'
CssClass="RotatorItem" AlternateText="Customer Image" />
                            </ItemTemplate>
                        </telerik:RadRotatorItem>
                        <telerik:RadRotatorItem>
                            <ItemTemplate>
<asp:Image runat="server" ID="Image3" ImageUrl='Img/Northwind/Customers/Thumbs/CENTC.jpg'
CssClass="RotatorItem" AlternateText="Customer Image" />
                            </ItemTemplate>
                        </telerik:RadRotatorItem>
                        <telerik:RadRotatorItem>
                            <ItemTemplate>
<asp:Image runat="server" ID="Image3" ImageUrl='Img/Northwind/Customers/Thumbs/ERNSH.jpg'
CssClass="RotatorItem" AlternateText="Customer Image" />
                            </ItemTemplate>
                        </telerik:RadRotatorItem>
                        <telerik:RadRotatorItem>
                            <ItemTemplate>
<asp:Image runat="server" ID="Image3" ImageUrl='Img/Northwind/Customers/Thumbs/LAUGB.jpg'
CssClass="RotatorItem" AlternateText="Customer Image" />
                            </ItemTemplate>
                        </telerik:RadRotatorItem>
                        <telerik:RadRotatorItem>
                            <ItemTemplate>
<asp:Image runat="server" ID="Image3" ImageUrl='Img/Northwind/Customers/Thumbs/MAISD.jpg'
CssClass="RotatorItem" AlternateText="Customer Image" />
                            </ItemTemplate>
                        </telerik:RadRotatorItem>
                        <telerik:RadRotatorItem>
                            <ItemTemplate>
<asp:Image runat="server" ID="Image3" ImageUrl='Img/Northwind/Customers/Thumbs/MEREP.jpg'
CssClass="RotatorItem" AlternateText="Customer Image" />
                            </ItemTemplate>
                        </telerik:RadRotatorItem>
                        <telerik:RadRotatorItem>
                            <ItemTemplate>
<asp:Image runat="server" ID="Image3" ImageUrl='Img/Northwind/Customers/Thumbs/OCEAN.jpg'
CssClass="RotatorItem" AlternateText="Customer Image" />
                            </ItemTemplate>
                        </telerik:RadRotatorItem>
                    </Items>
                </telerik:RadRotator>
            </div>
        </div>
    </telerik:RadAjaxPanel>
  
    </form>
</body>
</html>

Thanks for your help
Mike_T
Top achievements
Rank 1
 answered on 03 Jun 2011
1 answer
115 views
hi,

how to hide parent radwindow behaviours when open child radwindow in javascript and how to enable parnet radwindow behaviour when close child radwindow


regards,
asiq
Marin Bratanov
Telerik team
 answered on 03 Jun 2011
5 answers
509 views
Hi
I'm using a hierarchical grid. In one of them I defined columns but all of them is set to visible = false. All of these columns I binded manualy in nested view template. The grid have just one row. Nested view template is automaticaly expanded. I want to place the edit and the delete button onto view template instead to having them in column (e. g. GridEditCommandColumn). Is this possible ?

I'm using this because I don't want to loose the automatic update delete and insert abilities.

Thank you very much.

Tibor
Princy
Top achievements
Rank 2
 answered on 03 Jun 2011
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?