Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
239 views
Hi,

I want to hide columns in a RadGrid when the selected tab of a TaStrip, in another area of the page isn't the first (based on your wizzard code demo).

I have configured the ajax manager to do it, enabled the post back on the tabstrip and added the following event:

Protected

Sub RadTabStrip1_TabClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTabStripEventArgs) Handles RadTabStrip1.TabClick

If RadTabStrip1.SelectedTab.Text = "Compte Client" Then

RadGrid1.MasterTableView.GetColumn(

"Delete").Visible = True
RadGrid1.MasterTableView.GetColumn("Edit").Visible = True

Else

RadGrid1.MasterTableView.GetColumn(

"Delete").Visible = False
RadGrid1.MasterTableView.GetColumn("Edit").Visible = False

End If

End Sub

This code works at half in the sense of my column are not visible after any click on any tab (on the first "compte client" too) but they never come back Visible.

I also would like to know how I can modify this when I click on the "next" button of the wizzard example because only an user control is loaded in that case.

Thank you for your help,

Herve

shanker bangari
Top achievements
Rank 1
 answered on 04 Jan 2010
1 answer
113 views
Hi,

I am trying to modify the auto generated EditForm becouse I need to use list for example rether then using a text box.
***** I have tried the WebUsercontrol and I get this message: 

Value cannot be null.
Parameter name: virtualPath





**** If I want use the templete, How to create the action button for editing and cancel, 
And, Is there any way to modify the auto generated form to do avoid more work?

best regards, 
Princy
Top achievements
Rank 2
 answered on 04 Jan 2010
1 answer
114 views
I am trying to find a way to configure the editor to show no toolbars what-so-ever. I have tried removing all buttons, but there is still an empty toolbar displayed. Can anyway help?
Shinu
Top achievements
Rank 2
 answered on 04 Jan 2010
1 answer
869 views
Hi

I am trying to push the go button in the edit mode and get a reference to the label lb1 but then get an error:
Unable to cast object of type 'Telerik.Web.UI.GridDataItem' to type 'Telerik.Web.UI.GridEditFormItem'

this is the code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Itemcommand.aspx.vb" Inherits="Itemcommand" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title></title> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <div> 
        <telerik:RadScriptManager runat="server"> 
        </telerik:RadScriptManager> 
        <telerik:RadGrid ID="RadGrid1" runat="server"  GridLines="None" 
             AutoGenerateColumns="False" 
            ShowStatusBar="True" DataSourceID="SqlDataSource1"> 
            <MasterTableView CommandItemDisplay="TopAndBottom" GridLines="None" DataKeyNames="EmployeeID" 
                AllowFilteringByColumn="False" AllowSorting="True" DataSourceID="SqlDataSource1"> 
                <Columns> 
                    <telerik:GridEditCommandColumn UniqueName="EditCommandColumn"> 
                    </telerik:GridEditCommandColumn> 
                    <telerik:GridBoundColumn UniqueName="EmployeeID" HeaderText="EmployeeID" DataField="EmployeeID" 
                        DataType="System.Int32" ReadOnly="True" SortExpression="EmployeeID"> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="City" HeaderText="City" SortExpression="City" 
                        UniqueName="City"> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Country" HeaderText="Country" SortExpression="Country" 
                        UniqueName="Country"> 
                    </telerik:GridBoundColumn> 
                </Columns> 
                <EditFormSettings EditFormType="Template"> 
                    <EditColumn UniqueName="EditCommandColumn1"> 
                    </EditColumn> 
                    <FormTemplate> 
                        <table id="Table3" cellspacing="1" cellpadding="1" width="250" border="0" class="module"> 
                            <tr> 
                                <td> 
                                </td> 
                                <td> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td> 
                                    Country: 
                                </td> 
                                <td> 
                                    <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind( "Country"  ) %>'> 
                                    </asp:TextBox> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td> 
                                    City: 
                                </td> 
                                <td> 
                                    <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind( "City") %>' TabIndex="1"> 
                                    </asp:TextBox> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td> 
                                    <asp:Button ID="btnTest" CommandName="test" text="go" runat="server" /> 
                                    <asp:Label ID="lb1" runat="server"></asp:Label> 
                                </td> 
                            </tr> 
                        </table> 
                        </table> 
                    </FormTemplate> 
                </EditFormSettings> 
            </MasterTableView> 
        </telerik:RadGrid> 
    </div> 
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:nwindConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:nwindConnectionString.ProviderName %>" SelectCommand="SELECT * FROM [Employees]"> 
    </asp:SqlDataSource> 
    </form> 
