Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
102 views
hi
excuse for my english "am french"

I test your telerik datagrid with usercontrol insert/update/delete exemple
and all work well with simple word
but  when i trie to update a value with ' quote  ex: l'organisation it impossible to send this value.
i think it a concatenation problem

my code

usercontrol.ascx :

 

 

<asp:TextBox ID="AssoPresident" runat="server" Width="260px" Text='<%# DataBinder.Eval( Container, "DataItem.AssoPresident" ) %>'></asp:TextBox> 
 
 
 

default.aspx (code behind) :

 

 

 

Protected Sub RadGrid1_UpdateCommand(ByVal source As Object, ByVal e As GridCommandEventArgs) Handles RadGrid1.UpdateCommand  
        Dim editedItem As GridEditableItem = TryCast(e.Item, GridEditableItem)  
        Dim MyUserControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl)  
        'Get the primary key value using the DataKeyValue.       
        Dim AssoID As String = editedItem.OwnerTableView.DataKeyValues(editedItem.ItemIndex)("AssoID").ToString()  
        'Access the textbox from the edit form template and store the values in string variables.       
        'Dim AssoNom As String = (TryCast(editedItem.FindControl("RadTextNom"), RadTextBox)).Text  
        Dim AssoPresident As String = CType(MyUserControl.FindControl("AssoPresident"), TextBox).Text  
        'Dim PetitDescriptif As String = CType(userControl.FindControl("PetitDescriptif"), TextBox).Text  
        Try 
            'Open the SqlConnection       
            SqlConnection.Open()  
            'Update Query to update the Datatable        
            Dim updateQuery As String = "UPDATE association set AssoPresident='" & AssoPresident & "' where AssoID='" & AssoID & "'" 
            SqlCommand.CommandText = updateQuery  
            SqlCommand.Connection = SqlConnection  
            SqlCommand.ExecuteNonQuery()  
            'Close the SqlConnection       
 
 
            SqlConnection.Close()  
        Catch ex As Exception  
            RadGrid1.Controls.Add(New LiteralControl("Unable to update Customers. Reason: " + ex.Message))  
            e.Canceled = True 
        End Try 
    End Sub 

 

 



can you help me I don't see where is the error.




 

Georgi Krustev
Telerik team
 answered on 01 Jun 2009
5 answers
186 views
Hi,

I have a grid which displays No Records text when no record exists for the grid. It works fine.
But for certain conditions, i dont want to display that message at all. I was successfull in that as well by using as below

Grid1.MasterTableView.NoMasterRecordsText =

"";
But i can see the row line displayed in this case. How can i avoid the row lines being displayed in the grid when that conditions occurs.

Regards

Sujith

 

Karen
Top achievements
Rank 1
 answered on 01 Jun 2009
2 answers
118 views
I have a PanelBar that has many controls embedded into the templates.  I'm having trouble getting to the databound events of the templated controls.

As an example, I have the following Panel Bar item with a treeview that has an onNodeDataBoundEvent
<telerik:RadPanelBar ID="RadPanelBar1" runat="server">  
    <Items> 
        <telerik:RadPanelItem runat="server" Text="OUTPUT COLUMNS">  
            <Items> 
                <telerik:RadPanelItem Value="OutputColumns" runat="server">  
                    <ItemTemplate> 
                        <telerik:RadTreeView ID="OutputColumnsRadTreeView" runat="server" CheckBoxes="True" 
                            Height="280px" TriStateCheckBoxes="True" CheckChildNodes="True" Skin="Vista" OnNodeDataBound="OutputColumnsRadTreeView_NodeDataBound">  
                        </telerik:RadTreeView> 
                    </ItemTemplate> 
                </telerik:RadPanelItem> 
            </Items> 
        </telerik:RadPanelItem> 
    </Items> 
</telerik:RadPanelBar> 

