Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
117 views
Whenever I have inserting or editting, e.Appointment.Attributes is always empty.

This is what I have:

  • CustomerID is a value found in my xml field in database
  • Advance Form with added CustomerID
  • OnClientFormCreated

     

    ="schedulerFormCreated" with appropriate javascript

     

     

  • CustomAttributeNames

     

    ="CustomerID"

  • <

     

    AdvancedEditTemplate>

     

     

    <uc1:AdvancedFormCS ID="AdvancedFormCS2" runat="server" Mode="Edit" Subject='<%# Bind("SUBJECT") %>'

     

    Start='<%# Bind("START") %>' End='<%# Bind("END") %>' RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' />

     

     

    ... I can't bind CustomerID here either

     

 

 

 

What am I missing?

 

 

 

Sarah
Top achievements
Rank 1
 answered on 22 Feb 2010
2 answers
106 views
Hi, i have a problem, i extracting values from radgrid row and i assign that values to controls in the client side. that works fine in IE but in firefox shows the word "undefined". this is the codeblock that i use.
 <script language="javascript" type="text/javascript"> 
 
            function RowMouseOver(sender, eventArgs) { 
 
                var dataItem = $get(eventArgs.get_id()); 
                document.getElementById("Cod").innerHTML = dataItem.cells[3].innerText; 
                document.getElementById('DescripNom').innerHTML = dataItem.cells[4].innerText;

                document.getElementById("TxtCod").value = dataItem.cells[3].innerText; 
                document.getElementById("DDLCodAr").value = dataItem.cells[6].innerText; 
                document.getElementById("TxtDescrip").value = dataItem.cells[4].innerText; 
                document.getElementById("TxtDescShort").value = dataItem.cells[5].innerText; 
                document.getElementById("TxtAus").value = dataItem.cells[8].innerText; 
                document.getElementById("ChBCal").checked = dataItem.cells[9].children[0].children[0].checked; 
                document.getElementById("ChBArFund").checked = dataItem.cells[10].children[0].children[0].checked; 
                document.getElementById("ChBAct").checked = dataItem.cells[13].children[0].children[0].checked; 
                document.getElementById("TxtOPrint").value = dataItem.cells[11].innerText; 
                document.getElementById("TxtPes").value = dataItem.cells[12].innerText; 
            } 
        
        </script> 
i don't have idea why happening this. anybody could help me??... thanks
Jhonattan
Top achievements
Rank 2
 answered on 22 Feb 2010
3 answers
126 views
hi all,
i just want to be sure that i'm working right with the grid..i manipulate data in the code behind, here is the ItemCommand sub

    Private Sub RadGrid2_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid2.ItemCommand  
        If e.CommandName = "Update" Then 
            If Page.IsValid Then 
                Dim item As GridEditableItem = CType(e.Item, GridEditableItem)  
                Dim objSection As New Sections(item.GetDataKeyValue("ID"))  
                objSection.SectionName = CType(item.FindControl("txtSectionName"), TextBox).Text  
                objSection.Update()  
                e.Item.Edit = False 
            End If 
        ElseIf e.CommandName = "PerformInsert" Then 
            If Page.IsValid Then 
                Dim item As GridEditableItem = CType(e.Item, GridEditableItem)  
                Dim objSection As New Sections()  
                objSection.SectionName = CType(item.FindControl("txtSectionName"), TextBox).Text  
                objSection.LangID = Session("Language")  
                objSection.SiteID = Session("Site")  
                objSection.Insert()  
                e.Canceled = True 
                e.Item.OwnerTableView.IsItemInserted = False 
                e.Item.OwnerTableView.Rebind()  
            End If 
        ElseIf e.CommandName = "Delete" Then 
            Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)  
            Dim objSection As New Sections(item.GetDataKeyValue("ID"))  
            objSection.Delete()  
        End If 
    End Sub 

It's functioning well, but i want to be sure that my approach is correct, and there is no easier and better approach to do it.
To be more specific:
1. to get user inputs, i have to use FindControl function right? 

2. to close the popup after success update i have to use
e.Item.Edit = False 

which don't work on insert so after success insert i use 
                e.Canceled = True    
                e.Item.OwnerTableView.IsItemInserted = False    
                e.Item.OwnerTableView.Rebind()    

3. on insert and update i need to use 
Dim item As GridEditableItem = CType(e.Item, GridEditableItem)   

but on delete i use
Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)  


Wht do u think? am i getting it right?
thnx in advance
robertw102
Top achievements
Rank 1
 answered on 22 Feb 2010
3 answers
92 views
hi my dear friends:
i ajaxified my RadGrid like this :
                            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> 
                                <AjaxSettings> 
                                    <telerik:AjaxSetting AjaxControlID="grdPersonel"> 
                                        <UpdatedControls> 
                                            <telerik:AjaxUpdatedControl ControlID="grdPersonel"  
                                                LoadingPanelID="RadAjaxLoadingPanel1" /> 
                                        </UpdatedControls> 
                                    </telerik:AjaxSetting> 
                                </AjaxSettings> 
                            </telerik:RadAjaxManager> 
                            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> 

