Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
215 views
I am trying to change the color of the header row when its in expanded mode. I tried the below code but didn't work.

Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid1.ItemDataBound
        If TypeOf e.Item Is GridGroupHeaderItem Then
            Dim gpheader As GridGroupHeaderItem = CType(e.Item, GridGroupHeaderItem)
 
           If item.Selected Then
             gpheader.BackColor = Drawing.Color.DarkSeaGreen
            End If
End Sub

Any other way?
Vijaianand
Top achievements
Rank 1
 answered on 27 Dec 2011
6 answers
163 views
I am trying to alter the visibility of a RadAjaxPanel that is within an ASP FormView. Please suggest an approach that works; the following approach does not:

FormView 

fv = form1.FindControl("FormView1") as FormView;

RadAjaxPanel myPanel = fv.FindControl("ThePanelOfInterest") as RadAjaxPanel;

myPanel.Visible = true;

myPanel is always shown as null even though it does exist.

Sy
Top achievements
Rank 1
 answered on 27 Dec 2011
13 answers
590 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
140 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
134 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
471 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
76 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
285 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
103 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?