Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
212 views
Hey!
I am using RadWindow to post some comments.
On the main page I have a listview with items, every item has a button named comment, when you click the comment button a new radWindow pops up with a text box and submit button. When you click the submit button the comment is posted and the comment radWindow is closed. Now I need to refresh the listview on parent page with listView.DataBind() command... But I am having some problems in doing that.

Sincerely, Jure
Georgi Tunev
Telerik team
 answered on 03 Jun 2011
7 answers
173 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
143 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
132 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
102 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
259 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
183 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
388 views
please see attached image:
Kate
Telerik team
 answered on 03 Jun 2011
2 answers
186 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
49 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?