Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
140 views
I am new to the company, and new to Telerik controls.  In addition, I THINK we are using an older version right now.

What I need to do is have ALL of the following Tabs text values return true from the FindTabByValue if I pass in 'Notes' as the value.

Notes
Notes(0)
Notes(3)

Will this work with this method?  Is there a way to do this?

Thanks!

Rich
Veronica
Telerik team
 answered on 20 May 2011
4 answers
139 views
When I place a RadGrid in InsertMode with EditFormType="AutoGenerated", the Insert form template is too tall.  When the same grid is in Edit Mode it works fine, the section containing all the controls does not extend the grids overall height. 

Any suggestions would be grand.

Thanks,
Reid
Reid
Top achievements
Rank 2
 answered on 20 May 2011
2 answers
88 views
hi my dear friends :
i have a radcombobox that is in relationship with RadListViw (with RadDataPager Inside)...
when i change the item of rad combobox , so RadListView is Updated... -> selectedIndexxhanged()  server-side event...
-------------------------------------------------------------------------------------------------------------------------------------------------------------
my selectedIndexChanged() is like this :
protected void RadcbImagesGroup_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
{
    rlvImages.DataBind();
    var raddatapager = (rlvImages).FindControl("RadDataPager1") as RadDataPager;
    if (raddatapager != null)
    {
        raddatapager.FireCommand("Page","First");
    }
 
}

my radComboBox Item values is like : 1,2,3...

in mode 1 we have 25 pages...
in mode 2 we have 5 pages...
in mode 3 we have 5 pages...

my problem is when we are in mode 1 and put the pageNumber to more than 5 and when  i change the combobox Item to mode 2 so
var raddatapager = (rlvImages).FindControl(
"RadDataPager1") as RadDataPager;
is null...

but if we put the page# (we are in mode 1) to lower than 5 or equal 5 , and change the radcb item to another everything works fine...

where is the null problem?

thanks for advance
Veli
Telerik team
 answered on 20 May 2011
5 answers
181 views
Hi,

 i have binded the image in <ItemTemplate> like this:
