Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
292 views
Hi All,

I have a requirement:
Description : In a webpage there will be two telerik grids with name availableinputs and updatedinputs.
On page load the availableinputs grid will be loaded with records available in grid.and from this User will select some records by checking a check box respective to each row.Then user clicks on add Records button.the selected records will go and add to Updated Inputs grid.
Once the selected record is added to updated records grid ,same has to be removed from availableinputs grid.


After this if I need to remove the record from updatedinputs grid.user will click on remove button.and records will be removed

Problem :
First I will bind records to both the grids in Add buttton.its working fine.
after that when I try to check the count of items in updatedinputsgrid on remove button click event, its giving me zero even after I bind the value updatedinputs on Addbutton click.

I tried to rebind the grid with same datasource in Remove button click.
At that time count is showing 1,but the checkbox checked status is always false :(


why this is happening?how to solve the issue.

Thanks,
A2H

Iana Tsolova
Telerik team
 answered on 11 Apr 2011
3 answers
380 views
I have a RadGrid with Pager Template. The pager contains 4 asp buttons for next, previous, last and first functions also we have RadComboBox to set the pagesize, a RadNumeric TextBox for Current page index. The Pager template is defined in aspx page. My problem is i can't get this controls in server side ( in C# ). How can i get this pager template controls in  RadGrid from Server Side(C#).
also how can i handle the events of this pager template controls  from server side.
Princy
Top achievements
Rank 2
 answered on 11 Apr 2011
5 answers
97 views
I'm using the Web Forms RadGrid with an ORM tool that has attributes providing data constraints (required field and other validation rules) as part of its model. What I'm trying to do it come up with a general-purpose way to assign validators to either the in-place editing columns or the automatically generated edit/insert form.

This is a sample of the code I currently have. Based on other examples, I've put it in the pre-render event, but if there's a better event to use for this, I'd be happy to know it. The EntityProperty is the object that allows me to know all the constraints of my entity, which corresponds to a column in a data table. So I'm trying to retrieve the editable item from the RadGrid so I can create and associate the appropriate validator(s) to it based on the validation rules for my entity. How do I get to the editing control for the item in the grid that corresponds to the databound column?

protected void RadGrid1_PreRender(object sender, EventArgs e)
{
    if (!this.IsPostBack)
    {
        GridTableView tv = RadGrid1.MasterTableView;
        foreach (GridDataItem gdi in tv.Items)
        {
            // the spelunking isn't quite correct yet. Still working on it.
            EntityProperty ep = entityProps.
                    FirstOrDefault(x => x.Name == gdi.EditFormItem.DataItem.ToString());
            if (ep != null)
            {
                gdi.ID = gdi.ID;
            }
        }
        tv.Rebind();
    }
}

TIA for any tips that lead me in the right direction. I hope my request is clear.

Follow-up: I just found these posts related to Entity Framework 4 and MVC that talk about the same way I want to use model-driven validation. http://stackoverflow.com/questions/4915957/using-system-componentmodel-dataannotations-with-entity-framework-4-0/ and http://ryanhayes.net/blog/data-annotations-for-entity-framework-4-entities-as-an-mvc-model/.

If this isn't a common request, it should be. If it isn't a planned feature for Telerik, it should be.

Marin
Telerik team
 answered on 11 Apr 2011
1 answer
70 views
Hi there

I'm unable to close a RadWindow in FireFox using an HTML image with onclick="Close();".  It works fine in all other browsers.

This is the javascript that I have on the page that's opening in the RadWindow:

 

 

 

<script language="javascript" type="text/javascript">
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow)
                oWindow = window.RadWindow; //Will work in Moz in all cases, including clasic dialog       
            else if (window.frameElement.radWindow)
                oWindow = window.frameElement.radWindow; //IE (and Moz as well)       
            return oWindow;
        }
  
        function Close() {
            GetRadWindow().Close();
        }           
</script>

 

 

I close the Radwindow using this code:

<img alt="Close Window"  src="closebutton.jpg" onclick="javascript:Close();" style="cursor: pointer" />

As I said, this works fine in all browsers except for FireFox.  I get a java error GetRadWindow() is undefined when I click the Close button in FireFox.

Just for information sake, this is my RadWindowManager code on the content page:
<telerik:RadWindowManager Width="620px" Height="495px" ReloadOnShow="true" 
       ShowContentDuringLoad="false" AutoSize="true" VisibleTitlebar="False" 
       VisibleStatusbar="false" Modal="true" ID="RadWindowManager1" runat="server">
   </telerik:RadWindowManager>

I invoke the RadWindow from the content page like this:
<img src="site/interface/quote.jpg" style="cursor: pointer" onclick="radopen('quote.aspx?p=<%=productname%>');" />

