Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
394 views
This should be simple but I've tried many different approaches and just can't get it.  All I want to do is set a default value of todays date in a raddatepicker control I have in a radgrid when the user clicks "Add New Record" in the header.  The markup is below.  It's the "txtTransactionDateNew" column I want to set the value in.  I'm using vb.

<

 

telerik:RadGrid ID="rgTransactions" runat="server" AllowPaging="True" DataSourceID="dsTransactions" GridLines="None" AutoGenerateEditColumn="True" Skin="Office2007" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True">

 

 

 

<

 

MasterTableView autogeneratecolumns="False" datakeynames="TransactionID"  datasourceid="dsTransactions" Caption="Transactions" EditMode="EditForms"  commanditemdisplay="Top" InsertItemPageIndexAction="ShowItemOnFirstPage">

 

 

<CommandItemSettings AddNewRecordText="Add New Transaction" />

 

<Columns>

 

<

 

telerik:GridBoundColumn DataField="TransactionID" ReadOnly="True" HeaderText="TransactionID" SortExpression="TransactionID" Visible="false" UniqueName="TransactionID" DataType="System.Int32"></telerik:GridBoundColumn>

 

 

<

 

telerik:GridBoundColumn DataField="DonorID" HeaderText="DonorID" Visible="false" SortExpression="DonorID" UniqueName="DonorID" DataType="System.Int32" ReadOnly="true"></telerik:GridBoundColumn>

 

 

<telerik:GridTemplateColumn DataField="CheckNumber" HeaderText="Check Number" SortExpression="CheckNumber" UniqueName="CheckNumber">

 

<EditItemTemplate>

 

<telerik:RadTextBox ID="txtCheckNumber" Runat="server" Skin="Office2007"

 

Text='<%# Bind("CheckNumber") %>' Width="125px">

 

</telerik:RadTextBox>

 

</EditItemTemplate>

 

<ItemTemplate>

 

<asp:Label ID="CheckNumberLabel" runat="server"

 

Text='<%# Eval("CheckNumber") %>'></asp:Label>

 

</ItemTemplate>

 

</telerik:GridTemplateColumn>

 

<telerik:GridTemplateColumn DataField="CreditAmount" HeaderText="Credit Amount"

 

SortExpression="CreditAmount" UniqueName="CreditAmount">

 

<EditItemTemplate>

 

<telerik:RadNumericTextBox ID="txtCreditAmount" Runat="server"

 

Culture="English (United States)" DbValue='<%# Bind("CreditAmount") %>'

 

Skin="Office2007" Type="Currency" Width="125px">

 

</telerik:RadNumericTextBox>

 

</EditItemTemplate>

 

<ItemTemplate>

 

<asp:Label ID="CreditAmountLabel" runat="server"

 

Text='<%# Eval("CreditAmount") %>'></asp:Label>

 

</ItemTemplate>

 

</telerik:GridTemplateColumn>

 

<telerik:GridTemplateColumn DataField="DateEntered" HeaderText="Date Entered"

 

SortExpression="DateEntered" UniqueName="DateEntered">

 

<EditItemTemplate>

 

<telerik:RadDatePicker ID="txtTransactionDateNew" Runat="server"

 

Culture="English (United States)" DbSelectedDate='<%# Bind("DateEntered") %>'

 

Skin="Office2007">

 

<calendar skin="Office2007" usecolumnheadersasselectors="False"

 

userowheadersasselectors="False" viewselectortext="x" ShowRowHeaders="False">

 

</calendar>

 

</telerik:RadDatePicker>

 

</EditItemTemplate>

 

<ItemTemplate>

 

<asp:Label ID="DateEnteredLabel" runat="server"

 

Text='<%# Eval("DateEntered") %>'></asp:Label>

 

</ItemTemplate>

 

</telerik:GridTemplateColumn>

 

<telerik:GridCheckBoxColumn DataField="FifteenPercent"

 

DataType="System.Boolean" HeaderText="Fifteen Pct"

 

SortExpression="FifteenPercent" UniqueName="FifteenPercent">

 

