Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
421 views
Hi,I need some help with adding column dynamicly by pressing button,
Example:
<asp:textbox runat="server" ID="txtName" />
 <asp:Button runat="server" ID="btnAddColumn" Text="Add Column" />
 <telerik:RadGrid runat="server" ID="gridData" AutoGenerateColumns="false" ShowHeader="true"   Width="100%" Height="500px" ShowStatusBar="true" >
        <MasterTableView  EditMode="InPlace" 
ShowHeader="true" ShowFooter ="true" ShowHeadersWhenNoRecords="true"  >
..........
 </MasterTableView>
    </telerik:RadGrid>

on server side ,on button click event i tryingh to add  GridBoundColumn with name from txtName
and HeaderText from txtName and DataField from txtName,I also updating my datasource with new column
by nothing,the Column is added (i testing it with additional postback button pressing) but there is no visible Header text on client side and the header text on server side is empty too,

    Dim ContainerColumn As New GridBoundColumn
                gridData.MasterTableView.Columns.Add(ContainerColumn)
                AddColumnToData(txtName.Text)
                ContainerColumn.Display = True
                ContainerColumn.HeaderText = txtName.Text
                ContainerColumn.DataField = txtName.Text
                ContainerColumn.UniqueName = ContainerColumn.DataField






Shinu
Top achievements
Rank 2
 answered on 13 Mar 2014
1 answer
166 views
I was wondering if you had an example of how you could use the radeditor with comments using a database to store the comments and radeditor selection.
For example -

A user saves some text in the radeditor - makes some comments etc saves the comments to the saved entry within the radeditor.  Next time they come into that saved entry they can see their comments tied to the saved entry.

Nikolay
Telerik team
 answered on 13 Mar 2014
5 answers
78 views
We experience this graphical glitch sporadically on many of our pages which utilise the RadGrid control but have been unable to find a cause.

Here is the code for this particular grid:

<telerik:RadGrid ID="gridUsers" runat="server" Width="1000" AutoGenerateColumns="false"  
                   AllowPaging="True" PageSize="10" AllowMultiRowSelection="false" OnNeedDataSource="gridUsers_NeedDataSource"
                  OnDeleteCommand="gridUsers_DeleteCommand" >
                <MasterTableView ClientDataKeyNames="UserKey,GroupID,GroupName,UserName,Description,EmailAddress,Timeout,DefaultHomePage,
                FullName,Phone,SMS,Address1,Address2,Address3,PostCode,Private,PrimaryContact,Comments,AllowLogon,ExportReportAccessLevel" DataKeyNames="UserKey,UserName" >
            <Columns>
            <telerik:GridBoundColumn DataField="UserKey" Visible="false" />
                 <telerik:GridBoundColumn DataField="GroupName" Visible="false" />
                  <telerik:GridBoundColumn DataField="GroupID" Visible="false" />
 
                <telerik:GridBoundColumn HeaderText="<%$ Resources:Common, USERNAME %>" DataField="UserName" HeaderStyle-Width="150px">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="<%$ Resources:Common, DESCRIPTION %>" DataField="Description"  HeaderStyle-Width="150px">
                </telerik:GridBoundColumn>  
                <telerik:GridBoundColumn HeaderText="<%$ Resources:Common, EMAIL_ADDRESS %>" DataField="EmailAddress"  HeaderStyle-Width="150px">
                </telerik:GridBoundColumn
                <telerik:GridBoundColumn HeaderText="<%$ Resources:Common, SESSION_TIMEOUT %>" DataField="Timeout"  HeaderStyle-Width="100px">
                </telerik:GridBoundColumn>  
                <telerik:GridBoundColumn HeaderText="<%$ Resources:Common, CONTACT_NAME %>" DataField="FullName"  HeaderStyle-Width="150px">
                </telerik:GridBoundColumn
                <telerik:GridBoundColumn HeaderText="<%$ Resources:Common, PHONE %>" DataField="Phone"  HeaderStyle-Width="150px">
                </telerik:GridBoundColumn
                <telerik:GridBoundColumn HeaderText="<%$ Resources:Common, PRIMARY_GROUP %>" DataField="GroupName"  HeaderStyle-Width="150px">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="SMS" Visible="false" />
                 <telerik:GridBoundColumn DataField="Address1" Visible="false" />
                  <telerik:GridBoundColumn DataField="Address2" Visible="false" />
                  <telerik:GridBoundColumn DataField="Address3" Visible="false" />
                 <telerik:GridBoundColumn DataField="PostCode" Visible="false" />
                  <telerik:GridBoundColumn DataField="Private" Visible="false" />
                   <telerik:GridBoundColumn DataField="PrimaryContact" Visible="false" />
                    <telerik:GridBoundColumn DataField="Comments" Visible="false" />
                     <telerik:GridBoundColumn DataField="AllowLogon" Visible="false" />
   <telerik:GridBoundColumn DataField="ExportReportAccessLevel" Visible="false" />
   <telerik:GridBoundColumn DataField="DefaultHomePage" Visible="false" />
            </Columns>
        </MasterTableView>
        <PagerStyle Mode="Slider" AlwaysVisible="true" ></PagerStyle>
        
       <ClientSettings>
           <ClientEvents OnRowContextMenu="DisplayUsersContextMenu" OnRowSelected="gridUsers_onItemSelect"/>
            <Selecting AllowRowSelect="true" />
            
        </ClientSettings>
                </telerik:RadGrid>
Venelin
Telerik team
 answered on 13 Mar 2014
2 answers
112 views
Hi,

Is it possible to open the LightBox on page load by using a QueryString value - like the Deep linking function in PrettyPhoto for example?