<telerik:RadGrid ID="rgQuotes" Width="97%" AllowPaging="True" PageSize="15" runat="server"
            AllowSorting="True" OnNeedDataSource="rgQuotes_NeedDataSource" GridLines="None"
            Skin="Office2007" OnItemDataBound="rgQuotes_ItemDataBound" OnItemCreated="rgQuotes_ItemCreated"  onitemcommand="rgQuotes_ItemCommand"
            AutoGenerateColumns="False" AllowFilteringByColumn="True" AlternatingItemStyle-CssClass="alternativegridstyle">
            <AlternatingItemStyle CssClass="alternativegridstyle" />
            <GroupingSettings CaseSensitive ="false" />
            <MasterTableView Width="100%" DataKeyNames="QuoteId">
                <ItemTemplate>
                    <table width="100%" cellpadding="0" cellspacing="0" border="0">
                        <tr>
                            <td style="border: 0;" width="10%">
                                <img src="<%# "../Thumbnails.aspx?width=130&image=" + Eval("FullImagePath")%>"
                                style="cursor: pointer;border-style: none;" onclick= '<%# string.Format("return ImageDetails(\"{0}\",\"{1}\");",Eval("InventoryId"),Eval("ItemType")) %>' />
                            </td>
                            <td style="border: 0; width: 10%">
                                <table width="100%" border="0" cellspacing="0" class="quotelistimage">
                                    <tr>
                                        <td style="border: 0;">
                                            <asp:ImageButton ID="ibtnEdit" runat="server" ImageUrl="~/Images/edit.png" OnClientClick='<%# Eval("QuoteId","return EditQuote({0})") %>'
                                                ToolTip="Edit Quote" />
                                        </td>
                                        <td style="border: 0;">
                                            <asp:ImageButton ID="ibtnCreateQuote" OnClientClick='<%# string.Format("return ReAssignQuote(\"{0}\", \"{1}\");",Eval("QuoteId"),Eval("StockID")) %>'
                                                runat="server" ImageUrl="~/Images/reAssign.png" ToolTip="Re-Assign Quote" />
                                        </td>
                                        <td style="border: 0;">
                                         
                                            <asp:ImageButton ID="ibtnClose" runat="server" OnClientClick='<%# string.Format("return CloseQuote(\"{0}\", \"{1}\", \"{2}\");",Eval("QuoteId"),Eval("QuoteNumber"),Eval("StockID")) %>'
                                                ImageUrl="~/Images/CloseQuote.png" ToolTip="Close Quote" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="border: 0;">
                                            <asp:ImageButton ID="ibtnCredit" runat="server" ImageUrl="~/Images/credit.png" OnClientClick='<%# string.Format("return AddCreditApplication(\"{0}\", \"{1}\", \"{2}\", \"{3}\",\"{4}\",\"{5}\",\"{6}\");",Eval("QuoteId"),Eval("StockID"),Eval("CreditID"),Eval("CreditType"),Eval("FinanceRequired"),Eval("ContactName"), Eval("ContactID")) %>' />
                                            <asp:Label runat="server" ID="lblCredit" Text='<%# Eval("CreditID") %>' Style="display: none;" Visible ="false" />
                                            <asp:Label runat="server" ID="lblFinance" Text='<%# Eval("FinanceRequired") %>' Style="display: none;" Visible="false" />
                                        </td>
                                        <td style="border: 0;">
                                            <asp:ImageButton ID="ibtnImages" runat="server" ToolTip="Buyer Order" OnClientClick='<%# Eval("QuoteId","return OpenBuyerOrder({0})") %>'
                                                ImageUrl="~/Images/Quote_Buyer_Order.png" />
                                        </td>
                                        <td style="border: 0;">
                                            <asp:ImageButton ID="ibtnDealerForm" runat="server" ImageUrl="~/Images/Quote_Dealer_Form.png"
                                                ToolTip="Dealer Forms" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="border: 0;">
                                            <asp:ImageButton ID="ibtnCustomer" runat="server" OnClientClick='<%# Eval("QuoteId","return OpenCustomerProposal({0})") %>'
                                                ImageUrl="~/Images/Quote_Customer_Proposal.png" ToolTip="Customer Proposal" />
                                        </td>
                                        <td style="border: 0;">
                                            <asp:ImageButton ID="ibtnQuote" runat="server" ToolTip="Docs" OnClientClick='<%#Eval("QuoteId","return QuoteDocument({0})") %>'
                                                ImageUrl="~/Images/Quote_Doc.png" />
                                        </td>
                                        <td style="border: 0;">
                                            <asp:ImageButton ID="ibtnEmail" OnClientClick='<%# string.Format("return QuoteEmail(\"{0}\",\"{1}\");",Eval("QuoteId"),Eval("QuoteNumber")) %>'
                                                runat="server" ImageUrl="~/Images/email.png" ToolTip="E-Mail" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="border: 0;">
                                            <asp:ImageButton ID="ibtnAnalyze" OnClientClick='<%# Eval("QuoteId","return OpenDealSheet({0})") %>'
                                                runat="server" ImageUrl="~/Images/deal.png" ToolTip="Deal Analysis" />
                                        </td>
                                        <td style="border: 0;">
                                            <asp:ImageButton ID="ibtnQuoteInventory" runat="server" OnClientClick='<%# Eval("QuoteId","return ViewMultipleInventoryQuote({0})") %>'
                                                ImageUrl="~/Images/more-qoute.png" ToolTip='<%#  " "+Eval("cnt")+" Inventory Found" %>' />
                                        </td>
                                        <td style="border: 0;">
                                            <asp:ImageButton ID="ibtnApprove" Visible="false" Style="border-bottom: solid 1px Transparent"
                                                runat="server" OnClientClick='<%# Eval("QuoteID","return QuoteApprove({0})") %>'
                                                ImageUrl="~/Images/Approve.png" ToolTip="Approve Quote" />
                                            <asp:ImageButton ID="ibtnFIApprove" Visible="false" Style="border-bottom: solid 1px Transparent;"
                                                runat="server" OnClientClick='<%# string.Format("return QuoteApproveFI(\"{0}\", \"{1}\");",Eval("QuoteId"),Eval("CreditID")) %>'
                                                ImageUrl="~/Images/Approve.png" ToolTip="FI Approve Quote" />
                                            <asp:Label ID="lblStatus" runat="server" Visible="false" Text='<%# Eval("Status") %>'></asp:Label>
                                            <asp:Label ID="lblQuoteApprove" runat="server" Visible="false" Text='<%# Eval("QuoteApprove") %>'></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td style="border: 0; width: 70%;">
                                <table style="width: 100%; border: 1px solid #ececec;" cellpadding="0" cellspacing="0"
                                    align="left">
                                    <tr>
                                        <td width="20%">
                                            <div class="quotelistheadlabel">
                                                Quote Number
                                            </div>
                                        </td>
                                        <td width="30%">
                                            <div class="quotelistheadcontent">
                                                <%# Eval("QuoteNumber")%> </div>
                                        </td>
                                        <td width="20%">
                                            <div class="quotelistheadlabel">
                                                Quote Date</div>
                                        </td>
                                        <td width="30%">
                                            <div class="quotelistheadcontent">
                                              <%--  <%# Eval("CreatedDate", "{0:MM/dd/yyyy}")%>--%>
                                              <%# Eval("DateOnly") %>
                                                 </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="20%">
                                            <div class="quotelistheadlabel">
                                                Sales Person
                                            </div>
                                        </td>
                                        <td width="30%">
                                            <div class="quotelistheadcontent">
                                                <asp:Label ID="lblUserName" onclick='<%# Eval("CreatedBy","return SalesMan({0})") %>'
                                                    runat="server" Style="text-decoration: underline" Text='<%# Eval("UserName")%>'></asp:Label> </div>
                                        </td>
                                        <td width="20%">
                                            <div class="quotelistheadlabel">
                                                Location Name
                                            </div>
                                        </td>
                                        <td width="30%">
                                            <div class="quotelistheadcontent">
                                                <%# Eval("LocationName")%> </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="20%">
                                            <div class="quotelistheadlabel">
                                                Contact Name
                                            </div>
                                        </td>
                                        <td width="30%">
                                            <div class="quotelistheadcontent">
                                                <%# Eval("ContactName")%> </div>
                                        </td>
                                        <td width="20%">
                                            <div class="quotelistheadlabel">
                                                Contact City
                                            </div>
                                        </td>
                                        <td width="30%">
                                            <div class="quotelistheadcontent">
                                                <%# Eval("ContactCity")%> </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="20%">
                                            <div class="quotelistheadlabel">
                                                Stock Number
                                            </div>
                                        </td>
                                        <td width="30%">
                                            <div class="quotelistheadcontent">
                                                <%# Eval("StockID")%>
                                                  
                                            </div>
                                        </td>
                                        <td width="20%">
                                            <div class="quotelistheadlabel">
                                                Make/Model</div>
                                        </td>
                                        <td width="30%">
                                            <div class="quotelistheadcontent">
                                                <%# Eval("Make")%>/<%# Eval("Model")%>
                                                 </div>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>

