Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
270 views
I have a number of areas in my application where I have divs containing a radtextbox or radcombobox. In IE 8 and Firefox everything seems to be fine, visually. If I run the application in IE compatibility mode (which for some reason is what my IIS 7 server is seeming to run the application as, visually) I always get a 1 pixel margin on top of each text box and below each textbox. I end up having all of these boxes appear smashed together and it's really frustrating. I believe its an inherit nature of textboxes in general in IE, and I am looking to acheive a consistent behavior regardless of combobox or textbox and regardless of browser. Any suggestions on this?

Thanks in advance!
Dimo
Telerik team
 answered on 29 Sep 2010
1 answer
148 views
Hello Everyone,

I tried the code in Retain expanded/selected state in hierarchy on rebind to save the state of grid as expanded/collapse. But I have another problem, every time I click on edit command item in detail 3 the other command item for detail 2 and master table also changes. Same goes to detail 2, every time i click on edit command item in detail 2 the command item master table also changes.

Please see the attached screenshots Before and After clicking the edit command item.

Below is my C# code for customizing the visibility of command items.
protected void gridCPDiag_ItemDataBound(object sender, Telerik.WebControls.GridItemEventArgs e)
        {
            if (e.Item is GridCommandItem && e.Item.OwnerTableView.Name == "Detail2")
            {
                GridCommandItem visitcommandItem = (GridCommandItem)e.Item;
                LinkButton visitbtnAdd = (LinkButton)visitcommandItem.FindControl("det2_btnAdd");
                LinkButton visitlnkPerformInsert = (LinkButton)visitcommandItem.FindControl("det2_lnkPerformInsert");
                LinkButton visitbtnEditSelected = (LinkButton)visitcommandItem.FindControl("det2_btnEditSelected");
                LinkButton visitbtnUpdateEdited = (LinkButton)visitcommandItem.FindControl("det2_btnUpdateEdited");
                LinkButton visitbtnCancel = (LinkButton)visitcommandItem.FindControl("det2_btnCancel");
                LinkButton visitbtnDelete = (LinkButton)visitcommandItem.FindControl("det2_btnDelete");
 
 
                if (hdnCommandName.Value == "det2_initinsert" || hdnCommandName.Value == "det2_editselected")
                {
                    visitbtnAdd.Visible = false;
                    visitbtnEditSelected.Visible = false;
                    visitbtnDelete.Visible = false;                   
                    visitbtnCancel.Visible = true;
                }
 
                if (hdnCommandName.Value == "det2_initinsert")
                {
                    visitlnkPerformInsert.Visible = true;
                }
                if (hdnCommandName.Value == "det2_editselected")
                {
                    visitbtnUpdateEdited.Visible = true;
                     
                }
 
                if (hdnCommandName.Value == "det2_performinsert" || hdnCommandName.Value == "det2_update" || hdnCommandName.Value == "det2_cancelall")
                {
                    visitbtnAdd.Visible = true;
                    visitbtnEditSelected.Visible = true;
                    visitbtnDelete.Visible = true;
                    visitlnkPerformInsert.Visible = false;
                    visitbtnUpdateEdited.Visible = false;
                    visitbtnCancel.Visible = false;
                }
 
            }
 
            if (e.Item is GridCommandItem && e.Item.OwnerTableView.Name == "Detail3")
            {
                GridCommandItem inscommandItem = (GridCommandItem)e.Item;
                LinkButton insbtnAdd = (LinkButton)inscommandItem.FindControl("det3_btnAdd");
                LinkButton inslnkPerformInsert = (LinkButton)inscommandItem.FindControl("det3_lnkPerformInsert");
                LinkButton insbtnEditSelected = (LinkButton)inscommandItem.FindControl("det3_btnEditSelected");
                LinkButton insbtnUpdateEdited = (LinkButton)inscommandItem.FindControl("det3_btnUpdateEdited");
                LinkButton insbtnCancel = (LinkButton)inscommandItem.FindControl("det3_btnCancel");
                LinkButton insbtnDelete = (LinkButton)inscommandItem.FindControl("det3_btnDelete");
 
 
                if (hdnCommandName.Value == "det3_initinsert" || hdnCommandName.Value == "det3_editselected")
                {
                    insbtnAdd.Visible = false;
                    insbtnEditSelected.Visible = false;
                    insbtnDelete.Visible = false;
                    insbtnCancel.Visible = true;
                }
 
                if (hdnCommandName.Value == "det3_initinsert")
                {
                    inslnkPerformInsert.Visible = true;
                }
                if (hdnCommandName.Value == "det3_editselected")
                {
                    insbtnUpdateEdited.Visible = true;
 
                }
 
                if (hdnCommandName.Value == "det3_performinsert" || hdnCommandName.Value == "det3_update" || hdnCommandName.Value == "det3_cancelall")
                {
                    insbtnAdd.Visible = true;
                    insbtnEditSelected.Visible = true;
                    insbtnDelete.Visible = true;
                    inslnkPerformInsert.Visible = false;
                    insbtnCancel.Visible = false;
                }
            }
        }