Cheers,

Jack

Jon
Top achievements
Rank 1
 answered on 13 Mar 2014
5 answers
274 views
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
            <Windows>
                <telerik:RadWindow ID="modalPopup" runat="server" Width="360px" Height="360px" Modal="true" Behaviors="Close"   >
                    <ContentTemplate>
                        <div >
                            <table cellspacing="0" cellpadding="0" class="info" width="100%">
                                <tr>
                                    <td align="center" valign="middle" height="175">Pages are about to exit, do you want to save?
                                    </td>
                                </tr>
                            </table>
                            <div class="bottom-buttons cf">
                                <div class="fr">
                                    <a href="#" class="button cancel">Cancel</a>
                                    <a href="#" class="button button-pink">Save</a>
                                </div>
                            </div>
                        </div>
                        <asp:Button ID="Button2" runat="server" Text="Button" />
                    </ContentTemplate>
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>

But In this radwindow, I can be show it in page but I need when this pop is shown at sth in codebehind, code behind must be stop and must wait pop up result. In this radwindow message box shown but code is resuming. I need a message box like      asp messagebox.show("sth"); because I need to wait pop up result. Can you give me example like that ? Note: messagebox must inculde item template property.


Princy
Top achievements
Rank 2
 answered on 13 Mar 2014
0 answers
161 views
Hi Raman,

One suggestion is that you can use both server side and client side code to achieve your scenario. Please take a look into the following code snippet.

C#:
protected void RadButton1_Click(object sender, EventArgs e)
{
    RadWindowManager1.RadConfirm("Are you sure?", "CallBack", 500, 200, null, "Confirm");
}

JavaScript:
<script type="text/javascript">
    function CallBack(args) {
        if (args == true) {
            //write your code
        }
    }
</script>

Thanks,
Shinu.
Shinu
Top achievements
Rank 2
 asked on 13 Mar 2014
2 answers
514 views
Hello,

I am trying to add a RadPanelBar to my web project (ASP .NET AJAX).
I want to do this programmatically (VB or C#).
Inside each RadPanel item I want to place a RadGrid.

I have two problems:

1) I want to display three items of RadPanel items. I want the first item to show as expanded and the others as collapsed.

2) I have a problem handling the event of clicking on an item and then expanding or collapsing the appropriate item.

vb code:

dim x as integer = 0
 
 
 Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
    panel_SideMenu.ExpandMode = PanelBarExpandMode.SingleExpandedItem
End Sub
 
 
 Private Sub setPanel(Of T)(ByVal list As List(Of T), ByRef ArrayNameFilds As Array, nameTitle As String)
 
        If Not IsPostBack Then
 
            Dim radGridTmp As New RadGrid
            radGridTmp.DataSource = list
            setColumnsOnGrid(radGridTmp, ArrayNameFilds)
            radGridTmp.ClientSettings.Selecting.AllowRowSelect = True
            radGridTmp.ClientSettings.EnablePostBackOnRowClick = False
            radGridTmp.ClientSettings.Scrolling.AllowScroll = True
 
            Dim radItemTmp As New RadPanelItem()
            radItemTmp.Text = nameTitle
            radItemTmp.Controls.Add(radGridTmp)
 
            Dim radpanel As New RadPanelItem
            If x = 0 Then
                radpanel.Expanded = True
            End If
            radpanel.Items.Add(radItemTmp)
 
            panel_SideMenu.Items.Add(radpanel)
 
            x += 1
        End If
   End Sub 


aspx:

<telerik:RadPanelBar ID="panel_SideMenu" Runat="server">
        </telerik:RadPanelBar>






Nencho
Telerik team
 answered on 13 Mar 2014
3 answers
116 views
AHi there

We have encountered a massive problem with the ConvertCharactersToEntities ContentFilter.

After disabling the filter for a number of our Editors, we found that the issue went away but this now means that we have to apply the same code-behind concept for a large number of pages.

Is there a way to switch off this particular ContentFilter at the configuration level? I have checked the ToolsFile but no luck.

Regards

A.
Nikolay
Telerik team
 answered on 13 Mar 2014
1 answer
121 views
Hello guys,

i'm having problem with gridtempletecolumn, when i add boundcolums the data shown properly but when i use templetecolum it does not show the data, can any one solve my problem.
Shinu
Top achievements
Rank 2
 answered on 13 Mar 2014
1 answer
235 views
here is my listview

<telerik:RadListView runat="server" ID="lvAllUsers" Width="30px">
                                    <ItemTemplate>
                                        <table>
                                            <tr>
                                                <td >
                                                    <asp:CheckBoxList ID="cbID" runat="server" CssClass="item" Font-Size="15px" RepeatDirection="Horizontal">
                                                        <asp:ListItem Text="    "  > </asp:ListItem>
                                                    </asp:CheckBoxList></td>
                                                <td style="padding-bottom:10px"><%# Eval("FirstName") %></td>
                                                <td style="padding-bottom:10px"><%# Eval("FamilyName") %></td>
                                            </tr>
                                        </table>
                                    </ItemTemplate>
 </telerik:RadListView>

how can I get checkboxlists item text at code behind ? or how can I get FirstName and FamilyName and code behind after I binded my data at pageload? I can't use
     foreach (Telerik.Web.UI.RadListViewItem item in lvAllUsers.Items)
            {
                var cb = item.FindControl(index);
            }
 because index is equals an id normally. But in item template id is not always cbID. When item template iteratives id is changing. I need get FirstName and FamilyName or checkboxlists item at codebehind (c# only not js). How can I do that?





Eyup
Telerik team
 answered on 13 Mar 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?