</telerik:GridCheckBoxColumn>

 

<

 

telerik:GridBoundColumn DataField="SortDate" HeaderText="SortDate"

 

 

SortExpression="SortDate" UniqueName="SortDate" DataType="System.DateTime"

 

ReadOnly="True" Visible="False"></telerik:GridBoundColumn>

 

<telerik:GridButtonColumn CommandName="Delete"

 

ConfirmText="Are you sure you want to delete this transaction?" Text="Delete"

 

UniqueName="column">

 

</telerik:GridButtonColumn>

 

</Columns>

 

</

 

MasterTableView>

 

 

<ClientSettings EnablePostBackOnRowClick="True">

 

<Selecting AllowRowSelect="True" />

 

</ClientSettings>

 

</telerik:RadGrid>

 

 

 

 

Tim
Top achievements
Rank 1
 answered on 26 Nov 2009
1 answer
121 views
hello

im new here in telerik and i will appreciate any kind of help..
here is my problem:
 from my Main.aspx   i open a RadWindow which contain a radgrid.. from that radgrid i want to get as return value of some columns   from the selected  line of that webcontrol and put it in my Main.aspx txtbox..

can someone please post the code for my problem?
i will appreciate if u write the code for client side and server side way..

p.s. i tried this w/ listbox but i change my mind and wanna used radgrid..
thanks in advance.
regards webster.
Mira
Telerik team
 answered on 26 Nov 2009
5 answers
174 views
Hello,
I want to change font of input control (textbox or button) in RadEditor in Design mode. But when I select it the font names combobox and font size combobox becomes disabled. When I set the font in HTML mode (style="font-family: comic sans ms; font-size: 50px;") the input font changes.
Is it possible to change the font of input controls using Rad Editor standard tools?
Thanks.
Rumen
Telerik team
 answered on 26 Nov 2009
10 answers
203 views
Hello all,

I have a grid, whose export functionality has worked well so far. I've made a lot of changes without testing this functionality, but now the export not return an xls/doc file, but instead shows all data in the grid.

I have a lot of code, so before I paste it all here, I would here for any of you have any idea what I could do to solve my problem, and again will receive an xsl/doc file instead.

Best regards,
Kenneth
Ahrensberg
Top achievements
Rank 1
 answered on 26 Nov 2009
3 answers
136 views
hi,
i have radgrid.i use nvarchar for dataype of which i trying to show with radgrid.i change width but i cant fix it.also i use DataFormatString="<nobr>{0}</nobr>" .it looks like this.
Dimo
Telerik team
 answered on 26 Nov 2009
5 answers
106 views
Hello,
I open a modal RadWindow whose internal aspx page use a div with an image as background. On this page I use also a RadFormDecorator applied on all the controls.

I have two problems:
1) When open for the first time it's all ok but when I close it and then I reopen it, the RadWindow has a "corrupted" appearance.
In particular the characters appear modified, as they were plotted without any antialiasing. You can see this behavior in the attached image file in 1A (first time) and 1B (second time open). I have also set the property  ReloadOnShow  to true on this RadWindow.
2) On the page shown inside the RadWindow, when I select something on a combobox and this provokes an ajax update of the form, when updated it seems that the combobox has no text inside it but when passing over this combobox with the mouse, the selected text appears. You can see this effect on the attached image on 2A and 2B figures.

Thanks for any help in solving these problems.
Georgi Tunev
Telerik team
 answered on 26 Nov 2009
2 answers
239 views

Hi,
I would like to see and use the old- and new values of the Items when the following functions are raised:
RadGrid1_ItemInserted(object source, GridInsertedEventArgs e)
RadGrid1_ItemUpdated(object source, GridUpdatedEventArgs e)
RadGrid1_ItemDeleted(object source, GridDeletedEventArgs e)
The reason is that the administrator wants to keep track of all changed data, true an email. By viewing wich data exactly has changed, inserted or Delete (firstName).
(FirstName, LastName, Email, Position,)


Something like this below:
if (Convert.ToString(old_values[key]) != Convert.ToString(new_values[key]))