Please help. I would really appreciate for any response.

Thanks!
Zel
zel
Top achievements
Rank 1
 answered on 29 Sep 2010
1 answer
189 views
Hi there,

We're trying to use the RadBinaryImage control to handle the onmouseover and onmouseout events, but are in a bit of a loss in how to do so.

We have two binary images (from the database) and we want the following to occur:
  • The first one to appear as the page loads,
  • When the users hovers over it with the mouse, we want the second image to appear in the place of the first image,
  • When the second image loses focus from the mouse it should revert back to the original image.

Is there a way to achieve this without having to write the binary image to a directory beforehand?

Thanks,

Daniel
Daniel Cheney
Top achievements
Rank 1
 answered on 29 Sep 2010
2 answers
98 views
I learn that the paging method about rad.grid is load all the data to memory, so we found that just 100 thousands rows records slow server very much.we major in ERP system, and the database records often reach 10 millions and more. so the paging way provide by rad.grid will not adapt to the requirement. Does rad.grid provide the way which get just records of one page one time? It is, we can use the paging way provided by database such as ROW_NUMBER in sql server 2005. so the grid will load only one page records from the server and will not load all the records to dataset at first.
Robert Lou
Top achievements
Rank 1
 answered on 29 Sep 2010
3 answers
114 views
Hi everyone,

I am using Rad Controls v 2010.2.713.40 and have come across an issue I cannot seem to fix...I have a radAjaxPanel on a page with a radAjaxLoadingPanel and a RadScript block but when I come to validate the page I get the following error:

   1.   Error  Line 179, Column 29: character "$" is not allowed in the value of attribute "id"
              <div id="ctl07_ctl07$rapPanel">
      It is possible that you violated the naming convention for this attribute. For example, id and name attributes must begin with a letter, not a digit.


Here is a copy of the page that it is compaining about:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="enquiry.ascx.cs" Inherits="Promat.lang.co.uk.enquiry" %>
<telerik:RadAjaxPanel ID="rap" runat="server" Width="100%" OnAjaxRequest="rap_AjaxRequest"
    LoadingPanelID="ralp">
    <div id="enquiryWrapper">
        <div id="detailsDiv">
            <h2>
                Your Details</h2>
            <h3>
                Name:</h3>
            <p>
                <asp:TextBox ID="NameBx" runat="server"></asp:TextBox></p>
            <h3>
                Telephone:</h3>
            <p>
                <asp:TextBox ID="TelBx" runat="server"></asp:TextBox></p>
            <h3>
                Email:</h3>
            <p>
                <asp:TextBox ID="EmailBx" runat="server"></asp:TextBox></p>
        </div>
        <div id="requestDiv">
            <h2>
                Nature of your enquiry</h2>
            <textarea id="EnqTxtBx" cols="40" rows="10"></textarea>
        </div>
        <div id="submitDiv">
            <h2>
                Submit your request</h2>
            <img id="sendBtn" src="../../themes/buttons/SendBtn.png" class="clickable prodbtn"
                alt="Send" title="Submit your Enquiry" onclick="SendEnquiry()" onmouseover="javascript:this.src='../../themes/buttons/sendBtn-on.png'"
                onmouseout="javascript:this.src='./themes/buttons/sendBtn.png'" />
            <img id="cancelBtn" src="../../themes/buttons/CancelBtn.png" class="clickable prodbtn"
                alt="Cancel" title="Cancel" onclick="SlideOut(0,'top','OUT')" onmouseover="javascript:this.src='../../themes/buttons/cancelBtn-on.png'"
                onmouseout="javascript:this.src='../../themes/buttons/cancelBtn.png'" />
            <div id="EnqMessageDiv" runat="server" style="display: none;">
                <img src="../../themes/cross.png" alt="result" runat="server" id="MessageImg" style="width: 16px;
                    height: 16px;" />
                <asp:Label runat="server" ID="MessageLbl"></asp:Label>
            </div>
        </div>
    </div>
    <div id="thankyouWrapper">
        <asp:Label CssClass="brandText3_large" runat="server" ID="thanksLbl">Thankyou for your request, a member of our team will get back to you soon</asp:Label></div>
