Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
127 views
hi,
iam using radscheduler with Entity DataSource iam encountered with following errors.

1).Item has already been added. Key in dictionary: 'Reminder' Key being added
this error is only getting  when iam using Entity Data source 

2).when using Customized Advance Form Template(given Example) iam able to get  the given user control values i.e boolean attribute.ascx,ResourceControl.ascx,MultipleResourcevalues.ascx   values but unable to set them ...when trying to set them....iam getting :"object referrence  not set to an instance "Error ...
iam not using provider using entity datasource  and SQldatasource... 
 iam annoying with these problems from so many days... 
Hope i will get  solution for those problems as soon as possible ....


thanking you 
Rajesh 
Veronica
Telerik team
 answered on 20 May 2011
3 answers
115 views
I've got a radgrid in a dnn module/user control and I want to add exporting to pdf. The module is ajax enable via dnn and I'm pretty sure my problem is related to not doing a full postback. Nothing happens when you click the export to pdf button. I'm trying to register the export to pdf button to postback on the page load with no luck. For some reason I can't find the control.

Any help is appreciated, thanks.
protected void Page_Load(System.Object sender, System.EventArgs e)
{
    RadGrid InventoryGrid = (RadGrid)InventoryRadGrid;
    Control pdfExportButton = (Control)InventoryRadGrid.MasterTableView.FindControl("ExportToPdfButton");
    if (pdfExportButton != null)
        ScriptManager.GetCurrent(Page).RegisterPostBackControl(pdfExportButton);
    else messageLabel.Text = "Export to PDF Control Not Found";
    if (!IsPostBack)
    {
    }
}

Daniel
Telerik team
 answered on 20 May 2011
1 answer
119 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
128 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
82 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
172 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
101 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
123 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
86 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
181 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?