This the server side code for Export Event:

protected void btnExcel_Click(object sender, EventArgs e)               //Button Export to Excel Event
    {
        //Export the data
        try
        {
 
            isExport = true;
            rgQuotes.MasterTableView.ShowHeader = false;
            foreach (GridDataItem data in rgQuotes.MasterTableView.GetItems(GridItemType.Item))
            {
                Label lblStatus = (Label)data.FindControl("lblCredit");
                Label lblQuoteApprove = (Label)data.FindControl("lblFinance");
                lblStatus.Visible = false;
                lblQuoteApprove.Visible = false;
            }
            rgQuotes.ExportSettings.ExportOnlyData = true;
            rgQuotes.ExportSettings.IgnorePaging = true;
            rgQuotes.ExportSettings.FileName = "Quotes";
            rgQuotes.MasterTableView.ExportToExcel();
             
        }
        catch (Exception ex)
        {
            CommonFunctions.AddErrorLog("Sales=>Quotes", "btnExcel_Click", ex);
        }
        //Export the data in excel file format
    }

Images will be displayed in Excel sheet when application runs in IE Browser
While we switched over to FF then Images wont be exported to Excel sheet.
Its urgent. Please give me a solution.
Daniel
Telerik team
 answered on 20 May 2011
1 answer
112 views
I wonder there are some ways to reorder columns in the treelist that declared on design?
I have page that using treelist to load data, I declared some columns on design and on runtime I added some columns into the treelist but not in the end of it. My columns are not only Treelistbound columns but also TreeListTemplateColumn and when I add them and load page it's seem fine, but when I do anything (load next page, refresh by button..etc) I show error "ERROR:Invalid column type: "TreeListTemplateColumn"."
Please Try again!
That my problem, so could you guys help me to fix it?
Thanks.
Veli
Telerik team
 answered on 20 May 2011
1 answer
131 views
Hi,

I am trying to use a data bound Checkbox in a RadGrid Template Column but have come across several problems.
Firstly, i was trying to use the asp checkbox control. This works for displaying the existing data from my database but i get a DBnull error when i try to insert a new record.
So i tried to resolve this error by trying to capture the DBNull with a CheckNull function:
 
Public Function CheckNull(ByVal val As Object) As Boolean
    If val.GetType Is DBNull.Value.GetType Then
        Return False
    Else
        Return Convert.ToBoolean(val)
    End If
End Function

but this didn't work. I then tried a custom CheckBox which overrides the DBNull error but this didn't fix the problem either

Public Class CustomCheckBox
    Inherits Web.UI.WebControls.CheckBox
    Public Property CheckedOverride() As Object
        Get
            Return MyBase.Checked
        End Get
        Set(ByVal value As Object)
            If IsDBNull(value) Then
                MyBase.Checked = False
            ElseIf value.GetType() = GetType(Boolean) Then
                MyBase.Checked = value
            Else
                MyBase.Checked = False
            End If
        End Set
    End Property
End Class