However, when I bind:
 protected void Page_Load(object sender, EventArgs e)  
 {  
        RadTreeView OutputColumnsRadTreeView = (RadTreeView)QueryPanelBar.FindItemByValue("OutputColumns").FindControl("OutputColumnsRadTreeView")  
 
        OutputColumnsRadTreeView.LoadContentFile("~/App_Data/QueryOutputColumns.xml");  
        OutputColumnsRadTreeView.DataBind();  
} 

The event is never fired:
protected void SortColumnsRadTreeView_NodeDataBound(object sender, RadTreeNodeEventArgs e)  
{  
        //do something here  
} 

thanks in advance.
Gene.
Yana
Telerik team
 answered on 01 Jun 2009
1 answer
87 views
When in Chrome if you place a table into the editor, then try to select it to manually resize, you are unable to do so.  NOTE - right click + properties does still work.  We have a couple of questions on this;

1.  Is this normal browser behavior for Chrome?
2.  Has anyone else run into this issue?

If this is a duplicate post, i apoligize, i searched the forums for this topic and was unable to locate a thread on it.  Any help would be greatly appreciated.
Tervel
Telerik team
 answered on 01 Jun 2009
10 answers
162 views
We are working with the Schedule control in our MVC project as a Service and need to do some AppointmentTemplate work.  Does this work?  Where would you put the AppointmentTemplate definition for the service to be able to use it?
T. Tsonev
Telerik team
 answered on 01 Jun 2009
10 answers
246 views
Good morning,

I'am a TabStrip inside of other TabStrip both with Usercontrols

I would like to know how I can advance to the following  Tab of the "external" TabStrip from the "internal" TabStrip.

Thanks for your help
Regards
Alex Lawson
Top achievements
Rank 1
 answered on 01 Jun 2009
1 answer
198 views
HI,

i want to show radtooltip on targetcontrol id focus and radtooltip get hide on targetcontrolid lost focus.
but its getting hide after some duration of time.

please reply soon
Princy
Top achievements
Rank 2
 answered on 01 Jun 2009
1 answer
122 views
The only way to apply styles to Telerik components is by using Skins. We cannot directly apply a CSS to it. Creating skins takes a lot of effort [ 3 times the CSS effort ].  Is there an easier way of applying styles to the Telerik components, perhaps using CSS's directly?
Sebastian
Telerik team
 answered on 01 Jun 2009
1 answer
158 views
how do i force the drop down menu to always drop underneath the combo box.  sometimes if the combo box is so far down a page, the menu will drop above the combo

also, how do I change the z index, sometimes the drop down is appearing behind images on a page (I assume its a z-index probelm)
The default value is set to 6000, what does this mean ?
Paul
Telerik team
 answered on 01 Jun 2009
1 answer
190 views
Hey,

I have very recently started to use RAD Controls. I have been trying to implement the RADScheduler control since the past week. After overcoming a variety of errors, I've been stuck on this particular error for the past 2 days. I'm pasting the code where this error is coming.

private

 

IEnumerable<Resource> GetTeachers()

 

{

 

List<Resource> resources = new List<Resource>();

 

 

using (DbConnection conn = OpenConnection())

 

{

 

DbCommand cmd = DbFactory.CreateCommand();

 

cmd.Connection = conn;

cmd.CommandText =

"SELECT [TeacherID], [Name], [Phone] FROM [DbProvider_Teachers]";

 

 

using (DbDataReader reader = cmd.ExecuteReader())

 

{

 

while (reader.Read())

 

{

 

Resource res = new Resource();

 

res.Type =

"Teacher";

 

res.Key = reader[

"TeacherID"];

 

res.Text =

Convert.ToString(reader["Name"]);

 

res.Attributes[

"Phone"] = Convert.ToString(reader["Phone"]);

 

resources.Add(res);

}

}

}

 

return resources;

 

}

The error disappears when I comment and run the program but obviously i am not able to use this functionality then. Please help asap.

Thank you,

Manan Podar

Atanas Korchev
Telerik team
 answered on 01 Jun 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?