I found different solutions but didn't quit cover the challenge I encounter:
Link1
Link2
Link3
Link4

Thanks,

Idar




Idar Sprock
Top achievements
Rank 2
 answered on 26 Nov 2009
1 answer
122 views
Does RadChart support funnel type?
Giuseppe
Telerik team
 answered on 26 Nov 2009
1 answer
161 views

Hi,

I am trying to add a RadGrid to GridTemplateColumn in GridTableView  . But it doesn't show up. Below is the code snippet. Am I missing something.

Thanks,
Gijo Joseph.





                            GridTableView tableView = new GridTableView(radGrid1);  
 
                            if (lastAddedDetailTable.ID == "RadGrid1")  
                            {  
                                radGrid1.MasterTableView.DetailTables.Add(tableView);  
                            }  
                            else  
                            {  
                                ((GridTableView)lastAddedDetailTable).DetailTables.Add(tableView);  
                            }  
 
                            //tableView.ItemsCreated += new GridItemEventHandler(radGrid1_ItemCreated);  
                              
                            //tableView.Width = Unit.Percentage(100);  
                            //tableView.Font.Bold = true;  
                            //tableView.BorderWidth = 2;  
                            //tableView.BorderColor = System.Drawing.Color.Red;  
 
                            if (filterElement.Attribute("parameters") != null)  
                                tableView.Name = filterElement.Attribute("parameters").Value;  
 
                            if (filterElement.Attribute("dataKeyNames") != null)  
                                tableView.DataKeyNames = filterElement.Attribute("dataKeyNames").Value.Split(',');  
 
 
 
                            string[] columnNames = filterElement.Attribute("columns").Value.ToString().Split(',');  
 
                            foreach (string columnName in columnNames)  
                            {  
                                GridBoundColumn boundColumn = new GridBoundColumn();  
                                tableView.Columns.Add(boundColumn);  
                                colName = columnName;  
                                if (colName.Contains("[F]"))  
                                {  
                                    boundColumn.Visible = false;  
                                    colNamecolName = colName.Substring(0, colName.IndexOf("[F]"));  
                                }  
                                boundColumn.UniqueName = colName;  
                                boundColumn.DataField = colName;  
                                boundColumn.HeaderText = colName;  
                                boundColumn.HeaderStyle.Font.Bold = true;  
                            }  
 
                            GridTemplateColumn templateColumn = new GridTemplateColumn();  
                            tableView.Columns.Add(templateColumn);  
                            templateColumn.ItemTemplate = new GridTemplate(filterElement.Attribute("name").Value); 
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Text;  
using System.Web.UI;  
using Telerik.Web.UI;  
 
namespace Data.Reports  
{  
    public class GridTemplate : ITemplate  
    {  
         protected RadGrid childGrid;     
         private string colName;  
         public GridTemplate(string cName)  
         {  
             colName = cName;  
         }  
 
         public void InstantiateIn(System.Web.UI.Control container)  
         {  
             childGrid = new RadGrid();  
             childGrid.ID = colName;  
             //childGrid.NeedDataSource +=new GridNeedDataSourceEventHandler(childGrid_NeedDataSource);  
             childGrid.DataSource = DBClass.GetDataSP(Grid.referencePath, null);      
             container.Controls.Add(childGrid);  
 
         }  
 
         public void childGrid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
         {  
             childGrid.DataSource = DBClass.GetDataSP(Grid.referencePath, null);      
         }  
    }  
} 
Mira
Telerik team
 answered on 26 Nov 2009
1 answer
95 views
Hello All,

I've searched the examples/forums, but I've been beating my head against a wall for the last four hours trying to figure out how to remove the Full-Screen Button & Custom Links from an editor. As far as Custom Links are concerned, I removed the links section from my ToolsFile, but I'm still not having any luck (aside from the fact that now custom links is blank, but the field is still there. What might I be missing?

Incidentally, I'm using ver: 2008.3.1125.35

Thanks,

Brandon Osborne
Dobromir
Telerik team
 answered on 26 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?