</telerik:RadAjaxPanel>
<telerik:RadScriptBlock ID="rsb" runat="server">
    <script type="text/javascript">
        function SendEnquiry()
        {
            var oAjax = <%= rap.ClientID %>;
            var txtBx = document.getElementById("EnqTxtBx");
            var EnqTxt = txtBx.value;
            oAjax.ajaxRequest("Enq|"+EnqTxt+"|");
            //slide(0,'top','OUT','1');
        }
    </script>
</telerik:RadScriptBlock>
<telerik:RadAjaxLoadingPanel ID="ralp" Runat="server" Skin="Default" Transparency="50">
</telerik:RadAjaxLoadingPanel>

As you can see, the id I have given it is rap but when the page loads the server side id has a $ inserted into it.  This doesn't happen with the other rad controls on this page nor does it happen in other projects we have to the rad ajax panels?

If you view source on one of our other projects (which has the same page but done on a different version [2009.2.701.35]) you can see it has been rendered like below:
<div id="ctl05_ctl05_RadAjaxPanel1Panel">
    <div id="ctl05_RadAjaxPanel1" style="width:100%;">

On this page I am having an issue with, the server control is rendered like:
<div id="ctl07_ctl07$rapPanel">
    <div id="ctl07_rap" style="width:100%;">

Any help is much appreciated...

Thanks,

M


Dimo
Telerik team
 answered on 29 Sep 2010
1 answer
308 views
I have a radgrid with the following definition
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="True"
            AllowMultiRowEdit="True"
            GridLines="None" Skin="Web20" OnPreRender="RadGrid1_PreRender"
            OnItemCommand="RadGrid1_ItemCommand"
            OnCreateColumnEditor="RadGrid1_CreateColumnEditor"

            >
        <MasterTableView EditMode="InPlace" CommandItemDisplay="Bottom">
            <RowIndicatorColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>

            <ExpandCollapseColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn ConvertEmptyStringToNull="False" DataField="Name"
                    HeaderText="Name Column" MaxLength="50" ReadOnly="True" UniqueName="NameColumn">
                </telerik:GridBoundColumn>
            </Columns>
            <CommandItemTemplate>
                <asp:Button runat="server" Text="Save All" ID="SaveButton" visible="true" CommandName="UpdateAll" />
            </CommandItemTemplate>
        </MasterTableView>
        </telerik:RadGrid>


Most of the columns come from a databound source.  I need to add an additional row where there is a single checkbox for each column. For example (forgive the ascii art):
--------------------------------------------------------------------------
|Name Column |Col 1              | Col 2             | Col 3             |
--------------------------------------------------------------------------
|Some Name    | <drop down> | <drop down> | <drop down>|
--------------------------------------------------------------------------
|Another Name | <drop down> | <drop down> |<drop down> |
--------------------------------------------------------------------------
| Check These | <checkbox>   | <checkbox>   | <checkbox> |
--------------------------------------------------------------------------
|<submit button>                                                                  |
--------------------------------------------------------------------------

I have it creating all of the drop down lists in the CreateColumnEditor event. Also, all of the rows (except the checkbox one) come from the datasource.

