Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
132 views
Hi there,

I developed some projects with entity framework up till now - so my skills with this technology (WPF/WinForms) are quiet good. But I'm rather new to ASP.net. In WinForms there are two events for data binding "Parse" and "Format" and in WPF we have custom implemented IValueConverts. But what ways are there in ASP.net (not MVC)?!?

I successfully attached an EntityDataSource to a RadGrid. Inserts/Updates/Deletes are working as expected! But trying to implement some piece of user defined value parsing drives me crazy!

For an example I give you the following column definition:

<

 

EditItemTemplate>

 

<asp:TextBox ID="TextBoxPrice" Text='<%# Bind("Price", "{0:#.00} €") %>' runat="server"></asp:TextBox>
</EditItemTemplate>

As you can see, there is a value from the data source (property 'Price') bound with formating information to an appropriate TextBox control. But when I try to update - of course - the operation fails. The string "10,00 €" could not be parsed as an numeric value. Now I would expect an event wich gives me the instance of the current bound item or a value that I can change - anything to customized changing string "10,00 €" to "10,00" or custom filling values to the object. But I can't find anything related :-S

Am I missing something here???

Best regards,
Oliver

 

 

Tsvetoslav
Telerik team
 answered on 25 Mar 2009
1 answer
80 views
hi
dis is bhargava

         am trying to get the value of  args.get_newStartTime() in  OnClientAppointmentMoveEnd but am not able to get the value when i try to move an appointment it is giving some javascript error....can u help me plz.....!
          

                             
Peter
Telerik team
 answered on 25 Mar 2009
1 answer
80 views
Bhargava

  hi..while am trying to resize the appointment  in the OnClientAppointmentResizeEnd event i wrote the code like this
        var SDate = eventArgs.get_Appointment().get_start();
        var EDate = eventArgs.get_appointment().get_end();
for example i drag the appointment from 8am to 2 pm for 23 march i want SDate as 2009-03-23 8:00:00.000 and EDate as 2009-03-23 14:00:00.000 lly again i drag the appointment from 2pm to 10 am for 23 march den i want SDate as 2009-03-23 8:00:00.000 and EDate as 2009-03-23 10:00:00.000 so where ever i drag the appointment i want that startdate and end date with time....can u help me plz...!

Peter
Telerik team
 answered on 25 Mar 2009
3 answers
75 views
Hi,
I have a node whose ExpandMode prop is set to ServerSideCallback. When I click the + on the node the OnClientNodeExpanding JAvascript function executes. If I try to expand it using the keyboard however, this javascript method does not fire.


Atanas Korchev
Telerik team
 answered on 25 Mar 2009
