Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
99 views
Hello.

I have my own web control which contains DateTimePicker.
protected override void Render(HtmlTextWriter writer)  
        {  
            //base.Render(writer);  
            this.SetInputNameAndControlID();  
 
            if (!this.DesignMode)  
                sm.RegisterScriptDescriptors(this);  
 
            dateTimePicker.ID = this.ID + "dateTimePicker";  
 
            // nastavení hodnoty              
            if (this._value != System.DateTime.MinValue)  
                thisthis.dateTimePicker.SelectedDate = this._value;  
            else  
                this.dateTimePicker.SelectedDate = null;  
              

As you can see I am trying to assign value to datetimepicker during its Render method.

The datetimepicker value is assigned only to popup calendar and not to the input textbox. Its input textbox is empty.

:-(

Thank you
Princy
Top achievements
Rank 2
 answered on 13 Feb 2009
8 answers
515 views

Hi,

I've got the requirement to cancel grid edit/insert mode from a button outside the grid.  Please, advise whether this can be done.

Thanks
Vinhlan

Princy
Top achievements
Rank 2
 answered on 13 Feb 2009
3 answers
203 views
My development environtment
OS: WinXP
Browser: IE 7.0.5731
RadTools: Version=2008.2.826.20
.Net: 2.0

I am trying to edit information in a nested radgrid. I want to make Line 22-23 a DropDownlist box, that will allow a user to choose a different Assigned User upon Edit. The page runs fine when it is just a GridBoundColumn as you can see in this image:
Sample of my Nested Grid

Here is the code that is running the nested grid on the bottom:
<telerik:RadGrid ID="rgGroupInformation" runat="server" AutoGenerateColumns="False" 
                            GridLines="None" Skin="Office2007" OnDetailTableDataBind="rgGroupInformation_DetailTableDataBind" 
                            OnEditCommand="rgGroupInformation_EditCommand" OnItemCreated="rgGroupInformation_ItemCreated">  
                            <MasterTableView EditMode="InPlace" DataKeyNames="BatchGroupId">  
                                <DetailTables> 
                                    <telerik:GridTableView runat="server" DataKeyNames="BatchId" DataMember="GroupDetails">  
                                        <ParentTableRelation> 
                                            <telerik:GridRelationFields DetailKeyField="BatchGroupId" MasterKeyField="BatchGroupId" /> 
                                        </ParentTableRelation> 
                                        <RowIndicatorColumn> 
                                            <HeaderStyle Width="20px" /> 
                                        </RowIndicatorColumn> 
                                        <ExpandCollapseColumn> 
                                            <HeaderStyle Width="20px" /> 
                                        </ExpandCollapseColumn> 
                                        <Columns> 
                                            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Edit">  
                                            </telerik:GridButtonColumn> 
                                            <telerik:GridBoundColumn DataField="CustodianName" HeaderText="Custodian" ReadOnly="True" 
                                                UniqueName="Custodian">  
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="AssignedUser" HeaderText="Assigned User" UniqueName="AssignedUser">  
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="Priority" HeaderText="Priority" UniqueName="Priority">  
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridCheckBoxColumn DataField="OnHold" HeaderText="On Hold" UniqueName="OnHold">  
                                            </telerik:GridCheckBoxColumn> 
                                            <telerik:GridBoundColumn DataField="StartDocRange" HeaderText="Start Doc Range" ReadOnly="True" 
                                                UniqueName="StartDocRange">  
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="EndDocRange" HeaderText="End Doc Range" ReadOnly="True" 
                                                UniqueName="EndDocRange">  
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="DocumentCount" HeaderText="Document Count" UniqueName="DocCount">  
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridTemplateColumn UniqueName="TemplateColumn1">  
                                                <ItemTemplate> 
                                                    <asp:LinkButton ID="imgBtnDelete" runat="server" CausesValidation="False" CommandArgument="" 
                                                        CommandName="Delete" ForeColor="#044A7E" OnClientClick="javascript:if(!confirm('This action will delete the selected batch. Are you sure?')){return false;}" 
                                                        Text="Delete" /> 
                                                </ItemTemplate> 
                                                <HeaderStyle Width="8%" /> 
                                            </telerik:GridTemplateColumn> 
                                        </Columns> 
                                    </telerik:GridTableView> 
                                </DetailTables> 
                                <RowIndicatorColumn> 
                                    <HeaderStyle Width="20px" /> 
                                </RowIndicatorColumn> 
                                <ExpandCollapseColumn Visible="True">  
                                    <HeaderStyle Width="20px" /> 
                                </ExpandCollapseColumn> 
                                <Columns> 
                                    <telerik:GridTemplateColumn UniqueName="TemplateColumn">  
                                        <ItemTemplate> 
                                            <asp:LinkButton ID="imgBtnEdit" runat="server" CommandName="" ForeColor="#044A7E" 
                                                Text="Edit" /> 
                                        </ItemTemplate> 
                                        <HeaderStyle Width="7%" /> 
                                    </telerik:GridTemplateColumn> 
                                    <telerik:GridBoundColumn DataField="CriteriaValue" HeaderText="Criteria Value" ReadOnly="True" 
                                        UniqueName="CriteriaValue">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="BatchCount" HeaderText="Batch Count" ReadOnly="True" 
                                        UniqueName="BatchCount">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="Priority" HeaderText="Priority" ReadOnly="True" 
                                        UniqueName="Priority">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="OnHold" HeaderText="On Hold" ReadOnly="True" 
                                        UniqueName="OnHold">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridTemplateColumn UniqueName="TemplateColumn1">  
                                        <ItemTemplate> 
                                            <asp:LinkButton ID="imgBtnDelete" runat="server" CausesValidation="False" CommandArgument="" 
                                                CommandName="Delete" ForeColor="#044A7E" OnClientClick="javascript:if(!confirm('This action will delete the selected batch. Are you sure?')){return false;}" 
                                                Text="Delete" /> 
                                        </ItemTemplate> 
                                        <HeaderStyle Width="8%" /> 
                                    </telerik:GridTemplateColumn> 
                                </Columns> 
                            </MasterTableView> 
                            <FilterMenu EnableTheming="True">  
                                <CollapseAnimation Duration="200" Type="OutQuint" /> 
                            </FilterMenu> 
                        </telerik:RadGrid> 

When I add a GridDropDown Column such as:
<telerik:GridDropDownColumn UniqueName="DropDownListColumn" 
                        ListTextField="AssignedUser" ListValueField="AssignedUser"   
                        HeaderText="Assigned User" DataField="AssignedUser" > 
</telerik:GridDropDownColumn> 
                     

It won't load up the nested grid for me to edit and test to make sure I am putting the correct control in there.

Have I set up my nested grids correctly? If so, what else do I need to do to get my nested grid to allow an editable dropdown list?

Shinu
Top achievements
Rank 2
 answered on 13 Feb 2009
1 answer
146 views
Hi there,

How can i check if a value in my gird in display mode is set to true or false? (the bound column is asp:checkbox)
I am trying to set an image visible status to true or false accordind to the grid column value.

Thanxs in advance
Princy
Top achievements
Rank 2
 answered on 13 Feb 2009
3 answers
149 views
hi.
i am using asp.netajax radchart. i am binding radchart with code behind and SeriesOrientation="Horizontal" and BarWidthPercent = 25
issue is that i need to display display itemlabel above the bars but not over the bar.so itemlabel doesnot overlap with its bar.

thanks


Muhammad
Top achievements
Rank 1
 answered on 13 Feb 2009
1 answer
77 views
We've got a table of (physical) components and we're displaying some of their data in a RadGrid.  When a user wants to edit a row, we want to display a user control particular to the type of component on that row.  Can the UserControl property be changed at runtime?
Shinu
Top achievements
Rank 2
 answered on 13 Feb 2009
1 answer
104 views
I have the following code in my aspx page.   
      <telerik:RadGrid...>
                <mastertableview ...>
                    <Columns>  
                         <telerik:GridTemplateColumn Visible = "false">
                         <EditItemTemplate>
                         <asp:Label runat= "server" ID = "test1" Text="bah1" Visible="false"></asp:Label>
                         </EditItemTemplate>
                         </telerik:GridTemplateColumn>
                   <Columns> 
            <mastertableview ...>
          <telerik:RadGrid>
   
however when visible is false, the text is hidden, however the autogenerated ":" is still visible. I can't remove the label, because I need it later on.
                
Shinu
Top achievements
Rank 2
 answered on 13 Feb 2009
3 answers
200 views
Can i add a user control into TabStrip?
Princy
Top achievements
Rank 2
 answered on 13 Feb 2009
5 answers
194 views
I have created a custom control which includes a RadScheduler as one of its child controls. I exposed the AdvancedEditTemplate and AdvancedInsertTemplate properties of the RadScheduler in my custom control as shown in the example below.

Imports Telerik.Web.UI 
 
Public NotInheritable Class CustomScheduler 
  Inherits CompositeControl 
 
  Private WithEvents mScheduler As RadScheduler 
 
  <TemplateContainer(GetType(BTAppointmentScheduler)), _ 
    PersistenceMode(PersistenceMode.InnerProperty)> _ 
  Public Property AppointmentFormTemplate() As ITemplate 
    Get 
      EnsureChildControls() 
      Return mScheduler.AdvancedEditTemplate 
    End Get 
    Set(ByVal value As ITemplate) 
      EnsureChildControls() 
      mScheduler.AdvancedEditTemplate = value 
      mScheduler.AdvancedInsertTemplate = value 
    End Set 
  End Property 
 
  Protected Overrides Sub CreateChildControls() 
    Controls.Clear() 
    mScheduler = New RadScheduler() 
    Controls.Add(mScheduler) 
  End Sub 
 
  Protected Overrides Sub Render(ByVal writer As HtmlTextWriter) 
    mScheduler.RenderControl(writer) 
  End Sub 
End Class 

Then I setup my aspx page similiar to the example below.

<my:CustomScheduler ID="CustomScheduler1" runat="server"> 
  <AppointmentFormTemplate> 
    <asp:TextBox ID="SubjectTextBox" runat="server" Rows="5" Columns="20" Text='<%# Bind("Subject") %>' Width="95%" TextMode="MultiLine"></asp:TextBox> 
    ... 
  </AppointmentFormTemplate> 
</my:CustomScheduler> 

Whenever, I try to create an appointment I get the following exception:

Unable to cast object of type 'System.Web.UI.CompiledTemplateBuilder' to type 'System.Web.UI.IBindableTemplate'.
atTelerik.Web.UI.RadScheduler.CreateFormContainer()
atTelerik.Web.UI.RadScheduler.CreateChildControls(BooleanbindFromDataSource)
atTelerik.Web.UI.RadScheduler.CreateChildControls()
atSystem.Web.UI.Control.EnsureChildControls()
atSystem.Web.UI.Control.PreRenderRecursiveInternal()
atSystem.Web.UI.Control.PreRenderRecursiveInternal()
atSystem.Web.UI.Control.PreRenderRecursiveInternal()
atSystem.Web.UI.Control.PreRenderRecursiveInternal()
atSystem.Web.UI.Control.PreRenderRecursiveInternal()
atSystem.Web.UI.Control.PreRenderRecursiveInternal()
atSystem.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint)


What am I doing wrong?
Eric
Top achievements
Rank 1
 answered on 13 Feb 2009
5 answers
152 views
Hello.

I'm getting some strange behavior when using the Link Manager in a non-IE browser. After creating the link and hitting OK, the link does not show. The text is not clickable. But, as soon as I select the text again and click the Link Manager button a second time, the link appears.

I've got a video showing the behavior. Where can I post/send that? Any help would be appreciated.

Thanks,

Cameron
Jasmine
Top achievements
Rank 1
 answered on 13 Feb 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?