Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
234 views
I am wondering if there is a way to display recurrence and reminder icons when using custom Appointment Templates? Thanks
Plamen
Telerik team
 answered on 03 May 2013
2 answers
202 views

I have try group telerik grid using drop down list

grouping method source code is bellow

 try
        {

            this.grd.MasterTableView.GroupByExpressions.Clear();//clear all group expressions
            grd.MasterTableView.GroupsDefaultExpanded = false;

            GridGroupByExpression expression = new GridGroupByExpression();
            GridGroupByField gridGroupByField = new GridGroupByField();
            gridGroupByField = new GridGroupByField();
            if (cboGroupByItem1.SelectedValue != "0")
            {
                gridGroupByField.FieldName = cboGroupByItem1.SelectedValue;
                gridGroupByField.HeaderText = cboGroupByItem1.SelectedItem.Text;
                expression.SelectFields.Add(gridGroupByField);
            }

            if (cboGroupByItem2.SelectedValue != "0")
            {
                gridGroupByField.FieldName = cboGroupByItem2.SelectedValue;
                gridGroupByField.HeaderText = cboGroupByItem2.SelectedItem.Text;
                expression.SelectFields.Add(gridGroupByField);
            }

            grd.MasterTableView.GroupByExpressions.Add(expression);


        }
        catch (Exception ex)
        {
            label1.Text = ex.ToString();
        }
        finally
        {
            grd.Rebind();
        }

when grid rebind method it will generate bellow error

An error occured adding a relation to DataRelationCollection. Please, make sure you have configured the expressions properly - both GroupByFields and SelectFields are required!

How i solve this question please help me

Wella
Top achievements
Rank 1
 answered on 03 May 2013
5 answers
123 views
I need to group rad grid according  to asp drop down list change event according to drop down change
Princy
Top achievements
Rank 2
 answered on 03 May 2013
1 answer
135 views
Hi,
I have used parent child hierarchical Telerik Grid with client side binding. My requirement is rad grid without paging and page size should be 365. But it is accepting only 110. If we give more than 110, it's throwing Exception as "Exception of type 'System.OutOfMemoryException'.

Below is the code 


<telerik:RadGrid ID="grdDepositReconciliation" runat="server" Skin="eMod" Width="700px"
    GridLines="None" AllowFilteringByColumn="false" AllowCustomPaging="false" PageSize="110"
    EnableEmbeddedSkins="false" AllowPaging="false" AllowSorting="false">
    <ClientSettings>
        <ClientEvents OnDataBinding="beforeLoad" OnDataBound="afterLoad" OnDataBindingFailed="LoadFailed" OnRowDataBound="grdDepositReconciliation_RowDataBound"
            OnCommand="grdDepositReconciliation_Command" OnHierarchyExpanding="grdDepositReconciliation_HierarchyExpanding"
            OnHierarchyCollapsing="grdDepositReconciliation_HierarchyCollapsing"/>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
    </ClientSettings>
    <MasterTableView AutoGenerateColumns="false" TableLayout="Fixed" CssClass="wd" Width="100%" HierarchyLoadMode="Client" ClientDataKeyNames="TransactionDate, AMCount, VMCount, CKCount,AMTotalCount,VMTotalCount,CKTotalCount">
        <Columns>
            <telerik:GridBoundColumn DataField="TransactionDate" HeaderText="Date" UniqueName="TransactionDate" HeaderStyle-Width="60"
                ShowFilterIcon="false" AllowFiltering="false" DataType="System.DateTime"/>
            <telerik:GridTemplateColumn  DataField="pAMEX" HeaderText="Amex" HeaderStyle-HorizontalAlign="Center"
                AllowFiltering="false" HeaderStyle-Width="60">
                <ItemTemplate>
                    <asp:CheckBox ID="chkpAMEX" runat="server"/>
                    <%--<input type="checkbox" id="chkpAMEX" runat="server"/>--%>
                    <asp:label id="lblpAMEX" runat="server"/>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn  DataField="pVISAMASTER" HeaderText="Visa/MC" HeaderStyle-HorizontalAlign="Center"
                AllowFiltering="false" HeaderStyle-Width="60">
                <ItemTemplate>
                    <asp:CheckBox ID="chkpVISAMASTER" runat="server"/>
                    <%--<input type="checkbox" id="chkpVISAMASTER" />--%>
                    <asp:label id="lblpVISAMASTER" runat="server"/>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn  DataField="pCHECK" HeaderText="Checks" HeaderStyle-HorizontalAlign="Center"
                AllowFiltering="false" HeaderStyle-Width="60">
                <ItemTemplate>
                    <asp:CheckBox ID="chkpCHECK" runat="server" />
                    <asp:label id="lblpCHECK" runat="server"/>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <%--<telerik:GridBoundColumn DataField="DepositReconciliationId" HeaderText="DepositReconciliationId" Visible="false" />--%>
             
        </Columns>  
        <NestedViewTemplate>
             <telerik:RadGrid ID="grdDepositReconciliationDetails" runat="server" GridLines="None"
                Skin="eMod" EnableEmbeddedSkins="false" AllowSorting="false" PageSize="50" AutoGenerateColumns="false" Width="650px"
                CellSpacing="0">
                <ClientSettings>
                    <ClientEvents OnCommand="grdDepositReconciliationDetails_Command" OnRowDataBound="grdDepositReconciliationDetails_RowDataBound"
                         OnDataBinding="beforeLoad" OnDataBound="afterLoad" OnDataBindingFailed="LoadFailed" />
                </ClientSettings>
                <MasterTableView Width="650px" HierarchyLoadMode="Client" ShowHeader="false" ClientDataKeyNames= "AMTransactionID,VMTransactionID,CKTransactionID, AMDRID, VMDRID, CKDRID">                               
                    <Columns>
                        <telerik:GridBoundColumn DataField="PaymentDate" HeaderText="Date" HeaderStyle-Width="70"/>
                        <%--<telerik:GridBoundColumn DataField="AM" HeaderText="AMEX" />--%>
 
                        <telerik:GridTemplateColumn  DataField="cAMEX" HeaderText="AMEX" HeaderStyle-HorizontalAlign="Center"
                        AllowFiltering="false" HeaderStyle-Width="70">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkcAMEX" runat="server" />
                                <asp:label id="lblcAMEX" runat="server"/>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn  DataField="cVISAMASTER" HeaderText="Visa/MC" HeaderStyle-HorizontalAlign="Center"
                        AllowFiltering="false" HeaderStyle-Width="70">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkcVISAMASTER" runat="server" />
                                <asp:label id="lblcVISAMASTER" runat="server"/>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn  DataField="cCHECK" HeaderText="Checks" HeaderStyle-HorizontalAlign="Center"
                        AllowFiltering="false" HeaderStyle-Width="72">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkcCHECK" runat="server" />
                                <asp:label id="lblcCHECK" runat="server"/>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
        </NestedViewTemplate>
        <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" ShowExportToExcelButton="false" />
    </MasterTableView>
    <ClientSettings AllowDragToGroup="true" Scrolling-AllowScroll="true" Scrolling-UseStaticHeaders="true" />
