Hi
I want to validate new records before they gets added to the grid at client-side. After I clear out the "name" field tag I get the red *. Which is perfectly fine and just what I want to do. However, when I click on "Add new record" button more than once, new empty record gets added without being validated.
What is the most clean and neat way to achieve this? Below is my code using a classic ASP coding style, so you get everything at one place.
01.<%@ Page Language="C#" %>02. 03.<!DOCTYPE html>04. 05.<html>06.<head runat="server">07. <title>[Title]</title>08. <script runat="server">09. protected override void OnInit(EventArgs e)10. {11. this.Load += HandleLoad;12. this.PreLoad += HandlePreLoad;13. 14. base.OnInit(e);15. }16. private void HandleLoad(object sender, EventArgs e)17. {18. this.grid.DataSource = new[] { new { Id = 1, Name = "Name" } };19. }20. private void HandlePreLoad(object sender, EventArgs e)21. {22. this.grid.MasterTableView.AutoGenerateColumns = false;23. this.grid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;24. this.grid.MasterTableView.EditMode = GridEditMode.Batch;25. }26. </script>27.</head>28.<body>29. <form id="form" runat="server">30. <asp:ScriptManager runat="server" />31. <div style="width: 25%">32. <telerik:RadGrid ID="grid" runat="server">33. <MasterTableView>34. <Columns>35. <telerik:GridTemplateColumn HeaderText="Name">36. <EditItemTemplate>37. <asp:TextBox ID="name" runat="server" />38. <asp:RequiredFieldValidator runat="server" ControlToValidate="name" Text="*" />39. </EditItemTemplate>40. <ItemTemplate>41. <%# Eval("Name") %>42. </ItemTemplate>43. </telerik:GridTemplateColumn>44. </Columns>45. </MasterTableView>46. </telerik:RadGrid>47. </div>48. </form>49.</body>50.</html>
Regrads,
Garmco ICT

Hi,
I have a scenario where in I have to insert data into
multiple tables using a single RadDataForm with EntityDataSource
Following are the three tables and Columns
ComType: Id, ConType
ContactDetail: Id, ContactName, City
ContactCom: Id, ContactDetailsId, ComTypeId, ComValue
The point is I am able to insert into single table but not
able to insert into multiple tables.
<asp:Label ID="ComValueLabel3"
runat="server" AssociatedControlID="ComValueTextBox"
CssClass="rdfLabel rdfBlock"
Text="ComValue"></asp:Label>
<telerik:RadTextBox ID="ComValueTextBox"
runat="server" RenderMode="Lightweight" Text='<%# Bind("ComValue")
%>' WrapperCssClass="rdfInput" />
Following is the syntax of calling other tables columns
while insertion
<asp:Label ID="ContactNameLabel2"
runat="server" AssociatedControlID="ContactNameTextBox"
CssClass="rdfLabel rdfBlock" Text="ContactName"></asp:Label>
<telerik:RadTextBox
ID="ContactNameTextBox" runat="server"
RenderMode="Lightweight" Text='<%#
Bind("ContactDetail.ContactName") %>'
WrapperCssClass="rdfInput" />
EntityDataSource Code:
<asp:EntityDataSource ID="EntityDataSource1"
runat="server" ConnectionString="name=sampleEntities"
DefaultContainerName="sampleEntities" EnableDelete="True"
EnableFlattening="False" EnableInsert="True"
EnableUpdate="True"
EntitySetName="ContactComs"
EntityTypeFilter="ContactCom"
Include="ContactDetail,ComType"></asp:EntityDataSource>
I am unable to call the columns of other tables which are in include method
Here I am attaching the sample DB and full code of my scenario
How can I accomplish this
Thanks In Advance
I'm finding difficulty getting enough information on the individual parts of controls and data in order to:
1) Select a single image to upload with RadAsyncUploader
2) Find the image path that is being uploaded
3) Display image from selected path using RadBinaryImage
How can I do this? Can it support Jpg, jpeg, gif, and png?
(Note: I need BinaryImage since data I get from my server can potentially provide a default image in binary array.)
when i build the RadSocialShare dynamically, the RadCompactButton does not work (dialog does not popup with items in the CompactButtons list
- working in ASP .net4.5
- No javascript erra's
- I can get to work if i build in markup as described in help documents
- does not work when building the radSocialShare control dynamically
<<< Suedo Code >>>
private RadSocialShare CreateRadSocialShareButtons()
{
RadSocialShare radSocialShare = new RadSocialShare();
myList = GetButtonList(); //get my list of social controls items
foreach (ListItem item in myList)
{ //check if button enabled for sharing
if (item.Enabled)
{ //start setting standard properties
RadSocialButton socialButton = new RadSocialButton();
socialButton.SocialNetType = (SocialNetType)Enum.Parse(typeof(SocialNetType), item.SocialNetType);
socialButton.CssClass = "SocialShareButtons";
socialButton.ToolTip = item.SocialSite; //display in tooltip (e.g. Facebook)
if (item.ShowInMain)
{ //display in main list
radSocialShare.MainButtons.Add(socialButton);
}
else
{ //display in compact list
radSocialShare.CompactButtons.Add(socialButton);
}
}
}
if (radSocialShare.CompactButtons.Count > 0)
{ //<!------THIS SHOWS UP ON PAGE, BUT DOES NOTHING--- !>
RadCompactButton radCompactBtn = new RadCompactButton();
radCompactBtn.ToolTip = "See More Social Share Types";
radSocialShare.MainButtons.Add(radCompactBtn);
}
return radSocialShare;
}
I have gone through many of the threads in relation to Error Creating Control in the designer, but none of the fixes are working.
I have C# .NET solution with Telerik .dlls in my bin folder, and referenced within the application and in the Solution Explorer. Also
I have removed them, re-added them, etc.
Here is the key here to my puzzle.........The application works on our OLD Production server where it was sitting. When I copy the entire
code folder over to the NEW Production server the telerik drop down lists do not populate onselectedindexchange. It just clears out
all of the data in all the drop downs. It's very odd and I cannot pin point what is going on.
Any help or suggestions outside of the basics I have done to get the application to work ? Do I have to install or run some script into the GAC of
the NEW Production Server ? If so, I have other application running that are working without that which have telerik DLLs in them.
I attached the Designer error from Visual Studio
I attached the HTML code showing the Rad Drop Down list
I attached the Main Page LIVE on the Production Server that doesn't work with propagation to the Vendor Drop Down. again, this works in OLD server, not in NEW....
Thanks in advance
Hello all,
I've done ta filter template for a column on my radgrid, i didn't have a problem on that, the problem now is the clear filter button that appears on the others columns doesn't exits, can anybody help ho can i show it again ??
