Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
383 views
Hi how can I create gridtemplatecolumn in code behind. currently I'm creating my grid purely on codebehind. There where no problem using bound column and dropdown column but I need to create a template column which at the moment I dont know how to instantiate like asp checkbox or a label. Any information would be much appreciated.

Thank in advance,
RJ
RJ
Top achievements
Rank 1
 answered on 04 Jan 2010
3 answers
205 views
The following works fine:

<telerik:raddock id="RadDock1" runat="server"     
                            onclientdockpositionchanged="OnClientDockPositionChanged" title="RadDock1" text="RadDock1">    
</telerik:raddock>    
  
function OnClientDockPositionChanged(dock) {  
  
    var selectedFields = $find('<%= RadDockZoneSelectedFields.ClientID %>');  
    var totalFields = selectedFields.get_docks().length;  
    var fieldArray = selectedFields.get_docks();  
      
    for (var i =0; i < totalFields; i++) }  
        alert(fieldArray[i].get_uniqueName());  
    }  
}  

But, if I create a raddock dynamically (see code below) and try to attach a client-side event to it, I get the following javascript error: "OnClientDockPositionChanged is not defined." Why?

        Dim dock As New RadDock() 
 
        dock.DockMode = DockMode.Docked 
        dock.OnClientDockPositionChanged = "OnClientDockPositionChanged" 
        dock.CommandsAutoPostBack = False 
        dock.EnableViewState = False 
        dock.DefaultCommands = Telerik.Web.UI.Dock.DefaultCommands.None 
        dock.AutoPostBack = False 
        dock.UniqueName = Uniquename
        dock.ID = "dockid" 
        dock.Title = "dock title" 
        dock.Width = Unit.Pixel(300) 
 

Ivan Queiroz
Top achievements
Rank 1
 answered on 04 Jan 2010
1 answer
121 views

Can I binding my obeject's property to CheckedItems?
The property can be List<int> (my DataValueField in int) or List<RadListBoxItem> or other.
I need on load the ListBox checked what there are in my property and on save I need in my property there are checked items.

is it possibile?

(I'm sorry fot my bad english)

Genady Sergeev
Telerik team
 answered on 04 Jan 2010
6 answers
196 views
Hi,

I'd like to accomplish the following:
1. Consume temperature data from a reliable source (using web service or whatever method is better?)
2. Display the data in RadChart
I'm new at this so I don't know what's the best way to do this. Any website/tutorial/samples from you would be greatly appreciated.

Thanks,
Han
Schlurk
Top achievements
Rank 2
 answered on 04 Jan 2010
2 answers
81 views
I'm using a hierarchical grid with a template. My implementation looks quite similar to the demo (http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx). In my case, however, I want the nested grid (ID=OrdersGrid in the demo) to create records.

I'm having a terrible time getting access to the 'EmployeeID' value during the insert operation, which I need to manually initialize the column value. Using the demo as an example, how would I access the EmployeeID value in my initialization code in OrdersGrid_ItemCommand()?

TIA 
Dave Hayward
Top achievements
Rank 1
 answered on 04 Jan 2010
3 answers
267 views
I have a GridCalculatedColumn with a datetime expression (returns a timespan), the option DataFormatString don't work!

Why?

                                <telerik:GridCalculatedColumn DataFields="DataOraFineSessione,DataOraInizioSessione" Expression="{0}-{1}"
                                    HeaderText="Durata" UniqueName="Durata" DataType="System.TimeSpan"
                                    DataFormatString="{0:T}">
                                </telerik:GridCalculatedColumn>

I work with the last versione of telerik controls for asp.net 3.5.

Andrea
Daniel
Telerik team
 answered on 04 Jan 2010
1 answer
77 views
Hi,

this is shanker am doing one project using telerik controls my requirement is in rad combo box selectedindex change event populate the details in Radgridveiw .But in edit event it,s didnot open the edit columns am face postabak error my code is 

 if (!IsPostBack)
            {
                Facility.DataSource = studentremarks.org_view_facility_lookup();
                Facility.DataBind();
                
            }
        }
        public void getdata()
        {
            grdstudentremarks.DataSource = studentremarks.sch_view_sch_student_remark_list(RadcomFiscalyear.SelectedValue.GetInteger(), Radcomclass.SelectedValue.GetInteger());
            grdstudentremarks.DataBind();
        }
        protected void Facility_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            RadcomFiscalyear.DataSource = Feeschedulemanager.sch_view_fiscal_year_lookup(Facility.SelectedValue.GetInteger());
            RadcomFiscalyear.DataBind();
            Radcomclass.DataSource = studentremarks.sch_view_class_lookup(Facility.SelectedValue.GetInteger());
            Radcomclass.DataBind();
        }
   protected void grdstudentremarks_PreRender(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                GridColumn editColumn = grdstudentremarks.MasterTableView.GetColumn("EditCommandColumn");
                if (editColumn != null) { editColumn.Visible = CanUpdate; }
                GridColumn deleteColumn = grdstudentremarks.MasterTableView.GetColumn("DeleteCommandColumn");
                if (deleteColumn != null) { deleteColumn.Visible = CanDelete; }
                if (!CanInsert)
                {
                    HideInsertCol(grdstudentremarks);
                }
                getdata();
            }
        }