</telerik:RadGrid>

Thanks in advance.
Eyup
Telerik team
 answered on 03 May 2013
4 answers
267 views
I have a gridview with a command field. at selected index change I set the gridviews row content to some textboxes.
I want to open a radwindow with selected indexchanged of gridview but I couldn't do that.
my code for radwindow at aspx file is:
<telerik:RadWindow ID="RadWindow1" runat="server" Width="800px" Height="600px" Modal="true"  OpenerElementID="showDialog" OnClientClose="clientClose" OnClientShow="clientShow" ReloadOnShow="true">
       
      <ContentTemplate>
      <asp:TextBox ID="TxtTitle" runat="server"></asp:TextBox>
      <br />
      <asp:TextBox ID="TxtDetail" runat="server"></asp:TextBox>
      <br />
      <asp:TextBox ID="TxtDate" runat="server"></asp:TextBox>
      <br />
       
 
      <telerik:RadEditor ID="RadEditor1" runat="server"  ImageManager-ViewPaths="~/Images"
  ImageManager-UploadPaths="~/Images"
  ImageManager-DeletePaths="~/Images">
      </telerik:RadEditor>
 
      <br />
 
 
      <asp:FileUpload ID="FileUpload1" runat="server" />
      <br />
      <asp:CheckBox ID="ChkActive" runat="server" />
      <br />
      <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="save" />
      <br />
 
      </ContentTemplate>
      </telerik:RadWindow>
and the code behind for selectedindexchanged:
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
   {
        
       int index = GridView1.SelectedIndex;
       TextBox txttitle = (TextBox)(GridView1.Rows[index].FindControl("TxtTitle"));
       TxtTitle.Text = txttitle.Text;
 
       TextBox tx = (TextBox)(GridView1.Rows[index].FindControl("TxtDetail"));
       TxtDetail.Text = tx.Text;
       TextBox descttext = (TextBox)(GridView1.Rows[index].FindControl("TxtDesc"));
       RadEditor1.Content = descttext.Text;
       CheckBox chk = ((CheckBox)GridView1.Rows[index].FindControl("Chactive"));
       ChkActive.Checked = chk.Checked;
 
   }
Somy
Top achievements
Rank 1
 answered on 03 May 2013
2 answers
158 views
Hi

I am using the <telerik:RadSplitter> however I cannot get it to resize the width properly to 100%.

I have the following :-

<body>
       <header>this is the header</header>
        <div id="body">
            <section class="content-wrapper main-content clear-fix">
                <telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Vertical" EnableViewState="false" LiveResize="True" BorderSize="0" CssClass="Splitter">
                    <telerik:RadPane ID="RadPane1" runat="server" Width="311" BackColor="#ffffff" CssClass="Splitter">
                        <uc1:UCMainMenu ID="UCMainMenu1" runat="server" />
                    </telerik:RadPane>
                    <telerik:RadSplitBar ID="RadSplitbar2" runat="server" CollapseMode="Forward" >
                    </telerik:RadSplitBar>
                    <telerik:RadPane ID="Pane2" runat="server" BackColor="#FFFFFF" CssClass="Splitter">
                        <asp:ContentPlaceHolder runat="server" ID="MainContent" />
                    </telerik:RadPane>
                </telerik:RadSplitter>
            </section>
        </div>
        <footer>this is the footer</footer>
