Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
265 views
I am using RADGrid probably a little differnt than the typical - edit one item, update, save, repeat. I am using the RadGrid mainly because of its ability to maintain state on postback from the server.
I am having trouble looping through the grid from a OnCheckChange function/process.

So I have a Parent / Child Grid setup.  I do have more values assigned, but for simplicity I provided the sample above.  What I am doing is when the check box within the Parent or Child grid is selected I am running a routine - but I am having trouble looping through the vaules.  Below is what I am attempting.  Can someone assist with where I am missing?



Public Sub CheckBoxParent(ByVal sender As System.Object, ByVal e As System.EventArgs)
 
  
For Each item As GridDataItem In rParent.Items  
 
    Dim myCheckbox As CheckBox = DirectCast(item.FindControl("CheckBoxParent"), CheckBox)
 
    Dim hAttributeID As HiddenField = DirectCast(dataItem.FindControl("hAttributeID"), HiddenField)
 
 
  ' Child radGrid
   Dim dg As Telerik.Web.UI.RadGrid = item.FindControl("radChild")
 
        ' trying to Loop through each DataGridItem of the child grid
        For Each dgItem As GridDataItem In dg.Items
     
    Next
 
Next
 
End Sub
 
<telerik:RadGrid id="rParent" runat="server" AllowMultiRowSelection="True">
 <MasterTableView ShowHeader="true" AutoGenerateColumns="false">
<Columns>
<telerik:GridTemplateColumn>
<HeaderTemplate></HeaderTemplate>
<ItemTemplate>
    <asp:CheckBox id="CheckBoxParent" OnCheckedChanged="findScore"
AutoPostBack="True" runat="server"></asp:CheckBox>
    <%# DataBinder.Eval(Container.DataItem, "KeyID") %>
<asp:HiddenField ID="hAttributeID" runat="Server" Value='<%# DataBinder.Eval(Container.DataItem, "AttributeID") %>' />
 
    <telerik:RadGrid id="rChild" runat="server">
    <MasterTableView ShowHeader="false" AutoGenerateColumns="false">
    <Columns>
    <telerik:GridTemplateColumn>
    <ItemTemplate>
    <%# DataBinder.Eval(Container.DataItem, "Description") %>
    <%# DataBinder.Eval(Container.DataItem, "AttributeID") %>
 
    <asp:CheckBox id="CheckBoxChild" OnCheckedChanged="findScore"
AutoPostBack="True"  runat="server"></asp:CheckBox>
 
    </ItemTemplate>
   </telerik:GridTemplateColumn>
    </Columns>
    </MasterTableView>
   <ClientSettings EnableRowHoverStyle="false" EnablePostBackOnRowClick="true" />
    </telerik:RadGrid>
 
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>





 

 

 

 

 

 

 

 

Shinu
Top achievements
Rank 2
 answered on 14 Feb 2012
0 answers
226 views

Hi all,

i am facing problem to closing clorbox when record is successfully inserted, my scenerio is follows

i am currently working on web application and using asp.net, c# and jquery languages, i have designed registration form and open into iframe so i have palced all input fields which is required in registration process like username, email, password etc. it is working fine when i am clicking on user registration anchor than register.aspx page is open in lightbox or popup window but light box not closed when user is successfully inserted. so how can i close it on successfully record insertion rather than cliking on close button.

i have also tried to close write this line $.colorbox.close(); on register.aspx page on submit click but it is not working ..

kindly helpout me.

i have written following code to open light box  and this is URL which i have implement in my project

URL:::::  http://jacklmoore.com/colorbox/

<asp:Content ID="Content2" ContentPlaceHolderID="cph_body" runat="server">    <link href="../Styles/colorbox.css" rel="stylesheet" type="text/css" />    <script src="../Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>    <script src="../Scripts/jquery.colorbox.js" type="text/javascript"></script>        <div class="content-body">                                <div style="padding-bottom: 10px;">                            <a class='UserRegistration' href="Register.aspx" title="User Registration"><span>                               New User Registred Here</span></a>                        </div>                               </div>    </div>        <script type="text/javascript">        jQuery(document).ready(function () {            jQuery(".UserRegistration").colorbox({ iframe: true, width: "580", height: "480", onClosed: function () { location.reload(true); } });            jQuery("#cboxClose").click(function () {                location.reload();            });        });        function CloseColorBox() {            $.colorbox.close();            location.reload();        }    </script></asp:Content>

kd
Top achievements
Rank 1
 asked on 14 Feb 2012
1 answer
128 views
Hi Telerik Team!

I want to show image in RadTreeList from Database that store in bytes form, like we do have GridBinaryImageColumn in RadGrid.
Shinu
Top achievements
Rank 2
 answered on 14 Feb 2012
1 answer
423 views
i have a grid and iam doing sum on the footer for the column but the word "sum" is also showing with the actual integer sum, how do i remove that
Princy
Top achievements
Rank 2
 answered on 14 Feb 2012
