Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
93 views
How can i access checkbox in toolbar button click?
aspx:
<telerik:RadToolBar ID="RadTool" runat="server" AutoPostBack="true" onbuttonclick="RadTool_ButtonClick" >
 <Items>
    <telerik:RadToolBarButton runat="server" Text="Edit"></telerik:RadToolBarButton>
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" />
</ItemTemplate>
</telerik:RadToolBarButton>
</Items>
</telerik:RadToolBar>
Princy
Top achievements
Rank 2
 answered on 14 Feb 2012
2 answers
202 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
187 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
105 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
393 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
192 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
625 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
74 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
147 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
93 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?