How can I add footer row that contains those checkboxes?
Shinu
Top achievements
Rank 2
 answered on 29 Sep 2010
4 answers
121 views
Hi,

I'm using the radGrid with the Linq datasource to load 10 000 rows with paging.
This really works perfect because in 1 sec the whole page is loaded.

But because my website is in 2 language and there are too many filter options I want to change those options with the codebehind.
But when I tried this solution : http://www.telerik.com/help/aspnet-ajax/grdreducingfiltermenuoptions.html the whole datagrid need more than 5 sec to load which is not acceptable, is there any solution to change this?

protected void RadGrid1_Init(object sender, System.EventArgs e)
{
 GridFilterMenu menu = RadGrid1.FilterMenu;
 int i = 0;
 while(i < menu.Items.Count)
 {
   if(menu.Items[i].Text == "NoFilter" ||
      menu.Items[i].Text == "Contains" ||
      menu.Items[i].Text == "EqualTo" ||
      menu.Items[i].Text == "GreaterThan" ||
      menu.Items[i].Text == "LessThan")
   {
     i++;
   }
   else
   {
     menu.Items.RemoveAt(i);
   }
 }
}

Thnx you!
Kevin
Shinu
Top achievements
Rank 2
 answered on 29 Sep 2010
1 answer
679 views
Team,

In my application am generating Datatable at runtime. Then directly binding this Datatable to Radgrid.
My need is I want to apply sorting through code behind on the Dynamically generated columns.
Pls. help on this.

Markup is as below:

<

 

telerik:RadGrid ID="MainGrid2" runat="server" ShowHeader = "true"

 

 

GridLines="Both" OnPreRender="AnswerGenMainGrid1_PreRender" Skin="none"

 

 

OnItemDataBound="MainGrid2_ItemDataBound" EnableEmbeddedSkins = "false" OnItemCreated = "MainGrid2_ItemCreated" >

 

 

 

 

 

</telerik:RadGrid>

Thanks in Advance
r

 

Princy
Top achievements
Rank 2
 answered on 29 Sep 2010
2 answers
152 views
Hi Everyone,

I have a problem in editing multiple rows inside detail table. I don't know how to check if row is selected and get the value of edited row.

The hierarchy of my grid is :
<mastertable>
<detail table 2>
<detail table 3>
</detail table 3>
<detail table 2>
</master table>

Requirement:
-detail table 2 allows to edit/delete multiple rows