</body>

and my CSS is as follows :-

html {
    background-color: #e2e2e2;
    margin: 0;
    padding: 0;
}

body {
    background-color: #fff;
    color: #333;
    font-size: .85em;
    font-family: "Segoe UI", Verdana, Helvetica, Sans-Serif;
    margin: 0;
    padding: 0;
}

form {
    margin: 0;
    padding: 0;
    height: 100%;  
}

/* main layout
----------------------------------------------------------*/
.content-wrapper {
    margin: 0 auto;
    width: 100%;
    height: 100%;
}

#body {
    background-color: #efeeef;
    clear: both;
    padding-bottom: 35px;
    height: 100%;
    width: 100%;
}

    .main-content {
        padding-left: 10px;
        padding-top: 30px;
        height: 100%;
        width: 100%;
        }


header .content-wrapper {
    padding-top: 20px; 
}


.Splitter {
    height: 100% !important; 
    width: 100% !important; 
}

How can I get it to resize the width of the right pane to 100% of the screen?

When I remove the radsplitter and put a normal asp.net control, everything works as its supposed to.

Thanks

Johann
Gokul
Top achievements
Rank 1
 answered on 03 May 2013
4 answers
240 views
I have a GridView that gets its data from a Microsoft SQL database.

The Person table inside of my database has a few columns
ID, Name ,Surname, Age, Address and Status

The GridView only has 2 columns that get populated 'Name' and 'Status' from my Person table in the database.
The Status can either be 'Active' or 'Inactive'.

Then an additional update column was added to my grid view.
My gridView columns look like the following

<telerik:GridBoundColumn DataField="Name" HeaderText="First Name"
meta:resourcekey="GridBoundColumnResource1" UniqueName="fName" Resizable="False" />
 
<telerik:GridBoundColumn DataField="Status" HeaderText="Status"
meta:resourcekey="GridBoundColumnResource2" UniqueName="currentStatus" Resizable="False" />
 
<telerik:GridTemplateColumn UniqueName="TemplateUpdateColumn">
<ItemTemplate>
<asp:LinkButton ID="Update" runat="server" AutoPostBack="true" " Text="Update" ><img src="../icons/update.ico"/></asp:LinkButton>
</ItemTemplate>
</telerik:GridTemplateColumn>

Each row that gets added into my GridView it will also have an update button.

All that i need to happen is that when i click on the update button for that specific item in the GridView the corrasponding item in my database my be set from active to Inactive.

i am using C# asp.net and linq.
Princy
Top achievements
Rank 2
 answered on 03 May 2013
3 answers
268 views
This could just be my lack of understanding about ASP.Net...

I'm using the Calendar control. When someone clicks on an appointment, I want to open a new browser window to a certain URL which I dynamically construct.

I can achieve this with Response.Redirect, but it won't open in a new window (this part is important for various reasons).
Protected Sub r_scheduler_AppointmentClick(sender As Object, e As Telerik.Web.UI.SchedulerEventArgs) Handles r_scheduler.AppointmentClick
    Response.Redirect("http://www.google.com", False)
End Sub

So the above code works great (except it won't open in a new window).When I try to change it using various tricks to open links in a new window, nothing seems to work. E.g.
Response.Write("<script>")
Response.Write("window.open('http://www.google.com','_blank')")
Response.Write("</script>")

It seems like the event handler executes code server side while i need to execute code client-side, but I don't know how to achieve my goal. Am I approaching the problem in a crazy manner? Is there an easier way to make double-clicking appointments open a new window with an arbitrary URL?
Shinu
Top achievements
Rank 2
 answered on 03 May 2013
1 answer
132 views
I am using radnumerictextbox and I have this code below, as soon as I type and go on the other textbox even though I typed all 123456789123456 like that it gives me shows me totally different results 70368744177664 like this...

<telerik:RadNumericTextBox ID="radtxtDefaultFee" runat="server" Width="300px">
<NumberFormat DecimalDigits="3" AllowRounding="true" />
</telerik:RadNumericTextBox>
Shinu
Top achievements
Rank 2
 answered on 03 May 2013
0 answers
113 views
Hi Team,

I have a radupload control in my page with a property EnableFileInputSkinning that is set to false, i needed to disable this property so i can apply my own design for the control. However, when this porperty is set to false my localization for the browse button is not working. Text is always set to "Browse....".

Attached is the sample code of my control.
<telerik:RadUpload ID="uscUploadMetadata" runat="server" MaxFileInputsCount="1" CssClass="fileupload"
                            ControlObjectsVisibility="None" EnableFileInputSkinning="false" OnClientAdded="keyboardSupport">
                                <Localization Select="<%$Resources: Browse%>" Remove="<%$Resources:Global, Remove%>">                     </Localization>
                            </telerik:RadUpload>

Please help me with this one.

Thank you,

Dean

Dean
Top achievements
Rank 1
 asked on 03 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?