please it's argent
Pavlina
Telerik team
 answered on 04 Jan 2010
6 answers
153 views

I have created a panelbar that has 3 sections.  The second section always comes up when the page is loaded.  I would like for the 1st to come up instead.  What properties would I set to make this happen?  I have had various properties set before and nothing has helped so far.  One that I was using is [  Selected="true"  ] for the section I wanted to open up on when the page loads, but to no avail.

<telerik:RadPanelBar runat="server" ID="RadPanelBar1" ExpandMode="SingleExpandedItem" Width="800px" Height="750px">     
        <Items>    
          <telerik:RadPanelItem Text="Project Search" runat="server" Selected="true" Font-Bold="true">      
            <Items>    
              <telerik:RadPanelItem Value="ProjectSearch" runat="server">     
                <ItemTemplate>    
                   ...     
                </ItemTemplate>    
              </telerik:RadPanelItem>    
            </Items>    
          </telerik:RadPanelItem>    
          <telerik:RadPanelItem Text="Contract Search" runat="server" Font-Bold="true">     
            <Items>    
              <telerik:RadPanelItem Value="ContractSearch" runat="server">     
                <ItemTemplate>    
                  ...     
                </ItemTemplate>    
              </telerik:RadPanelItem>    
            </Items>    
          </telerik:RadPanelItem>    
          <telerik:RadPanelItem Text="SOI Search" runat="server" Font-Bold="true">     
            <Items>    
              <telerik:RadPanelItem Value="SOISearch" runat="server">     
                <ItemTemplate>    
                  ...     
                </ItemTemplate>    
              </telerik:RadPanelItem>    
            </Items>    
          </telerik:RadPanelItem>    
        </Items>    
        <CollapseAnimation Duration="100" Type="None" />    
        <ExpandAnimation Duration="100" Type="InElastic" />    
    </telerik:RadPanelBar>   

FYI - I would like to use the aspx-side to set these properties instead of the cs-side.

Any help would be great.  Thanks!
Wendy Hunt
Top achievements
Rank 2
 answered on 04 Jan 2010
2 answers
64 views

I use Popup Edit Form to add new and update existing record in grid. Whe I add new records the Popup form works fine, when I want to edit existing record the popup form shows up, but I cannot type in its controls.

Any suggestions?

P.S. it is only happens at IE.

Yana
Top achievements
Rank 1
 answered on 04 Jan 2010
1 answer
136 views
I've been experimenting with the FileExplorer, specifically connecting the FileExplorer to a SQL DB based on this article. So far, this solution seems to be a fit for my current needs. But, I'd like to see if I can extend the functionality so that when certain files are opened they are opened in a RadEditor (or other text editing control - but I'd prefer a RadEditor). For example, I want to be able to edit a text file (.xml, .txt, etc...) and ultimately save the changes.

I believe the above example relies on a DBContentProvider as well as a handler, which I'm not yet quite grasping, and I suspect this might effect how a RadEditor solution is implemented. So, I'm hoping someone can help me solve my objective.

I'd also like to ask for suggestions on learning resources or the like where I can learn more about what's going on here. I know the code here says a lot but there's much of it that is still way over my head. I'm hoping for something (book, video, etc...) that "holds my hand" as it explains the ins and outs of what's going on. Perhaps a bit much to ask for but I thought I'd throw it out there.

Many thanks,
Michael
Fiko
Telerik team
 answered on 04 Jan 2010
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?