ASPX:
<DetailTables>
                    <rad:GridTableView Name="Detail2"  DataKeyNames="cp_id" DataMember="visit"  CommandItemDisplay="Top" EditMode="InPlace" Width="100%">
                    <CommandItemTemplate>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td style="width:60%">
                                    <div style="padding:3px 4px 3px 4px">
                                        <table border="0" cellpadding="1" cellspacing="1">
                                            <tr style="font: normal 11px tahoma, Verdana, Helvetica, Sans-serif;vertical-align:middle">
                                                <td>
                                                    <div class="toolbarIconDivider">|</div>
                                                </td>
                                                <td>
                                                    <asp:LinkButton ID="btnAdd" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="InitInsert"><img style="border:0px" alt="" src="../images/addemail.gif" /> Add</asp:LinkButton>
                                                    <asp:LinkButton ID="lnkPerformInsert" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="PerformInsert" Visible="false"><img style="border:0px" alt="" src="../images/save.gif" /> Save</asp:LinkButton>
                                                </td>
                                                <td>
                                                    <div class="toolbarIconDivider">|</div>
                                                </td>
                                                <td>
                                                    <asp:LinkButton ID="btnEditSelected"  CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="EditSelected" ><img style="border:0px" alt="" src="../images/edit.gif" /> Edit</asp:LinkButton>
                                                    <asp:LinkButton ID="btnUpdateEdited" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="Update" Visible="false"><img style="border:0px" alt="" src="../images/save.gif" /> Save</asp:LinkButton>
                                                    <asp:LinkButton ID="btnCancel" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="CancelAll"  Visible="false" CausesValidation="false"><img style="border:0px" alt="" src="../images/cancel.gif" /> Cancel</asp:LinkButton>
                                                </td>
                                                <td>
                                                    <div class="toolbarIconDivider">|</div>
                                                </td>
                                                <td>
                                                    <asp:LinkButton ID="btnDelete" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="Delete"  OnClientClick="javascript:return confirm('Are you sure you want to delete this Clinical Pathway Instruction?')" ><img style="border:0px" alt="" src="../images/delete.gif" /> Delete</asp:LinkButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </td>
                            </tr>
                        </table>
                     </CommandItemTemplate>                   
                        <DetailTables>
                            <rad:GridTableView  Name="Detail3" DataKeyNames="cpi_id" DataMember="instruction" CommandItemDisplay="Top" EditMode="InPlace" Width="100%">
                            <CommandItemTemplate>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="width:60%">
                                        <div style="padding:3px 4px 3px 4px">
                                            <table border="0" cellpadding="1" cellspacing="1">
                                                <tr style="font: normal 11px tahoma, Verdana, Helvetica, Sans-serif;vertical-align:middle">
                                                    <td>
                                                        <div class="toolbarIconDivider">|</div>
                                                    </td>
                                                    <td>
                                                        <asp:LinkButton ID="btnAdd" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="InitInsert" ><img style="border:0px" alt="" src="../images/addemail.gif" /> Add</asp:LinkButton>
                                                        <asp:LinkButton ID="lnkPerformInsert" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="PerformInsert" Visible="false"><img style="border:0px" alt="" src="../images/save.gif" /> Save</asp:LinkButton>
                                                    </td>
                                                    <td>
                                                        <div class="toolbarIconDivider">|</div>
                                                    </td>
                                                    <td>
                                                        <asp:LinkButton ID="btnEditSelected"  CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="EditSelected" ><img style="border:0px" alt="" src="../images/edit.gif" /> Edit</asp:LinkButton>
                                                        <asp:LinkButton ID="btnUpdateEdited" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="Update" Visible="false"><img style="border:0px" alt="" src="../images/save.gif" /> Save</asp:LinkButton>
                                                        <asp:LinkButton ID="btnCancel" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="CancelAll" Visible="false" CausesValidation="false"><img style="border:0px" alt="" src="../images/cancel.gif" /> Cancel</asp:LinkButton>
                                                    </td>
                                                    <td>
                                                        <div class="toolbarIconDivider">|</div>
                                                    </td>
                                                    <td>
                                                        <asp:LinkButton ID="btnDelete" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="Delete"  OnClientClick="javascript:return confirm('Are you sure you want to delete this Clinical Pathway Instruction?')" ><img style="border:0px" alt="" src="../images/delete.gif" /> Delete</asp:LinkButton>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                            </CommandItemTemplate>
                             
                            <Columns>
                            <rad:GridBoundColumn DataField="cpi_id" HeaderText="CPI_ID" UniqueName="CPI_ID" Visible="false"></rad:GridBoundColumn>
                            <rad:GridBoundColumn DataField="instructions" HeaderText="instructions" UniqueName="instructions" Visible="false"></rad:GridBoundColumn>
                            <rad:GridTemplateColumn HeaderText="Instructions" UniqueName="instructions" DataField="instructions">
                                <ItemTemplate>
                                    <%# DataBinder.Eval(Container.DataItem, "instructions")%>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox ID="tbIns" runat="server" Text='<%# Bind( "instructions") %>' width="100%" TabIndex="1" TextMode="MultiLine" Rows="4"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="descValidator" Runat="server" Display="Dynamic" ControlToValidate="tbIns" ErrorMessage="* Required Field">
                                </asp:RequiredFieldValidator>
                            </EditItemTemplate>
                            <HeaderStyle Width="90%" />
                            </rad:GridTemplateColumn>
                            <rad:GridTemplateColumn HeaderText="Sort Order" UniqueName="sortorder" DataField="sortorder">
                                <ItemTemplate>
                                    <%# DataBinder.Eval(Container.DataItem, "sortorder")%>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox ID="tbSortOrder" runat="server" Text='<%# Bind( "sortorder") %>' width="30px" TabIndex="2"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="descValidator2" Runat="server" Display="Dynamic" ControlToValidate="tbSortOrder" ErrorMessage="* Required Field">
                                </asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" Display="Dynamic" ControlToValidate="tbSortOrder" ErrorMessage="Please enter a valid sort order number." ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
                            </EditItemTemplate>
                            </rad:GridTemplateColumn>
                         </Columns>
                            </rad:GridTableView>
                        </DetailTables>
                     
                    <Columns>
                        <rad:GridBoundColumn DataField="cp_id" HeaderText="CP_ID" UniqueName="CP_ID" Visible="false"></rad:GridBoundColumn>
                        <rad:GridBoundColumn DataField="VisitFrequency" HeaderText="VisitFrequency" UniqueName="VisitFrequency" Visible="false"></rad:GridBoundColumn>
                        <rad:GridClientSelectColumn UniqueName="ClientSelectColumnDetail1"></rad:GridClientSelectColumn>
                        <rad:GridTemplateColumn HeaderText="Visit Frequency" UniqueName="VisitFrequency" DataField="VisitFrequency">
                            <ItemTemplate>
                                <%# DataBinder.Eval(Container.DataItem, "VisitFrequency")%>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="tbVisit" runat="server" Text='<%# Bind( "VisitFrequency") %>' width="100%" TabIndex="1" ></asp:TextBox>
                                <asp:RequiredFieldValidator ID="descValidator" Runat="server" Display="Dynamic" ControlToValidate="tbVisit" ErrorMessage="* Required Field">
                            </asp:RequiredFieldValidator>
                        </EditItemTemplate>
                        <HeaderStyle Width="80%" />
                        </rad:GridTemplateColumn>
                        <rad:GridTemplateColumn HeaderText="Sort Order" UniqueName="Sortorder" DataField="Sortorder">
                            <ItemTemplate>
                                <%# DataBinder.Eval(Container.DataItem, "Sortorder")%>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="tbVisitSortOrder" runat="server" Text='<%# Bind( "Sortorder") %>' width="30px" TabIndex="2" Visible="false"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="descValidator2" Runat="server" Display="Dynamic" ControlToValidate="tbVisitSortOrder" ErrorMessage="* Required Field" >
                            </asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" Display="Dynamic" ControlToValidate="tbVisitSortOrder" ErrorMessage="Please enter a valid sort order number." ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
                        </EditItemTemplate>
                        </rad:GridTemplateColumn>               
 
                     </Columns>
                    </rad:GridTableView>
                 </DetailTables>