I then searched the Telerik forums for a solution & came across the telerik:GridCheckBoxColumn (from this site http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx) BUT i do not have this available to me! When i enter this control i get an error saying it does not exist.

Is this an old control item which has been phased out or should it still be available to me on the latest version of Telerik controls?

if it isn't available then can you provide an alternative solution for the databound checkbox which is causing a DBnull conversion error?

Regards,

Shuja
Mira
Telerik team
 answered on 20 May 2011
1 answer
89 views
Hi,

 <telerik:GridBoundColumn DataField="category_name" HeaderText="Kategori" FilterControlWidth="100px"  AutoPostBackOnFilter="true"  ShowFilterIcon="false" CurrentFilterFunction="Contains" SortExpression="category_name"
                        DataType="System.String">


CurrentFilterFunction is  case sensetive, For example, I want to find  AHMET. When I wrote ahmet, it gave "No records to display."
But there  was AHMET  in the record. I tied other founctions like contains, staerwith... etc. But I didn't find helpful function. Can yqu help me?

Thank you.



Princy
Top achievements
Rank 2
 answered on 20 May 2011
2 answers
191 views
Hello

I have a radtoolbar with 6 buttons in it. The button redirect to different windows in my application.
I am currently using the postbackurl property, On the click of the button i need it to open a new window with the url.

Is there a way i can do this?

Thanks in advance
Kate
Telerik team
 answered on 20 May 2011
5 answers
326 views

I am getting this error related to WebResource.axd. This happens when I click a button and it opens up a document from sharepoint site.

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1;
.NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.21022; .NET CLR 3.5.30729; InfoPath.3; .NET4.0C; .NET4.0E)
Timestamp: Fri, 3 Sep 2010 17:55:21 UTC

Message: Sys.WebForms.PageRequestManagerServerErrorException:
Retrieving the COM class factory for component with CLSID
{36D27C48-A1E8-11D3-BA55-00C04F72F325} failed due to the following error: 80040154.
Line: 6
Char: 62099
Code: 0
URI: http://sampledomainname/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ScriptManager_TSM&compress
=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+
Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ad0c4ca6e-6b5d-49b6-922d-5244924fb100%3aea597d4b%3ab25378d2%3b
Telerik.Web.UI%2c+Version%3d2010.2.826.35%2c+Culture%3dneutral%2c+PublicKeyToken
%3d121fae78165ba3d4%3aen-US%3a86f56c91-febb-4172-ae71-6c2ba2372421%3a16e4e7cd%3a
ed16cbdc%3af7645509%3a24ee1bba%3a19620875%3a874f8ea2%3a490a9d4e%3a1e771326%3a4cacbc31%3ae330518b%3a8e6f0d33%3a6a6d718d%3a8674
cba1%3ab7778d6c%3ac08e9f8a%3aa51ee93e%3a59462f1%3a58366029%3aaa288e2d%3ac8618e41%3ae4f8f289

Cat Cheshire
Top achievements
Rank 1
 answered on 20 May 2011
1 answer
136 views
I am getting an error 'Cannot create an object of type 'Telerik.Web.UI.RadComboBoxItemsRequestedEventHandler' from its string representation 'rcbPersonGroupSelector_ItemsRequested' for the 'OnItemsRequested' property.' on the Rad combo box.

This is the code used :

<telerik:RadComboBox ID="rcbPersonGroupSelector" <br>    runat="server" Height="190px" Width="420px" MarkFirstMatch="true" EnableLoadOnDemand="true"<br>    HighlightTemplatedItems="true" OnItemDataBound="rcbPersonGroupSelector_ItemDataBound"<br>    OnItemsRequested="rcbPersonGroupSelector_ItemsRequested" IsCodeSet="false" Title="Select"><br>    <headertemplate><br>            <ul><br>            <li class="PersonSelector_col1">Name</li><br>            <li class="PersonSelector_col2">AAA</li>       <br>            </ul><br>            </headertemplate><br>    <ItemTemplate><br>        <ul><br>                <li class="PersonSelector_col1"><br>                <%#DataBinder.Eval(Container, "DataItem.Name") %>                    <br>                <li class="PersonSelector_col2"><br>                <%#DataBinder.Eval(Container, "DataItem.AAA") %>    <br>            </ul><br>    <br>    </ItemTemplate><br><span class="Apple-style-span" style="color: rgb(0, 17, 25); font-family: Consolas, 'Courier New', monospace; font-size: 13px; line-height: normal; "><span style="color: blue; "></</span><span style="color: maroon; ">telerik:RadComboBox</span><span style="color: blue; ">></span></span>

I have referenced telerik.web.ui and design dlls as suggested in one of the other threads, but still getting the same error.

Please help..

Thanks
Cat Cheshire
Top achievements
Rank 1
 answered on 20 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?