</body> 
</html> 
 




Imports Telerik.Web.UI 
 
Partial Class Itemcommand 
    Inherits System.Web.UI.Page 
 
    Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand 
        If e.CommandName = "test" Then 
            Dim edititem As GridEditFormItem = CType(e.Item, GridEditFormItem) 
            'get reference to label lb1 
            Dim str As Label = edititem.FindControl("lb1") 
            str.Text = "hallo" 
 
 
        End If 
    End Sub 
End Class 
 


any suggestions?
thanks
D
Shinu
Top achievements
Rank 2
 answered on 04 Jan 2010
8 answers
348 views
Greetings All,

After racking my brain for hours, and spending several more hours searching for an elegant solution, I have yet to find an answer to my problem and am hoping fellow RadControl users or Telerik might point me in the right direction.

Problem:  I would like to place two equally sized vertically oriented RadZones in a DIV such that the radzones + 5px margins fill 100% of the parent container (see conceptual.jpg). However, I have been unable to find the right combination of CSS and RadZone settings to accomplish this task much less find a solution that is browser agnostic.

Code:

<!DOCTYPE html PUBLIC 
\"-//W3C//DTD XHTML 1.0 Transitional//EN\" 
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
<head> 
<title>Proof of Concept App</title> 
<asp:ContentPlaceHolder ID="head" runat="server" /> 
<script type='text/javascript' src='js/jquery-1.3.1.min.js'></script> 
<script type='text/javascript' src='js/easing.js'></script> 
<script type="text/javascript"> 
    $(document).ready(function () { 
 
        $("div#handle").click(function (e) { 
 
            e.preventDefault(); 
            $("div#sidebar_content").toggle("fast"); 
 
        }); 
 
    }); 
</script> 
<link href="css/reset.css" rel="stylesheet" type="text/css" /> 
<link href="css/global.css" rel="stylesheet" type="text/css" /> 
<link href="css/master.css" rel="stylesheet" type="text/css" /> 
 
     
</head> 
<body> 
<form id="form1" runat="server"> 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> 
</telerik:RadAjaxManager> 
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
</telerik:RadScriptManager> 
<div id="pagewrap"> 
<div id="header"> 
<div class="logo"><img src="images/logo.gif" alt="itrack_logo" /></div> 
<div class="info"><%=GetGreeting() %> <b>Username</b>.<br />You have XX action items in your queue.</div> 
<div id="topnav"> 
</div> 
<div id="breadcrumbs"> 
<ul> 
<li><a href="#" title="Dashboard">Dashboard</a></li> 
<li><a href="#" title="Section">Section</a></li> 
<li><a href="#" title="Type">Type</a></li> 
<li>Instance</li> 
</ul> 
</div> 
</div> 
<div id="contentwrap"> 
  <div id="sidebar_content"> 