C# code:
protected void gridCPDiag_ItemCommand(object sender, GridCommandEventArgs e)
{
  if (e.Item.OwnerTableView.Name == "Detail2" and e.Item is GridCommandItem)
  {
  if (e.CommandName == "Update")
  {
   foreach (GridEditableItem editedItem in e.Item.OwnerTableView.Items)
    {
     int cpid = Convert.ToInt32(editedItem.SavedOldValues["cp_id"]);
     TextBox txtVisitFreq = (TextBox)editedItem.FindControl("tbVisit");
     TextBox txtVisitSortOrder = (TextBox)editedItem.FindControl("tbVisitSortOrder");
 
     UpdateVisitFreq(cpid, txtVisitFreq.Text, Convert.ToInt32(txtVisitSortOrder.Text));
      editedItem.Edit = false;
    }
   }
  }
}

the code is working fine when i select all rows using the header checkbox, but when i select one or two rows only, an error will occur.


Please help.

Thanks!
Lyzel 
zel
Top achievements
Rank 1
 answered on 29 Sep 2010
2 answers
121 views
Hi
I am using RadScheduler, My requirement is that when user is on  day view , Week View , Month View. User clicks on summarize menu in the Context menu.Respective Day,Week,Month wise summarize data should be shown. For eg. If there are 4 meeting booked for today then, date should be shwon at top with all the four meeting details below.    If user is in the week view then data will be shown as Grouped by days(Sunday Monday etc.. in that week).   If user is in the Monthly view then data will be shown as Grouped by dated(1st Sep 2010, 3rd Sep 2010 etc.. in that month)
Regards
Nelson marian
nelson
Top achievements
Rank 1
 answered on 29 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?