Telerik Forums
UI for ASP.NET AJAX Forum
13 answers
548 views
Hi!

I have a fileexplorer in an usercontrol. When i select an order on my normal page, it will set a property in the usercontrol. Based on that property, the initialpath, updatepaths, viewpaths and deletepaths should be changed. But somehow i can't get this to work. I can't do this in the page_Load event or FileExplorer_Load event because the property won't be set at this time. What is the right time to do this and how should i do this?

Regards,
Marlou
Karl Wilkens
Top achievements
Rank 1
 answered on 27 Dec 2011
3 answers
113 views
I have two different grids on two different pages (one grid per page).
Both grids have been populated with data containing a single row.
Both grids have a GridButtonColumn for requesting processing against the data row.
Both grids are defined nearly exactly (except for data column names, etc.)
Both grids have a "_ItemCommand" in the code behind file for processing the buttons/data.
Both grids contain exactly the same code in the code behind file (except for the column name they are handling/examining).

The first grid functions perfectly and the button performs as advertised.

The second grid will not process correctly.  It blows up with a "" error.  It does see the button event. It does trigger the intended event code.

The code behind event code is:

protected void QualContsGrid_ItemCommand(Object source, Telerik.Web.UI.GridCommandEventArgs e)
{
    if (e.CommandName == "RemoveContribution")
    {
        //  First we need to get the key value of the record the user wants to remove from the list
        string code = (string)e.CommandArgument;
        string id = (e.Item as GridDataItem).GetDataKeyValue("VoterQualifyingContributionId").ToString();
        Int32 iContributorRecKey = Convert.ToInt32(id);
 
        //  Now we can get the record, change it (remove it from the list), and update it
        ElectronicPetitionSystemDataContext efdc = new ElectronicPetitionSystemDataContext(ConfigurationManager.ConnectionStrings["ElectronicPetitionSystemConnectionString"].ConnectionString);
        VoterQualifyingContribution qc = efdc.VoterQualifyingContributions.Single(qcrec => qcrec.VoterQualifyingContributionId == iContributorRecKey);
        string sFirst = qc.FirstName;
        string sLast = qc.LastName;
        qc.VoterQualifyingContributionStatusId = 2;
        efdc.SubmitChanges();
        this.QualContsGrid.Rebind();
    }
}

The grid definition code is:

<telerik:RadGrid AutoGenerateColumns="false" ID="QualContsGrid" runat="server" Width="765px" OnItemCommand="QualContsGrid_ItemCommand"
    Height="430px"
    AllowSorting="true" AllowFilteringByColumn="true" EnableLinqExpressions="true"
    OnItemDataBound="QualContsGrid_ItemDataBound"
    AllowPaging="true" PageSize="15"
    BorderWidth="1px" BorderColor="#999999" EnableEmbeddedSkins="true" Skin="Default"
    DataSourceID="SQLDataSource1"
    ShowFooter="True" GridLines="None" >
    <StatusBarSettings ReadyText="Ready" LoadingText="Loading..." />
    <MasterTableView >
        <Columns>
            <telerik:GridBoundColumn HeaderStyle-Width="100px" UniqueName="VoterFirstName" HeaderText="First Name" DataField="FirstName" SortExpression="FirstName" >
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderStyle-Width="100px" UniqueName="VoterLastName" HeaderText="Last Name" DataField="LastName" SortExpression="LastName" >
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderStyle-Width="300px" UniqueName="VoterAddress" HeaderText="Address" DataField="Address" SortExpression="Address" >
            </telerik:GridBoundColumn >
            <telerik:GridButtonColumn DataTextFormatString="Remove" ButtonType="PushButton" UniqueName="RemoveContribution" HeaderStyle-Width="75px"
                ConfirmText="Are you certain that you want to remove this contribution?"  Text="Remove"
                HeaderText="Remove" CommandName="RemoveContribution" CommandArgument="VoterQualifyingContributionId" DataTextField="VoterQualifyingContributionId" >
            </telerik:GridButtonColumn>
            <telerik:GridBoundColumn HeaderStyle-Width="100px" UniqueName="ContributionStatus" HeaderText="Status" DataField="PaymentDescription" SortExpression="PaymentDescription" >
            </telerik:GridBoundColumn >
            <telerik:GridBoundColumn UniqueName="VoterQualifyingContributionId" HeaderText="" DataField="VoterQualifyingContributionId" Visible="false" >
            </telerik:GridBoundColumn >
        </Columns>
    </MasterTableView>
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
    </ClientSettings>
</telerik:RadGrid>

I have also attached two screen captures.

Many thanks in advance for any assistance you can give me!

Lynn



Jayesh Goyani
Top achievements
Rank 2
 answered on 27 Dec 2011