<rad:RadPanelbar runat="server" ID="RadPanelbar1" Height="100%" Width = "100%"  
                        Skin="WebBlue" ExpandMode="FullExpandedItem" CollapseAnimation-Type="none" ExpandAnimation-Type="None"> 
                        <Items> 
                            <rad:RadPanelItem Text="Menu Item 1" Expanded="true"> 
                                <Items> 
                                    <rad:RadPanelItem> 
                                        <ItemTemplate> 
                                            Lorem<br /> 
                                            Ipsum<br /> 
                                            Dolar 
                                        </ItemTemplate> 
                                    </rad:RadPanelItem> 
                                </Items> 
                            </rad:RadPanelItem> 
                            <rad:RadPanelItem Text="Menu Item 2 COAs"> 
                                <Items> 
                                    <rad:RadPanelItem> 
                                        <ItemTemplate> 
                                            Lorem<br /> 
                                            Ipsum<br /> 
                                            Dolar 
                                        </ItemTemplate> 
                                    </rad:RadPanelItem> 
                                </Items>                            </rad:RadPanelItem> 
                            <rad:RadPanelItem Text="Menu Item 3"> 
                                <Items> 
                                    <rad:RadPanelItem> 
                                        <ItemTemplate> 
                                            Lorem<br /> 
                                            Ipsum<br /> 
                                            Dolar 
                                        </ItemTemplate> 
                                    </rad:RadPanelItem> 
                                </Items> 
                            </rad:RadPanelItem>                                                     
                        </Items> 
                    </rad:RadPanelbar> 
  </div> 
  <div id="handle" ><div class="top"></div><div class="grippy"></div><div class="bottom"></div></div> 
  <div id="main"> 
        <rad:RadDockLayout ID="RadDockLayout1" runat="server" Skin="Web20" > 
    <%--Would like to create two equally sized zones having | 5 px | Zone Left ((Div width - 15)/2) px | 5px | Zone Right ((Div width - 15)/2) px  | 5 px |--%> 
        <rad:RadDockZone ID="zoneLeft" runat="server" Orientation="Vertical" > 
            <rad:RadDock ID="RadDock1" Runat="server"> 
                <ContentTemplate> 
                Lorem Ipsum Dolar 
                </ContentTemplate> 
            </rad:RadDock> 
        </rad:RadDockZone> 
        <rad:RadDockZone ID="zoneRight" runat="server" Orientation="Vertical"> 
        </rad:RadDockZone> 
    </rad:RadDockLayout> 
  </div> 
</div> 
    </div> 
    </form> 
</body> 
</html> 
 

CSS:

div#pagewrap{position:absolute;width:100%;height:100%;margin:0 auto 0 auto}div#contentwrap{position:absolute;top:87px;bottombottom:5px;overflow:scroll;padding-right:5px}div#header{position:relative;top:0;width:100%;height:85px;overflow:hidden;margin:0;background:url(../images/header_bkgd.gif) repeat-x}#header .logo{float:left}#header .info{float:rightright;padding:5px;font-family:arial;color:#fff;font-size:12px;text-align:rightright}#topnav{vertical-align:middle;font-weight:bold;color:#fff;height:43px}#breadcrumbs{position:absolute;top:43px;left:255px;font:13px Arial,Helvetica,sans-serif;background-image:url(../images/bc_bg.gif);background-repeat:repeat-x;height:30px;line-height:30px;color:#ddd;overflow:hidden;margin:0;padding:0;width:100%}#breadcrumbs ul,li{list-style-type:none;padding:0;margin:0}#breadcrumbs li{float:left;display:inline-block;padding-left:10px;height:30px;line-height:30px}#breadcrumbs a{display:inline-block;background-image:url(../images/bc_separator.gif);background-repeat:no-repeat;background-position:rightright;padding-right:15px;text-decoration:none;color:#fff;outline:none;height:30px;line-height:30px}#breadcrumbs .home{border:none;margin:8px 0}#breadcrumbs li a:link,#breadcrumbs li a:visited{text-decoration:none;color:#fff}#breadcrumbs li a:hover,#breadcrumbs li a:focus{color:red}div#sidebar_content{height:100%;border-right:solid 1px #DDD;background-color:#707173;width:300px;float:left}div#handle{height:100%;text-decoration:none;width:10px;float:left;margin-right:5px;background-color:#adadad}#handle .bottombottom{position:absolute;bottombottom:0;width:10px;height:10px;margin:0;padding:0;background:url(../images/sb_bottom.gif) no-repeat bottombottom left;background-color:#fff}#handle .top{position:absolute;top:0;width:10px;height:10px;margin:0;padding:0;background:url(../images/sb_top.gif) no-repeat top left;background-color:#fff}#handle .grippy{position:absolute;top:50%;align:center;background:url(../images/LibC.gif) -178px 0;width:5px;height:20px;margin-left:3px}div#handle.open{background-color:#aaa}div#handle.close{background-color:#ccc}div#main{position:relative;height:100%;width:100%;background-color:#ccc;overflow-y:auto} 


Any help readers can provide would be gratefully appreciated.





Shane Grant
Top achievements
Rank 1
 answered on 04 Jan 2010
2 answers
125 views
I am developing an ASP.NET application that has about 10 different main pages. I'd like to use a TabStrip on the main page with 10 tabs, one for each of the main pages I have. My question is, what is the programming practice for doing this? Do I put all my code into RadViews? By doing that, that would give me one really really big .ASPX file and probably be cumbersome to manage. Is there an alternate way to doing this that I am missing?
Christopher Bishop
Top achievements
Rank 2
 answered on 03 Jan 2010