4 answers
238 views
I have the following codes to update which is working but I would like insert a new row which I need your inputs
                      
   protected void RgUserMast_UpdateCommand(object source, GridCommandEventArgs e)  
    {  
 
        if (e.CommandName == "Update")  
        {  
            GridEditableItem dataItem = (GridEditableItem)e.Item;  
            string ProcessId = dataItem.GetDataKeyValue("ProcessId").ToString();  
            GridEditableItem editedItem = e.Item as GridEditableItem;  
            GridEditManager editMan = editedItem.EditManager;  
            GridTextBoxColumnEditor editor = editMan.GetColumnEditor("ProcessName") as GridTextBoxColumnEditor;  
            string selectedValue = editor.Text;  
            Query = "Update ProcessMaster set ProcessName='" + editor.Text + "' where ProcessId='" + ProcessId + "'";  
            obj.ExecuteNonQuery(Query);  
         
        }   
                        <telerik:GridBoundColumn DataField="ProcessId" HeaderText="ProcessId" SortExpression="ProcessId" 
                        UniqueName="ProcessId" ReadOnly="true" Visible="true" HeaderStyle-Font-Bold="true" 
                        HeaderStyle-HorizontalAlign="Center">  
                        <HeaderStyle HorizontalAlign="Center" Font-Bold="True" Width="30px"></HeaderStyle> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="ProcessName" HeaderText="Process" SortExpression="ProcessName" 
                        UniqueName="ProcessName" ReadOnly="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">  
                        <HeaderStyle HorizontalAlign="Center" Font-Bold="True" Width="30px"></HeaderStyle> 
                        </telerik:GridBoundColumn> 
                       
                        
Parodist
Top achievements
Rank 1
 answered on 25 Mar 2009
2 answers
139 views
Hi,

I am using herarchial grid with 4 levles and i am using multiple tables at the 2nd level, My problem is i want to hide one of the two table based on data that has if there are no data in that table then i need to hide that table i.e

MainTalbe
    -- Detail Table1
            -multiple table 1(data is there)
            -multiple table 2(no data) ------need to hide this.
    ---Detail Table1
            -multiple table 1(no data)
            -multiple table 2(data is there) -------need to hide this.


This i my scenario, now i want to hide the table with no data at 3rd level here some childs may have data and some childs may not have data, kindly advise how to do this it all at the single level.

Regards,

Santhosh
santhosh
Top achievements
Rank 2
 answered on 25 Mar 2009
1 answer
110 views
We have been using a vertically aligned tabstrip (w/ the Outlook skin) for some time and its always had a "tail" image at the bottom of the tabs.  In Q1 2009 - this has disappeared.  Was this intentional?  Is there any way to add it back?
Paul
Telerik team
 answered on 25 Mar 2009
5 answers
205 views
Hi,

I have a raggrid containing 4 columns,first column being the rowId and lastcolumn being the GridDropdownColumn.
And I have to update just the lastcolumn which is the  GridDropdownColumn using an in-line  auto update however while updating it I need to give a condition based on rowId .So how can I update based on the selected rowid?


Thanking you in advance.


Shinu
Top achievements
Rank 2
 answered on 25 Mar 2009
9 answers
449 views
Hello... I am using a custom template for editing or inserting elements in a grid. I implemented the UpdateCommand where I call a stored procedure in order to add or update information.

Before that event returns, I am calling Rebind method of the grid which causes the edited item be refreshed, but the edit form remains visible. How can I hide the edit form?

Any help will be greatly appreciated.

Thanks
Jaime
Nicolaï
Top achievements
Rank 2
 answered on 25 Mar 2009
3 answers
178 views
I have implemented the "Edit on Double-click" functionaliy found in the online demo for my grid, but I need users to be able to edit in popup mode using a form template if they click a button column that I have added. That same popup needs to be used for new item inserts as well.

Here is the column I added:
<telerik:GridButtonColumn ButtonType="LinkButton" CommandName="Edit2" Text="Edit2"></telerik:GridButtonColumn> 

and here is the code behind:
Protected Sub radgridItems_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs)  
 
        If e.CommandName = RadGrid.InitInsertCommandName Then 'add new item clicked 
 
            If radgridItems.MasterTableView.EditMode <> GridEditMode.PopUp Then 
                radgridItems.MasterTableView.EditMode = GridEditMode.PopUp 
                radgridItems.Rebind() 
            End If 
 
            e.Canceled = True 
            e.Item.OwnerTableView.InsertItem() 
 
    ElseIf e.CommandName = "Edit2" Then 'custom button 
 
            If radgridItems.MasterTableView.EditMode <> GridEditMode.PopUp Then 
                radgridItems.MasterTableView.EditMode = GridEditMode.PopUp 
                radgridItems.Rebind() 
            End If 
 
            radgridItems.MasterTableView.Items(e.CommandArgument()).Edit = True 
            radgridItems.Rebind() 
 
        ElseIf e.CommandName = "Edit" Then 'normal edit 
 
            If radgridItems.MasterTableView.EditMode <> GridEditMode.InPlace Then 
                radgridItems.MasterTableView.EditMode = GridEditMode.InPlace 
                radgridItems.Rebind() 
            End If 
 
            radgridItems.MasterTableView.Items(e.Item.ItemIndex).Edit = True 
            radgridItems.Rebind() 
 
        End If 
 
End Sub 

The problem is that the popup does not display when the user clicks the "Edit2" column or when they click "Add new record". Curiously though, the row is highlighted in yellow as if it was set to edit mode. What am I doing wrong here?


Sebastian
Telerik team
 answered on 25 Mar 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?