i am controling Radgrid AddNewRecord By Myself like this :
        protected void grdPersonel_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
        { 
            switch (e.CommandName) 
            { 
                case RadGrid.InitInsertCommandName: 
                    { 
                        e.Canceled = true; 
                        hfEditMode.Value = "Insert"; 
                        ResetForm(); 
                        mvPersonel.SetActiveView(vwPersonelEdit); 
                        break; 
                    } 
            } 
        } 
 

i have some views in my multyview (mvPersonel):
View1 (vwForGird)-> my grid is here.
View2 (vwPersonelEdit)-> I have A table here (with some textboxes and some lables and a save button)for add a new record in grid.
when u press addnewrecord in grid so i reset all of the textboxes in View2 (vwPersonelEdit) and jump to it.
that upper code was working prefectly until i ajaxified my radgrid like upper code.
when i press addnewrecord i recieve this error :

Line: 6
Error: Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object.

i really really wondering how can i solve this problem ?
how can i force addnewrecord in radgrid to postback after click on it not callback...








Majid Darab
Top achievements
Rank 1
 answered on 22 Feb 2010
2 answers
115 views
HI!
I want to get the values of RadSlider range in client side (on onClientValuechanged) and to set this values to simple input text fields.
How is possible to do this crossbrowser?
Tsvetie
Telerik team
 answered on 22 Feb 2010
4 answers
95 views
I am having a problem posting back in ie7 when a row is selected from a grid.  I am using the following code:

<

 

telerik:RadGrid ID="grdDropBox" runat="server" AutoGenerateColumns="False"

 

 

GridLines="None" onselectedindexchanged="grdDropBox_SelectedIndexChanged"

 

 

Skin="Office2007" Width="827px"

 

 

ondeletecommand="grdDropBox_DeleteCommand" AllowAutomaticDeletes="True"

 

 

DataSourceID="SqlDropBoxDS" AllowAutomaticUpdates="True"

 

 

onneeddatasource="grdDropBox_NeedDataSource">

 

 

<ValidationSettings EnableValidation="False" />

 

 

<MasterTableView datakeynames="Email,UploadedBy,UploadDate"

 

 

datasourceid="SqlDropBoxDS">

 

 

<Columns>

 

 

<telerik:GridButtonColumn CommandName="Select" HeaderText="Download"

 

 

Text="Download" UniqueName="SelectRow">

 

 

</telerik:GridButtonColumn>

 

 

<telerik:GridBoundColumn DataField="Email" HeaderText="Email"

 

 

UniqueName="Email" ReadOnly="True" SortExpression="Email">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="FileName" HeaderText="FileName"

 

 

UniqueName="FileName" SortExpression="FileName">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="FileType" HeaderText="FileType"

 

 

UniqueName="FileType" SortExpression="FileType">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="UploadedBy" HeaderText="UploadedBy"

 

 

UniqueName="UploadedBy" ReadOnly="True" SortExpression="UploadedBy">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="UploadDate" HeaderText="UploadDate"

 

 

UniqueName="UploadDate" DataType="System.DateTime" ReadOnly="True"

 

 

SortExpression="UploadDate">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="EmailNotify" HeaderText="EmailNotify"

 

 

UniqueName="EmailNotify" SortExpression="EmailNotify">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"

 

 

HeaderText="Delete" Text="Delete" UniqueName="DeleteColumn"

 

 

ConfirmText="Are you sure you want to delete this item?"

 

 

ConfirmTitle="Delete Confirmation">

 

 

</telerik:GridButtonColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<ClientSettings EnablePostBackOnRowClick="true" EnableRowHoverStyle="true">

 

 

</ClientSettings>

 

 

</telerik:RadGrid>

The strange part is this works fine in firefox, in VS development server, and on the same network as the Webserver.  It doesn't postback when outside of the network (Both the Download and Delete don't). Any ideas?

 

David Meier
Top achievements
Rank 1
 answered on 22 Feb 2010
1 answer
162 views
Hi Telerik-Support,

I use a RadContextmenu and set the skin to "default". Than I build up an menu with an submenu. On this submenu I use asp:Checkboxes in an item template.

My probelm is that the "default" style isn't inherit. If i hove over an root menu item it gets an gray colored background image. If i hove over an submenu template item nothing happens? Why and how can I solve this behavour?

Thanks a lot.
Christian
Schlurk
Top achievements
Rank 2
 answered on 22 Feb 2010
1 answer
79 views
How can you create two separate CommandItemTemplate on the grid, so that one can be on the top while the other at the bottom and they are function differently? For example, one use to clear all filters and the other one use to export to excel etc.

Thanks for the help.
Daniel
Telerik team
 answered on 22 Feb 2010
1 answer
94 views
I am using the heirchary model and have gotten my detail talbles to correctly display using the DetailTableData bind event.  My question is if the parent row doesnt have any children is it possible to not show the expand row icon to the left of the parent row?  Would I accomplish this in the itemdatabound event?

J
J
Top achievements
Rank 1
 answered on 22 Feb 2010
0 answers
95 views
Disregard, problem was with the coder.
Kip
Top achievements
Rank 1
 asked on 22 Feb 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?