I've tried everything, hope someone here can help!  I'm using 2010 Q3 controls for ASP.NET Ajax in VB.NET.
Shinu
Top achievements
Rank 2
 answered on 11 Apr 2011
1 answer
143 views
Let's use Grid / Hierarchy with templates demo as example and let's say that I want to add image on contact information tab for all users that are older than 30 on the server side in RadGrid1_ItemCreated event:
      protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
      {
         if (e.Item is GridNestedViewItem)
         {
            GridNestedViewItem gnvItem = (GridNestedViewItem)e.Item;
            e.Item.FindControl("InnerContainer").Visible = gnvItem.ParentItem.Expanded;
         }

How I would find the dob data to check if current item person is older than ... 30?

Thanks
Princy
Top achievements
Rank 2
 answered on 11 Apr 2011
5 answers
105 views
Hi Experts,

I have a radGrid on my aspx page with some input controls. 
In radGrid i have 2 columns one is GridEditCommandColumn for editing record and other is GridButtonColumn for deleting record. I also placed radAjaxPanel and radAjaxLoading panel. All input controls and grid resides under raAjaxPanel.
When I click edit button from grid it populates all the input controls and grid gets disappear. Similarly when i click delete button from grid it makes an ajax call like edit button does and disappears the grid.

Can anyone please help me out.

Thanks,
Mohsin
Shinu
Top achievements
Rank 2
 answered on 11 Apr 2011
1 answer
263 views

Hello,

I'm having an issue posting values from a child window RadTextBox to the parent window RadTextBox. I can successfully post the value if I use an <input> tag on the parent page but when I swap it for a <asp:TextBox> or <telerik:RadTextBox> the javascript breaks with error "Microsoft JScript runtime error: 'valCity' is null or not an object. Take a look at the code below:

Parent Page:

 

 

 

 

function openDialog()
{
radDialog1 = radopen("DataMigration_Dialog1.aspx", "RadWindow1");
}
<telerik:RadButton ID="rb_Migrate" runat="server" Width="150px" 
Text="Migrate Accounts" EnableEmbeddedSkins="false" BackColor="#33393E" 
ForeColor="White" OnClientClicked="openDialog" AutoPostBack="false">
   
</telerik:RadButton>
   
<br />
</asp:Panel>
   
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableEmbeddedSkins="false" >
   
<Windows>
   
<telerik:RadWindow ID="RadWindow1" runat="server" Height="450" Width="240" Behaviors="Close, Minimize, Maximize, Reload" Modal="true" >
   
</telerik:RadWindow>
   
</Windows>
   
</telerik:RadWindowManager>
   
<asp:TextBox ID="City1" runat="server" ></asp:TextBox>
   
<%--<input type="text" id="City" value="Hide" runat="server" />--%>
<asp:TextBox ID="ParentCity" runat="server" ></asp:TextBox>
   
<asp:TextBox ID="TimeZone" runat="server" ></asp:TextBox>
   
<asp:TextBox ID="DMSVendor" runat="server" ></asp:TextBox>
   
<asp:TextBox ID="DMSUsername" runat="server" ></asp:TextBox>

Child Page:

function submit()
        {
            valCity = parent.document.getElementById("City1");
  
valCity.value = document.getElementById("modalCity1").value;
  
self.close();
               }
City:
    <br />
        <telerik:RadTextBox ID="modalCity1" runat="server" EnableEmbeddedSkins="false" Width="200">
        </telerik:RadTextBox>
  
  
<telerik:RadButton ID="RadButton1" runat="server" Text="Submit" 
            EnableEmbeddedSkins="false" Skin="WebBlue" ButtonType="StandardButton" 
            BackColor="#CCCCCC" OnClientClicked="submit" >
        </telerik:RadButton>

 

 

Shinu
Top achievements
Rank 2
 answered on 11 Apr 2011
1 answer
87 views
What is the best/easiest way to center items on a menu?  I've tried writing css to do it, but it never seems to work.

Thanks.
Shinu
Top achievements
Rank 2
 answered on 11 Apr 2011
1 answer
213 views
Hello,

I am attempting to get multiple column headers for the asp.net ajax RadGrid. 

Example:
                                        [            total2        ]
[Sub 1]  [Sub 2]  [Sub 3]  [Sub 4 [   Sub 2     ]

such as :http://blogs.telerik.com/pavelpavlov/posts/09-12-04/adding_additional_power_to_radgridview_for_silverlight_with_attached_behaviors.aspx

The Sub columns will be the data binder and the filters, it just need a spanning column above that.

Do you have any suggestions about this ?

Best regards.
Thank you.
Princy
Top achievements
Rank 2
 answered on 11 Apr 2011
2 answers
89 views
Hello,

How do i get the cell value of a RADGRID in a Grid event
 
Appreciate the help...
Thanks
Shinu
Top achievements
Rank 2
 answered on 11 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?