1 answer
122 views
Hi,
I have RadGrid with template field.In this i have textboxes.The user will enter values in textbox.The radgrid has paging option.How can i retain values in the previous page when user navigate to nextpage.How can i handle this ?
 
Richard
Top achievements
Rank 1
 answered on 27 Dec 2011
5 answers
441 views
I am trying to do two way databinding with a RadComboBox when Checkboxes="true". Getting them to save to the database is fine but binding each checked item when reading from the database isnt working. The CheckedItems property is read only so that wont work. I tried this next:

Dim branchBox As RadComboBox = FormView1.FindControl("branchBox")
For Each b As Branch In current.branches
    For Each item As RadComboBoxItem In branchBox.Items
        item.Checked = (b.branchId = item.Value)
    Next
Next

'current' is an instance of an Person entity in my Entity Framework. A Person has a collection of branches. I want to bind the RadComboBox to all of the branches for the person.

Doing the above, only the last item in the RadComboBox will be checked. So, if the person has "Army" and "Navy" as branches and Army appears before Navy in the RCB, only Navy will be checked. Army will be unchecked.

Is there a way to set multiple checkboxes in a RadComboBox in C#?
Kalina
Telerik team
 answered on 27 Dec 2011
1 answer
52 views
I am using the GridButton Column successfully to allow the user to trigger various processing events.  The "ConfirmText" (and associated) property(s) work great and provide a much needed assist.

However, are there any plans to add an additional messaging capability (actually 3) called something like:

(1) SuccessText;
(2) CancelText; and,
(3) ErrorText.

These 2 properties would provide the text for displaying confirmations to the user AFTER the event code has run. I'm not certain how you would trigger these displays, but for a quick run-through:

(a) The user clicks a button to delete a certain row (a more complex delete process than supported by the grid);
(b) The current "ConfirmText" then asks the user if this is what they want to do.
(c) If the user says "No", then the "CancelText" message would be displayed (i.e. - "the delete has been cancelled").
(d) If the user sanys "Yes", then following the execution of the event code, the "SuccessText" would be similarly displayed (i.e. - The delete was successful").
(e) Obviously, the "ErrorText" would be displayed if the event code triggered an error event.

As I said, I'm not certain how one could "trigger" the "SuccessText" or the "ErrorText", but if you could solve that, these capabilities would be very nice "user touch" enhancements.

Thanks for great products!

Lynn
Richard
Top achievements
Rank 1
 answered on 27 Dec 2011
3 answers
270 views
We are having issues with the asyncupload control.  Once a user selects to upload a document, the progress indicator with IE and Firefox in the status bar shows that it is still doing something in the background.

How do I get it to stop?  Users think it's still doing something so they wait but it actually does upload the document if they continue.

Here's the code:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd">
  
<body class="BODY">
    <form runat="server" id="mainForm" method="post">
    <telerik:RadScriptManager ID="ScriptManager1" runat="server" />
        <telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" Skin="Office2007"
            ReadOnlyFileInputs="true" >
        </telerik:RadAsyncUpload>
    </form>
</body>
</html>
Richard
Top achievements
Rank 1
 answered on 27 Dec 2011
1 answer
90 views
hello...

i always thanks to telerik forum helpers..

i have a question about telerik skin manager.

i want to  apply custom skins in my project .  but it did not apply.

please tell me the way ....  ã… ã… 

i attached screen shot and my source.

mytest page is DemoSkin/FrmDemoSkin.aspx

Thanks for regards..
Richard
Top achievements
Rank 1
 answered on 27 Dec 2011
4 answers
150 views
Hello,
i am trying to set the selected date of a datetimepicker client side, the datetime i am trying to set is of the following format:
15/12/2011 12:00:00 AM
 this is my line of code : rdtpLastDateTime.set_selectedDate(result[0].Maximum); //  result[0].Maximum = 15/12/2011 12:00:00 AM
but the debuger breaks and throws exception: Object doesn't support this property or method
Please help on this topic
Thanks.
Rabih
Top achievements
Rank 1
 answered on 27 Dec 2011
3 answers
125 views
Hi,

I'm trying to style a RedPanelBar (as a submenu) and now I would like to select an li within this menu when it's active. Problem is that the 'rpSelected'-class is added to it's childelement (rpLink). Is there a simple solution to this? And wouldn't it be (more) obvious to add the "rpSelected" and "rpFocused" to the parent-li instead of its childelement? Because it's possible to select a lot of levels deeper into the DOM starting at some element, but you can't even select 1 level up into the DOM, just by CSS. Obviously it's not a problem when using javascript, but I don't want to use that just for styling-issues.

I hope someone comes up with a simple solution I just overlooked. Or even better, I hope this can be changed into the basic functionality of the control... :)

Thanks in advance!

Menno
Ivan Zhekov
Telerik team
 answered on 27 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?