Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
182 views
am using radcombobox with itemrequested event,while dragging the scroll bar of radcombox the item which is present in the combox is repeated

<EditItemTemplate> 
                <telerik:RadComboBox ID="Programme"  AutoPostBack="true" runat="server" EnableLoadOnDemand="true" Height="200px" OnSelectedIndexChanged="Programme_SelectedIndexChanged" OnItemsRequested="Programme_ItemsRequested" Width="150"/> 
                </EditItemTemplate> 
 
 
 
protected void Programme_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) 
        {                       
            RadComboBox drp = (RadComboBox)sender; 
            e.Context.Clear(); 
            Dv.Table = DropDownDs.Tables[0]; 
            Dv.RowFilter = "Type in ('" + drp.ID + "') and Text like '" + e.Text + "*' "; 
            drp.Items.Clear(); 
            drp.DataTextField = "Text"
            drp.DataValueField = "Value"
            drp.DataSource = Dv
            drp.DataBind(); 
             
        } 

i ve tried with the following properties too
but it doesnt work
ShowMoreResultsBox="true"  EnableVirtualScrolling="true"
or
ShowMoreResultsBox="false"  EnableVirtualScrolling="false"
Simon
Telerik team
 answered on 03 Jun 2011
2 answers
153 views
I have made a grid Master / Detail
In master i have a checkbox (chkDelete) andin Detail i have a checkbox (chk2Delte, chkVisible)

if i click the submit button i want the checked values to be deleted or set on visible true/false
how can i get the value of the ID, and know if the item is checked yes or no?

here is frontend code
<telerik:RadGrid ID="rdgCategories" runat="server" ShowFooter="true" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" GridLines="None" Skin="Hay" AutoGenerateColumns="False" PageSize="50">
                                
        <MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="ID" AllowMultiColumnSorting="True">
            <PagerStyle Mode="NextPrevNumericAndAdvanced" />           
       
              <DetailTables>
              
                    <telerik:GridTableView DataKeyNames="ID" Name="Campagnes" Width="100%">                     
                        <Columns>
                    <telerik:GridTemplateColumn AllowFiltering="false" UniqueName="Bekijk">
                    <ItemTemplate>
                    <a target="_blank" href="../campaign/<%#DataBinder.Eval(Container, "DataItem.URL")%>&aff=<%#DataBinder.Eval(Container, "DataItem.AffiliateID")%>">Bekijk</a>
                     <asp:Label ID="lblID2" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.ID")%>'
                                            Visible="false"></asp:Label>
                    </ItemTemplate>                   
                  </telerik:GridTemplateColumn>
                       
                    <telerik:GridTemplateColumn HeaderText="Campagne naam" SortExpression="Naam" UniqueName="Naam" DataField="Naam">
                        <ItemTemplate>
                        <a href="affiliatescampagnesDetail.aspx?id=<%#DataBinder.Eval(Container, "DataItem.ID")%>"><%#DataBinder.Eval(Container, "DataItem.Naam")%></a>                                           
                    </ItemTemplate>      
                    </telerik:GridTemplateColumn>
                   
                                     
                <telerik:GridTemplateColumn AllowFiltering="False" ShowSortIcon="False"
                    UniqueName="Visible">
                    <HeaderTemplate>Actief<br />
                    <asp:CheckBox id="VisibleChkBoxAll" onclick="SelectAll(this,'chkVisible')" runat="server" ToolTip="Select/Deselect All" AutoPostBack="false"></asp:CheckBox>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="chkVisible" Checked='<%#IIF(DataBinder.Eval(Container, "DataItem.Visible"), True, False)%>' runat="server" />
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="80px" />
                    <ItemStyle HorizontalAlign="Center" />
                </telerik:GridTemplateColumn>
                   
                <telerik:GridTemplateColumn AllowFiltering="False" ShowSortIcon="False"
                    UniqueName="Delete2">
                    <HeaderTemplate>Delete<br />
                    <asp:CheckBox id="Delete2ChkBoxAll" onclick="SelectAll(this,'chk2Delete')" runat="server" ToolTip="Select/Deselect All" AutoPostBack="false"></asp:CheckBox>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="chk2Delete" runat="server" />
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="80px" />
                    <ItemStyle HorizontalAlign="Center" />
                </telerik:GridTemplateColumn>
                   
                 
 
  
                        </Columns>
                    </telerik:GridTableView>
                </DetailTables>
            <Columns>
                <telerik:GridBoundColumn ItemStyle-Width="70px" UniqueName="ID" DataField="ID" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderText="Affiliate ID" SortExpression="ID"></telerik:GridBoundColumn>
               
                 <telerik:GridTemplateColumn HeaderText="Affiliate site" SortExpression="Website" UniqueName="Website" DataField="Website">
                    <ItemTemplate>
                    <a href="affiliatesDetail.aspx?id=<%#DataBinder.Eval(Container, "DataItem.ID")%>"><%#DataBinder.Eval(Container, "DataItem.Website")%></a>                       
                     <asp:Label ID="lblID" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.ID")%>'
                                            Visible="false"></asp:Label>
                    </ItemTemplate>                   
                </telerik:GridTemplateColumn>                       
            
                          
                <telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Center" HeaderText="Aantal campagnes" AllowFiltering="false">
                    <ItemTemplate>
                        <%#GetAantal(DataBinder.Eval(Container, "DataItem.ID"))%>
                    </ItemTemplate>                   
              </telerik:GridTemplateColumn>       
              <telerik:GridTemplateColumn AllowFiltering="False" ShowSortIcon="False"
                    UniqueName="TemplateColumn2">
                    <HeaderTemplate>Delete<br />
                    <asp:CheckBox id="DeleteChkBoxAll" onclick="SelectAll(this,'chkDelete')" runat="server" ToolTip="Select/Deselect All" AutoPostBack="false"></asp:CheckBox>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="chkDelete" runat="server" />
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="80px" />
                    <ItemStyle HorizontalAlign="Center" />
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
        <AlternatingItemStyle BackColor="#EAEAEA" />
    </telerik:RadGrid>


>>>>>>>>>>>>>>>>>><

here is backend code

 

 

 

 

For Each i As GridDataItem In rdgCategories.Items

 

 

 

 

If CType(i.FindControl("chkDelete"), CheckBox).Checked() Then

 

 

 

 

 

 

 

 

myAdmin.DeleteLeadAffiliate(

 

CInt(CType(i.FindControl("lblID"), Label).Text()))

 

 

 

 

End If

 

 

 

 

 

'this works in normal - master only view

 

 

 

 

Next

>> gives error with master detail,
how can i findcontrol the detail rows lblID2 value?

regards
Wouter

 

woutercop
Top achievements
Rank 1
 answered on 03 Jun 2011
1 answer
134 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
104 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
263 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
192 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
395 views
please see attached image:
Kate
Telerik team
 answered on 03 Jun 2011
2 answers
187 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
51 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
122 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?