3 answers
222 views
Hi All,

I have a tabstrip with 5 tabs 
I need validation group for every single TABs.
I want to acheive the below result

When i click on the second tab, only the FIRST tab needs to be validated
When i click on the third tab, only the SECOND tab needs to be validated and so on.

and  If i'm in second tab, and clicked the FIRST tab, i dont want to consider whether SECOND tab is validated or not, i just want to move to FIRST tab

Help me out of this guys

Manivannan
Top achievements
Rank 1
 answered on 14 Feb 2012
4 answers
680 views
Hi

As per this old thread for winforms controls (http://www.telerik.com/community/forums/winforms/combobox/alignment-of-wide-text-in-radcombobox.aspx) I need to left-align the text in a combobox, rather than right-align, after it is selected.

I have this code which works for ie9, but unfortunately I need it to also work for ie7 (o I hate u ie7 so much)
<telerik:RadComboBox ID="RadComboBox1" runat="server"
   Width="150px" DropDownWidth="300px"
   OnClientSelectedIndexChanged="AlignLeftAfterSelectedIndexChange">
</telerik:RadComboBox>
 
function AlignLeftAfterSelectedIndexChange(sender) {
    var input = sender.get_inputDomElement();
    input.setSelectionRange(0, 0);
}

Is there a more Telerik-friendly way to do it?

Cheers
Jeremy
Top achievements
Rank 1
 answered on 14 Feb 2012
1 answer
112 views
I have a RADTreeView that I build programmatically.

The same RADTreeView has ContextMenus built during design time. I've attached the script below on the RADTreeview's OnClientContextMenuShowing as below. The issue I have is that this only works for the nodes that have "isApproved" attributes. If right-click anywhere else in the RADTreeView, I get an error that says "Unable to get value of the property 'get_id': object is null or undefined".

My concept is that the get_id method shouldn't be called unless the context menu id is what I have stated below. It seems to be getting called not matter what. Your help is appreciated.

<telerik:RadTreeView ID="RadTreeView1" runat="server" OnClientContextMenuShowing="ClientContextMenuShowing">

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
       <script type="text/javascript" language="javascript">
 
           function ClientContextMenuShowing(sender, eventArgs) {
               var node = eventArgs.get_node();
               var menu = eventArgs.get_menu();
               var domEvent = eventArgs.get_domEvent();
 
               /* Change value of context menu based on whether an item is approved or not is Consent
               Agenda */
               if (menu.get_id() == "ctl00_ContentPlaceHolder1_RadTreeView1_cmOtherApprovalsAgenda") {
                   var attributes = node.get_attributes();
                   attributes.getAttribute("isApproved");
                   if (attributes.getAttribute("isApproved") == "Yes") {
                       menu.findItemByValue("cmOtherApprovalsAgendaApproveAB").set_text("UnApprove Agenda Bill");
                   }
                   else {
                       menu.findItemByValue("cmOtherApprovalsAgendaApproveAB").set_text("Approve Agenda Bill");
                   }
               }
           }       
       </script>
   </telerik:RadCodeBlock>

PJ Rodriguez
Top achievements
Rank 1
 answered on 13 Feb 2012
1 answer
167 views
Hi,

I have a radgrid with filtering by column set to true and all columns have 'Show Filter Icon' set to false. One of the gridbound columns is of data type Datetime and the dates are displayed in the format  29 Jan (DataFormatString="{0:dd MMM}"). Is it possible to filter this column using 'contains' functionality ie when the user types 29 or Jan and press enter, it should filter all records with the date 29 or all records with a date in Jan?

If such custom filtering is possible, will it still work with filters on other columns?

Thanks.

Pavlina
Telerik team
 answered on 13 Feb 2012
1 answer
129 views
Hi,

I am using RadGrid control with ajax settings. and i have used jquery to display tooltip for specific columns in grid. on changing the page i not getting the tooltip for that column. only on pageload it was invkoing. on postback it not calling javascipt pageload function. i have call pageload javascript function on post back also.
please help.

thanks in advance,
swarna
Richard
Top achievements
Rank 1
 answered on 13 Feb 2012
2 answers
176 views

Had a few reports from customers that the upload control was not properly displayed. Only a small box was displayed on the screen - no browse button, and nothing happened when clicking.

I was able to reproduce the problem in IE8 compatibility mode (presumably, this would also happen in IE7 and in IE9  compatibility mode).

The span wrapper around the file input box was set to overflow:hidden, which chopped off the control display, leaving just a little bit peeking out.

I added the following to my page to fix the problem:

<style type="text/css">
.RadUpload .ruFileWrap {
    overflow:visible !important;
}
</style>

 

Since the overflow style in the telerik upload.css file is "!important", I could not find a way to fix the overflow globally - I need to add the above style to every page where the control is used. Is there a better way to do this?

MBEN
Top achievements
Rank 2
Veteran
 answered on 13 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?