Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
131 views
Greetings,

I am new to the Grid control and have spent hours trying to do a very simple thing.  I also looked at lots of examples but still no success.

-------------------------------------------------------------------------------
I have a database table that has three fields, all text.  One field has a full path and name of an image that is already stored on the server.

I want to get the records and display that image inside the grid (one image for each row)

How can I do this in VB.NET?
-------------------------------------------------------------------------------

Thanks in advance,

Jimmy
Princy
Top achievements
Rank 2
 answered on 02 Jul 2010
2 answers
165 views
I'm trying to remove the ability to add custom colors in the radEditor, because I don't find it really user-friendly. Looking in the telerik website, I came across the property AllowCustomColors but it seems that this property has been removed (http://www.telerik.com/help/aspnet-ajax/editor_migrationfromradeditorclassictoradeditorprometheus.html).

AllowCustomColors
n/a

 property

 Removed


Is there an easy way to achieve this, or do I need to implement my own color tool to go around the problem?

Thanks,
Sébastien
Sébastien
Top achievements
Rank 1
 answered on 02 Jul 2010
1 answer
208 views
hi

how do i format the date?

I tried with this code but gaveeme an error: Thanks

 <telerik:RadDatePicker ID="dtDate" Runat="server"
                      Culture="English (United States)" DbSelectedDate='<%# Bind("SchedDate"),"{0:dd/MM/yyyy}") %>'>
<Calendar UseRowHeadersAsSelectors="False"  UseColumnHeadersAsSelectors="False" ViewSelectorText="x"></Calendar>
<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
                </telerik:RadDatePicker>
Tsvetoslav
Telerik team
 answered on 02 Jul 2010
3 answers
363 views
Hi

I have a problem with the listview I have a close proximity to the demo, however when you click on the insert button you need to do so twice before the Insert Template is used.   Stepping through the code, the same routines are called, using the same branches etc.

<telerik:RadListView ID="RadListBox1" runat="server" OnNeedDataSource="RadListView1_NeedDataSource" 
                                        ItemPlaceholderID="ProductsHolder" OnItemCommand="RadListView1_ItemCommand" DataKeyNames="CountrySapInfoId"> 
                                        <LayoutTemplate> 
                                            <fieldset style="width: 700px;" id="FieldSet1"> 
                                                <legend>SAP Country Info</legend> 
                                                <asp:Panel ID="ProductsHolder" runat="server" /> 
                                                <div style="clear: both" /> 
                                                <div style="padding: 10px"> 
                                                    <asp:LinkButton ID="btnInitInsert" runat="server" Text="New Sap Country Info" CommandName="InitInsert" /> 
                                                </div> 
                                            </fieldset> 
                                        </LayoutTemplate> 
                                        <ItemTemplate> 
                                            <fieldset style="border-style: none; float: left; width: 300px;"> 
                                                <table cellpadding="0" cellspacing="0" width="100%" style="margin: 10px"> 
                                                    <tr> 
                                                        <td width="100px"> 
                                                            Company Code: 
                                                        </td> 
                                                        <td> 
                                                            <%#  Eval("SAPCompanyCode") %> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td> 
                                                            Sales Org: 
                                                        </td> 
                                                        <td> 
                                                            <%#  Eval("SAPSalesOrg") %> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td style="padding-top: 5px"> 
                                                            <asp:LinkButton ID="btnEdit" runat="server" Text="Edit" CommandName="Edit" /> 
                                                        </td> 
                                                    </tr> 
                                                </table> 
                                            </fieldset> 
                                        </ItemTemplate> 
                                        <EditItemTemplate> 
                                            <fieldset style="border-style: none; float: left; width: 300px;"> 
                                                <table cellpadding="0" cellspacing="0" width="100%" style="margin: 10px"> 
                                                    <tr> 
                                                        <td> 
                                                            Company Code: 
                                                        </td> 
                                                        <td> 
                                                            <asp:TextBox ID="txtCompanyCode" runat="server" Text='<%# Bind("SAPCompanyCode") %>' /> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td> 
                                                            Sales Org: 
                                                        </td> 
                                                        <td> 
                                                            <asp:TextBox ID="txtSalesOrg" runat="server" Text='<%# Bind("SAPSalesOrg") %>' /> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td style="padding-top: 5px" colspan="2"> 
                                                            <asp:LinkButton ID="btnUpdate" runat="server" Text="Update" CommandName="Update" 
                                                                Width="70px" /> 
                                                            <asp:LinkButton ID="btnDelete" runat="server" Text="Delete" CommandName="Delete" 
                                                                Width="70px" /> 
                                                            <asp:LinkButton ID="BtnCancel" runat="server" Text="Cancel" CommandName="Cancel" 
                                                                CausesValidation="false" Width="70px" /> 
                                                        </td> 
                                                    </tr> 
                                                </table> 
                                            </fioeldset> 
                                        </EditItemTemplate> 
                                        <InsertItemTemplate> 
                                            <fieldset style="border-style: none; float: left; width: 300px;"> 
                                                <table cellpadding="0" cellspacing="0" width="100%" style="margin: 10px"> 
                                                    <tr> 
                                                        <td width="50%"> 
                                                            Company Code: 
                                                        </td> 
                                                        <td> 
                                                            <asp:TextBox ID="txtCompanyCode" runat="server" Text='<%# Bind("SAPCompanyCode") %>' /> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td> 
                                                            Sales Org: 
                                                        </td> 
                                                        <td> 
                                                            <asp:TextBox ID="txtSalesOrg" runat="server" Text='<%# Bind("SAPSalesOrg") %>' /> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td style="padding-top: 5px" colspan="2"> 
                                                            <asp:LinkButton ID="btnInsert" runat="server" Text="Insert" CommandName="PerformInsert" 
                                                                Width="70px" /> 
                                                            <asp:LinkButton ID="BtnCancel" runat="server" Text="Cancel" CommandName="Cancel" 
                                                                CausesValidation="false" Width="70px" /> 
                                                        </td> 
                                                    </tr> 
                                                </table> 
                                            </fieldset> 
                                        </InsertItemTemplate> 
                                    </telerik:RadListView> 

and my code behind is

 protected void RadListView1_ItemCommand(object source, RadListViewCommandEventArgs e) 
    { 
        RadListView rlv = (source as RadListView); 
        if ((e.CommandName == RadListView.PerformInsertCommandName) || (e.CommandName == RadListView.UpdateCommandName) || (e.CommandName == RadListView.CancelCommandName)) 
        { 
            rlv.InsertItemPosition = RadListViewInsertItemPosition.None; 
        } 
        else if (e.CommandName == RadListView.InitInsertCommandName) 
        { 
            rlv.InsertItemPosition = RadListViewInsertItemPosition.LastItem; 
            //e.Canceled = true; 
        } 
 
        if ((e.CommandName == RadListView.PerformInsertCommandName) || (e.CommandName == RadListView.UpdateCommandName)) 
        { 
            SaveCountrySapInfo(e.ListViewItem); 
        } 
 
        if (e.CommandName == "Delete") 
        { 
            DeleteCountrySapInfo(e.ListViewItem); 
        } 
    } 

Any ideas?

TIA
Richard


Rosen
Telerik team
 answered on 02 Jul 2010
1 answer
200 views
Hello Telerik Team,

I am coming across the following error (Script controls may not be registered after PreRender) when I am trying to create a new tab to load the previous tab User controls into it.
When I call the Addtab() method, it loads the tab but on PageView created after loading all the child controls, I get this following error.
I am using xmlDom to load all UserControls.
Each Tab has a parent UserControl into which I am loading multiple child Controls.

After Iterating through the xmlnodelist, I finally say:
e.PageView.FindControl(parent).FindControl(LeftZone).controls.add(customControl)
Where
parent is the MainParent.ascx, LeftZone is the placeholder into which I need to add teh CustomControl (child.ascx)
When I get into this step, it executes child.ascx perfectly and when i comes out and tries to stepout of this step, I get this error.
I have followed few ref, which include: this and this and this.
Any help regading this issue will be greatly appreciated.

Thanks

T. Tsonev
Telerik team
 answered on 02 Jul 2010
1 answer
116 views
i m opening rad window with this code  from tool bar button

function MyTasksCommentToolarClick(sender, args)
      {
          var button = args.get_item();
              
          if (button.get_value() == "Add")
          {
            OpenUrlModal("ManageComment.aspx",825, 560);
          }
      }

function OpenUrlModal(Url, iWidth, iHeight) {
    var oWnd = radopen(Url, "ManageTask");
    oWnd.setSize(iWidth, iHeight);
    oWnd.set_modal(true);
    oWnd.add_close(HandleWindowClose);
    
    return false;
}

using this code in master page
 <telerik:RadWindowManager ID="RadWindowManager1" runat="server" ShowContentDuringLoad="false" ReloadOnShow="true"
        Behaviors="Close">

it refresh every time when we open it in IE or Firefox but it not working for safari and chrome.
what should we do ?



Georgi Tunev
Telerik team
 answered on 02 Jul 2010
1 answer
105 views
Hi Telerik,

I am trying to add a Telerik RadDatePicker to a SharePoint page. I have already added the RadScriptManager control to the page.
The control loads but with javascript error. When I try to pick a date, the page slows up and a lot of javascript pop up error messages get displayed.

The same phenomenon does not happen in a normal asp.net website page. I have followed all the insttructions mentioned in
http://www.telerik.com/help/aspnet-ajax/moss-install-aspnet-ajax-35.html
to ajaxify the moss site.

Please let me know what I am missing here.

Regards
Akhila
Tsvetoslav
Telerik team
 answered on 02 Jul 2010
11 answers
261 views
When the page loads the "No data found" message appears.

If set AutogenerateColumns = true then data appears.

Why does no data appear when explicitly creating columns?

 <telerik:RadGrid  
        ID="RadGrid1" 
        runat="server" 
        AllowPaging="true" 
        AutoGenerateColumns="false"> 
        <telerik:MasterTableView TableLayout="Auto"> 
            <Columns> 
                <telerik:GridBoundColumn 
                    DataField="Name" 
                    DataType="System.String" 
                    HeaderText="Name" 
                    SortExpression="Name" 
                    UniqueName="Name"> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn 
                    DataField="Description" 
                    DataType="System.String" 
                    HeaderText="Description" 
                    SortExpression="Description" 
                    UniqueName="Description"> 
                </telerik:GridBoundColumn> 
                <telerik:GridTemplateColumn 
                    HeaderText="Status"> 
                    <ItemTemplate> 
                        <%# (Boolean.Parse(Eval("IsDeleted").ToString())) ? "Deleted" : "Active" %> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn>                 
            </Columns> 
        </telerik:MasterTableView> 
</telerik:RadGrid> 
protected void Page_Load(object sender, EventArgs e) 
        { 
            ReportManager mgr = Global.Container.Resolve<ReportManager>(); 
            IList<ServerReport> reports = mgr.GetAllReports(); 
            RadGrid1.DataSource = reports;             
 
            //grdvwReportList.DataSource = reports; 
            //grdvwReportList.DataBind(); 
        }     

Tsvetoslav
Telerik team
 answered on 02 Jul 2010
3 answers
488 views
Hi
I have Radgrid with few GridDateTimeColumn and it is bound to Datetime column from database, and i have null values in datetime column in my database, problem is i have griddatetimecolumn binded to datetime column but it show error if value from database is null

example.
<telerik:GridDateTimeColumn DataField="ApplicationDate" DataType="System.DateTime"    
HeaderText="ApplicationDate" SortExpression="ApplicationDate"   
SelectedDate='<%# Bind( "ApplicationDate" ) %>' UniqueName="ApplicationDate" /> 

now '<%# Bind( "ApplicationDate" ) %>' also contains null value if there is any date in database then there is no problem but if there is null value then it shows error : Sys.WebForms.PageRequestManagerServerErrorException: 


Please help me to resolve this i want to have GridDateTimeColumn in radgrid but with it also accepts null date value.


Kind Regards:
Harinder Singh
McConnell Dowell
Singapore









Tsvetoslav
Telerik team
 answered on 02 Jul 2010
2 answers
122 views
Hello,

I have a simple RADGrid bound to a SQLDataSource with a RadTemplateColumn/EditItemTemplate RadTextBox control. I used the Telerik provided example to apply the bound value but it only is visible in EditMode. What am I missing?

Thank you,

SteveO

 

<telerik:RadGrid ID="RadGrid1"

 

 

    runat="server"

 

 

    AllowAutomaticDeletes="True"

 

 

    AllowAutomaticInserts="True"

 

 

    AllowAutomaticUpdates="True"

 

 

    GridLines="None"

 

 

    OnItemInserted="RadGrid1_ItemInserted"

 

 

    OnItemCreated="RadGrid2_ItemCreated"

 

 

    OnItemUpdated="RadGrid1_ItemUpdated"

 

 

    OnInsertCommand="RadGrid1_ItemInsert"

 

 

    OnUpdateCommand="RadGrid1_ItemUpdate"

 

 

    Skin="Simple"

 

 

    ShowStatusBar="True"

 

 

    DataSourceID="SqlDataSource2"

 

 

    AllowPaging="True" >

 

 


<
ValidationSettings EnableValidation="true" ValidationGroup="DropDownValidate" />

 

 


<
MasterTableView runat="server"

 

 

    EditMode="InPlace"

 

 

    CommandItemDisplay="Top"

 

 

    DataSourceID="SqlDataSource2"

 

 

    AutoGenerateColumns="false"

 

 

    ExpandCollapseColumn-ButtonType="ImageButton"

 

 

    ExpandCollapseColumn-CollapseImageUrl="~/Images/zoom-out-icon[1].png"

 

 

    ExpandCollapseColumn-ExpandImageUrl="~/Images/zoom-in-icon[1].png"

 

 

    DataKeyNames="ActivityID"

 

 

    InsertItemPageIndexAction="ShowItemOnCurrentPage" >

 

 

 


<
RowIndicatorColumn>

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</ExpandCollapseColumn>

 

 


<
EditFormSettings>

 

 

<EditColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"

 

 

CancelImageUrl="~/Images/filterCancel.png"

 

 

UpdateImageUrl="~/Images/selecttag.png"

 

 

InsertImageUrl="~/Images/add-icon[2].png"

 

 

EditImageUrl="~/Images/edit-icon[1].png" >

 

 

</EditColumn>

 

 

</EditFormSettings>

 

 

 


<
Columns>

 

 

 

    <telerik:GridTemplateColumn DataField="ActDescription" HeaderText="Description" UniqueName="ActDescription" Display="true">

 

 

        <EditItemTemplate>

 

 

            <telerik:RadTextBox ID="Description" runat="server" Text='<%# Bind("ActDescription") 
                
TextMode="MultiLine"                     Width="300"></telerik:RadTextBox>

 

 

        </EditItemTemplate>

 

 

    </telerik:GridTemplateColumn>
</Columns>

 

 


</
MasterTableView>

 

 

 

 

 

</telerik:RadGrid>

 

 

<asp:SqlDataSource ID="SqlDataSource2" runat="server"

 

 

ConnectionString="<%$ ConnectionStrings:CIMT %>"

 

 

DeleteCommand="DELETE FROM [CIMT_T_Activities] WHERE [ActivityID] = @ActivityID"

 

 

InsertCommand="INSERT INTO [CIMT_T_Activities] ([ActDescription], [ActToDate], [ActFromDate], [UnitLogID], [InsertBy], [InsertDate], [UpdateBy], [UpdateDate]) VALUES (@ActDescription, @ActToDate, @ActFromDate, @UnitLogID, @InsertBy, @InsertDate, @UpdateBy, @UpdateDate)"

 

 

SelectCommand="SELECT [ActivityID], [ActDescription], [ActToDate], [ActFromDate], [UnitLogID], [InsertBy], [InsertDate], [UpdateBy], [UpdateDate] FROM [CIMT_T_Activities] WHERE [UnitLogID] = @UnitLogID"

 

 

UpdateCommand="UPDATE [CIMT_T_Activities] SET [ActDescription] = @ActDescription, [ActToDate] = @ActToDate, [ActFromDate] = @ActFromDate, [UnitLogID] = @UnitLogID, [UpdateBy] = @UpdateBy, [UpdateDate] = @UpdateDate WHERE [ActivityID] = @ActivityID">

 

 

 

 

 

<SelectParameters>

 

 

 

 

 

<asp:SessionParameter Name="UnitLogID" SessionField="UnitLogID" Type="Int32" />

 

 

 

 

 

</SelectParameters>

 

 

 

 

 

<DeleteParameters>

 

 

 

 

 

<asp:Parameter Name="ActivityID" Type="Int32" />

 

 

 

 

 

</DeleteParameters>

 

 

 

 

 

<InsertParameters>

 

 

 

 

 

<asp:SessionParameter Name="UnitLogID" SessionField="UnitLogID" Type="Int32" />

 

 

 

 

 

<asp:Parameter Name="ActDescription" Type="String" />

 

 

 

 

 

<asp:Parameter DbType="DateTime" Name="ActToDate" />

 

 

 

 

 

<asp:Parameter DbType="DateTime" Name="ActFromDate" />

 

 

 

 

 

<asp:Parameter Name="InsertBy" Type="String" />

 

 

 

 

 

<asp:Parameter DbType="DateTime" Name="InsertDate" />

 

 

 

 

 

<asp:Parameter Name="UpdateBy" Type="String" />

 

 

 

 

 

<asp:Parameter DbType="DateTime" Name="UpdateDate" />

 

 

 

 

 

</InsertParameters>

 

 

 

 

 

<UpdateParameters>

 

 

 

 

 

<asp:SessionParameter Name="UnitLogID" SessionField="UnitLogID" Type="Int32" />

 

 

 

 

 

<asp:Parameter Name="ActDescription" Type="String" />

 

 

 

 

 

<asp:Parameter DbType="DateTime" Name="ActToDate" />

 

 

 

 

 

<asp:Parameter DbType="DateTime" Name="ActFromDate" />

 

 

 

 

 

<asp:Parameter Name="InsertBy" Type="String" />

 

 

 

 

 

<asp:Parameter DbType="DateTime" Name="InsertDate" />

 

 

 

 

 

<asp:Parameter Name="UpdateBy" Type="String" />

 

 

 

 

 

<asp:Parameter DbType="DateTime" Name="UpdateDate" />

 

 

 

 

 

<asp:Parameter Name="ActivityID" Type="Int32" />

 

 

 

 

 

</UpdateParameters>

 

 

 

 

 

</asp:SqlDataSource>

 

JSON
Top achievements
Rank 1
 answered on 02 Jul 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?