1 answer
140 views
Hi
After several hours trying I've given up.
I am trying to get values client side when a row in grid is selected
I've used the following script but all I get is a box with "undefined" value
The column "CompanyName" exists on the database/grid, everything seems to be ok, so I don't understand what I am doing wrong ???
Rather frustrating...

Also note that I do have ClientDataKeyNames="ID" added to   <MasterTableView  ....
and ID is my Primary Key

Please help !!!


<script type="text/javascript"> 
 function RowSelected(sender, args) //Client side Rowselected event of radgrid
 { 
     alert(args.getDataKeyValue("CompanyName")); 
 } 
</script> 

griselda sirvent
Top achievements
Rank 1
 answered on 02 Jan 2010
3 answers
584 views
Dear All,

I can't get it to work ...
I reviewed all the forums post regards the NeedDataSource event handlers all the concepts ....

Here is my Issue:
I create a contentpage that exactly matches the tab loadondemad example :
http://demos.telerik.com/aspnet-ajax/tabstrip/examples/applicationscenarios/loadondemand/defaultcs.aspx

But the grids on the loaded user-controls doesn't do any sorting or paging although I implement the OnNeedDatasource event which never fires at all (which cause the sorting or paging miss-behavior).

This is my .ascx grid definition code snippet:
<telerik:RadGrid   
    ID="SummaryCreditGrid"   
    runat="server"                            
    AllowSorting="true" 
    AllowPaging="true" 
    PageSize="5" 
    OnNeedDataSource="SummaryCreditGrid_NeedDataSource">  
    <MasterTableView Width="100%"/>  
</telerik:RadGrid> 
The user-control scenario starts when it loaded and then filled with data using the DisplayValues method that receive a business object (summaryCredit[]) and bind it to the radgrid which I change later to use a datatable when I thought it was the problem.
anyway here is the method:
public void DisplayValues(SummaryCredit[] summaryCredit)  
{  
    DataTable tdt = new DataTable();  
    tdt.Columns.Add("DATA_FROM", typeof(string));  
    tdt.Columns.Add("CATALOGUE_CODE", typeof(string));  
    tdt.Columns.Add("CREDITFACILITY", typeof(string));  
 
    foreach (var credit in summaryCredit)  
    {  
        tdt.Rows.Add(credit.DataFrom, credit.CatalogueCode, credit.Creditfacility);  
    }  
    SummaryCreditGrid.DataSource = tdt;  
    SummaryCreditGrid.DataBind();  
    Session["SummaryCreditGrid"] = tdt;  
} 

and the NeedDataSource method:
protected void SummaryCreditGrid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
{  
    DataTable dt = new DataTable();  
    dt = Session["SummaryCreditGrid"] as DataTable;  
    if (dt != null)  
    {  
        SummaryCreditGrid.DataSource = null;  
        SummaryCreditGrid.DataSource = dt;  
    }  
} 
I put a breakpoint in this method but it never fire !!

What could be my problem ?

Regards
Waleed
Waleed Seada
Top achievements
Rank 2
 answered on 02 Jan 2010
4 answers
105 views
Hi Telerik Team,

When i insert  "<property>......</property>" tag  in radeditor, Status bar show me error javascript.
Present, I need above tag so i can't remove it. Can you show me the reasion ? and how the way for solve it?

I see this error on ie7 browser.

Thanks
HP
hai pham
Top achievements
Rank 1
 answered on 02 Jan 2010
2 answers
124 views
I finally have pasteHTML working pretty well, but I need some help to smooth the behavior across browsers

with this code:
.pasteHtml('<a href="#">link</a><br/> \r\n');

IE8 & FF3.5 will paste the link, and put the cursor below the link. I want it to work this way.

Safari 4 & Chrome 4 will paste the link, but will select the pasted entire link.  

I don't want it to work this way as the next pasteHTML will continuously replace the previous pasteHTML.

I need a way to make Safari and Chrome NOT select (or unselect after the fact) the pasted HTML, like IE & FF does.  

Thanks
christopher willis
Top achievements
Rank 1
 answered on 01 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?