Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
130 views
Hi,
I am using multiple RadGrid in the same page, when AddNew in one grid is kept open, and then at the sametime AddNew in second grid is not working.

Can anyone help me in solving this issue.

asp Code:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="grdSoftware">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="grdSoftware" LoadingPanelID="RadAjaxLoadingPanel1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="grdCategory">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="grdCategory" LoadingPanelID="RadAjaxLoadingPanel1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
 </telerik:RadAjaxManager>
 
   <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="WebBlue">
            </telerik:RadAjaxLoadingPanel>
 
<telerik:RadPanelBar ID="RadPanelBar1" runat="server" Width="980" ExpandMode="SingleExpandedItem" onclientitemcollapse="OnClientItemCollapse">
                <CollapseAnimation Type="Linear" Duration="500" />
                <Items>
<telerik:RadPanelItem Expanded="false" Text="Software Description">
                        <ContentTemplate>
                            <telerik:RadGrid ID="grdSoftware" runat="server" AllowFilteringByColumn="True" AllowPaging="True"
                                AllowSorting="True" AutoGenerateColumns="False" AllowAutomaticUpdates="false"
                                AutoGenerateDeleteColumn="True" AllowAutomaticInserts="false" ShowStatusBar="True"
                                OnPreRender="grdSoftware_OnPreRender" OnItemDataBound="grdSoftware_ItemDataBound"
                                OnItemCreated="grdSoftware_ItemCreated" OnItemCommand="grdSoftware_OnItemCommand"
                                VirtualItemCount="50000" PageSize="5" GridLines="None" DataSourceID="dsSoftware"
                                OnInsertCommand="grdSoftware_OnInsertCommand" OnUpdateCommand="grdSoftware_OnUpdateCommand"
                                OnDeleteCommand="grdSoftware_OnDeleteCommand">
                                  <MasterTableView AllowMultiColumnSorting="true" CommandItemDisplay="Top" DataKeyNames="SofwareId"
                                    DataSourceID="dsSoftware">
                                    <CommandItemSettings ExportToPdfText="Export to Pdf" AddNewRecordText="Add New" AddNewRecordImageUrl="Images/AddNew.ico">
                                    </CommandItemSettings>
                                    <RowIndicatorColumn>
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn Visible="true">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </ExpandCollapseColumn>
                                    <Columns>
                                        <telerik:GridEditCommandColumn />
                                        <telerik:GridBoundColumn DataField="SofwareId" DataType="System.Int32" HeaderText="SofwareId"
                                            ReadOnly="True" SortExpression="SofwareId" Visible="false" UniqueName="SofwareId">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="SoftwareName" HeaderText="SoftwareName" SortExpression="SoftwareName"
                                            UniqueName="SoftwareName">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="Description" HeaderText="Description" Visible="false"
                                            SortExpression="Description" UniqueName="Description">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridCheckBoxColumn DataField="IsActive" DataType="System.Boolean" HeaderText="IsActive"
                                            SortExpression="IsActive" UniqueName="IsActive">
                                        </telerik:GridCheckBoxColumn>
                                    </Columns>
          <EditFormSettings EditFormType="Template">
                                        <FormTemplate>
                                            <fieldset>
                                                <table>
                                                    <tbody>
                                                        <tr>
                                                            <td>
                                                                Software Name :
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtSoftwareName" Text='<%#Bind("SoftwareName") %>' runat="server"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="* Required"
                                                                    ControlToValidate="txtSoftwareName"></asp:RequiredFieldValidator>
                                                            </td>
                                                            <td>
                                                            </td>
                                                            <td>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Description :
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtDescription" Text='<%#Bind("Description") %>' runat="server"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="* Required"
                                                                    ControlToValidate="txtDescription"></asp:RequiredFieldValidator>
                                                            </td>
                                                            <td>
                                                            </td>
                                                            <td>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Is Active :
                                                            </td>
                                                            <td>
                                                                <asp:CheckBox ID="chkIsActive" Checked='<%# Eval("IsActive") == DBNull.Value? true : Eval("IsActive") %>'
                                                                    runat="server"></asp:CheckBox>
                                                            </td>
                                                            <td>
                                                            </td>
                                                            <td>
                                                            </td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                                <table style="width: 100%">
                                                    <tr>
                                                        <td align="right" colspan="2">
                                                            <asp:Button ID="Button1" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                                                runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                                            </asp:Button> 
                                                            <asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">
                                                            </asp:Button>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </fieldset>
                                        </FormTemplate>
                                        <PopUpSettings Modal="true" Width="600" />
                                    </EditFormSettings>
                                    <PagerStyle AlwaysVisible="True" />
                                </MasterTableView>
                                <PagerStyle AlwaysVisible="True" />
                            </telerik:RadGrid>
                            <asp:SqlDataSource ID="dsSoftware" runat="server" ConnectionString="<%$ ConnectionStrings:TestConnectionString %>"
                                SelectCommand="SELECT [SofwareId], [SoftwareName], [Description], [IsActive] FROM [SoftwareDetails]">
                            </asp:SqlDataSource>
                        </ContentTemplate>
                    </telerik:RadPanelItem>
 
 <telerik:RadPanelItem Expanded="false" Text="Exam Categories">
                        <ContentTemplate>
                            <telerik:RadGrid ID="grdCategory" runat="server" AllowFilteringByColumn="True" AllowPaging="True"
                                AllowSorting="True" AutoGenerateColumns="False" AutoGenerateDeleteColumn="True"
                                AllowAutomaticInserts="false" AllowAutomaticUpdates="false" ShowStatusBar="True"
                                OnItemDataBound="grdCategory_OnItemDataBound" VirtualItemCount="50000" PageSize="5"
                                OnItemCreated="grdCategory_ItemCreated" OnPreRender="grdCategory_OnPreRender"
                                GridLines="None" DataSourceID="CategoryDatasource" OnInsertCommand="grdCategory_OnInsertCommand"
                                OnUpdateCommand="grdCategory_OnUpdateCommand" OnDeleteCommand="grdCategory_OnDeleteCommand"
                                OnItemCommand="grdCategory_OnItemCommand">
                                <MasterTableView AllowMultiColumnSorting="true" CommandItemDisplay="Top" DataKeyNames="CategroyId"
                                    DataSourceID="CategoryDatasource">
                                    <CommandItemSettings ExportToPdfText="Export to Pdf" AddNewRecordText="Add New" AddNewRecordImageUrl="Images/AddNew.ico">
                                    </CommandItemSettings>
                                    <Columns>
                                        <telerik:GridEditCommandColumn />
                                        <telerik:GridBoundColumn DataField="CategroyId" DataType="System.Int32" HeaderText="CategroyId"
                                            ReadOnly="True" SortExpression="CategroyId" UniqueName="CategroyId" Visible="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridTemplateColumn DataField="CategroyName" HeaderText="Categroy Name" SortExpression="CategroyName"
                                            UniqueName="CategroyName">
                                            <ItemTemplate>
                                                <asp:Label runat="server" ID="temp1" Text='<%#Bind("CategroyName") %>' />
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <asp:TextBox ID="txtCategoryName" runat="server" Text='<%#Bind("CategroyName") %>' />
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="*Required"
                                                    ControlToValidate="txtCategoryName"></asp:RequiredFieldValidator>
                                            </EditItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn DataField="SoftwareId" DataType="System.Int32" HeaderText="Software"
                                            SortExpression="SoftwareId" UniqueName="SoftwareId" Visible="False">
                                            <ItemTemplate>
                                                <asp:Label ID="Label21" runat="server" Text='<%# Bind( "SoftwareId") %>' />
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <asp:DropDownList ID="cmbSoftwareCategory" runat="server" DataSourceID="SqlDataSourceforSoftwareCategory"
                                                    Width="310px" DataValueField="SofwareId" DataTextField="SoftwareName" />
                                                <%--SelectedValue='<%# Bind( "SoftwareId") %>'--%>
                                            </EditItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridBoundColumn DataField="SoftwareName" HeaderText="Software Name" SortExpression="SoftwareName"
                                            ReadOnly="true" UniqueName="SoftwareName">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridTemplateColumn DataField="Description" HeaderText="Description" SortExpression="Description"
                                            UniqueName="Description" Visible="False">
                                            <ItemTemplate>
                                                <asp:Label ID="Label25" runat="server" Text='<%#Bind("Description") %>' />
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <asp:TextBox ID="txtDescription" runat="server" Text='<%#Bind("Description") %>' />
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ErrorMessage="*Required"
                                                    ControlToValidate="txtDescription"></asp:RequiredFieldValidator>
                                            </EditItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn DataField="IsActive" DataType="System.Boolean" HeaderText="IsActive"
                                            SortExpression="IsActive" UniqueName="IsActive" Visible="False">
                                            <ItemTemplate>
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <asp:CheckBox ID="chkActive" runat="server" Checked='<%# Eval("IsActive") == DBNull.Value? true : Eval("IsActive") %>' />
                                            </EditItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn DataField="ExamName" HeaderText="ExamName" SortExpression="ExamName"
                                            UniqueName="ExamName" Visible="False">
                                            <ItemTemplate>
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <asp:DropDownList ID="cmbExamCategory" runat="server" DataSourceID="SqlDataSourceforExamCategory"
                                                    Width="310px" DataValueField="ExamId" DataTextField="ExamName" />
                                                <%-- SelectedValue='<%# Bind( "ExamId") %>'--%>
                                            </EditItemTemplate>
                                        </telerik:GridTemplateColumn>
                                    </Columns>
                                    <EditFormSettings>
                                        <EditColumn ButtonType="PushButton" HeaderStyle-HorizontalAlign="Right">
                                            <HeaderStyle HorizontalAlign="Right"></HeaderStyle>
                                        </EditColumn>
                                    </EditFormSettings>
                                    <PagerStyle AlwaysVisible="True" />
                                </MasterTableView>
                                <PagerStyle AlwaysVisible="True" />
                            </telerik:RadGrid>
                            <asp:SqlDataSource ID="CategoryDatasource" runat="server" ConnectionString="<%$ ConnectionStrings:TestConnectionString  %>"
                                SelectCommand="SELECT CategoryDetails.CategroyId, CategoryDetails.CategroyName, CategoryDetails.SoftwareId, SoftwareDetails.SoftwareName, CategoryDetails.Description, CategoryDetails.IsActive, ExamDetails.ExamId, ExamDetails.ExamName FROM CategoryDetails INNER JOIN SoftwareDetails ON CategoryDetails.SoftwareId = SoftwareDetails.SofwareId INNER JOIN ExamDetails ON CategoryDetails.ExamId = ExamDetails.ExamId">
                            </asp:SqlDataSource>
                            <asp:SqlDataSource ID="SqlDataSourceforSoftwareCategory" runat="server" ConnectionString="<%$ ConnectionStrings:TestConnectionString  %>"
                                SelectCommand="SELECT SofwareId, SoftwareName FROM SoftwareDetails"></asp:SqlDataSource>
                            <asp:SqlDataSource ID="SqlDataSourceforExamCategory" runat="server" ConnectionString="<%$ ConnectionStrings:TestConnectionString  %>"
                                SelectCommand="SELECT ExamId, ExamName FROM ExamDetails"></asp:SqlDataSource>
                        </ContentTemplate>
                    </telerik:RadPanelItem>
</Items>
</telerik:RadPanelBar >

Chockalingam
Top achievements
Rank 1
 asked on 26 Sep 2013
2 answers
120 views
Hello,

I created a GridTemplateColumn and placed a table inside with rows and columns. For some reason i'm getting a light blue bar next to each row that i would like to get rid of. Only appears on white backgrounds. Second, the spacing of each row is huge, I tried to change the padding and spacing in the table, i tried a couple CSS rules but nothing works. I'm thinking its the grid spacing them out. How do i close the gab?.

Attached is a snapshot of what I'm seeing and the code i used to create the GridTemplateColumn.

<telerik:GridTemplateColumn DataField="DETAIL" UniqueName="DetailColumn" HeaderStyle-Width="700px">
    <ItemTemplate>
        <asp:Panel ID="Panel1" runat="server">
            <table cellpadding="0" cellspacing="0" style="font-size:9px;">
                <tr>
                    <td valign="top" style="width:80px;"><b>Projected :</b></td>
                    <td valign="top" style="width:50px;"><%# Eval("PROJECTED") %></td>
                    <td valign="top" style="width:80px;"><b>ACD Calls :</b></td>
                    <td valign="top" style="width:50px;"><%# Eval("ACD_CALLS") %></td>
                    <td valign="top" style="width:80px;"><b>Aban Calls :</b></td>
                    <td valign="top" style="width:50px;"><%# Eval("ABAN_CALLS") %></td>
                </tr>
                <tr>
                    <td valign="top" style="width:80px;"><b>Forcasted :</b></td>
                    <td valign="top" style="width:50px;"><%# Eval("PROJECTED") %></td>
                    <td valign="top" style="width:80px;"><b>ACD Time :</b></td>
                    <td valign="top" style="width:50px;"><%# Eval("ACD_CALLS") %></td>
                    <td valign="top" style="width:80px;"><b>Aban Time :</b></td>
                    <td valign="top" style="width:50px;"><%# Eval("ABAN_CALLS") %></td>
                </tr>
                <tr>
                    <td valign="top" style="width:80px;"><b>Offered :</b></td>
                    <td valign="top" style="width:50px;"><%# Eval("PROJECTED") %></td>
                    <td valign="top" style="width:80px;"><b>ASA :</b></td>
                    <td valign="top" style="width:50px;"><%# Eval("ACD_CALLS") %></td>
                    <td valign="top" style="width:80px;"><b>Aban Rate :</b></td>
                    <td valign="top" style="width:50px;"><%# Eval("ABAN_CALLS") %></td>
                </tr>
                <tr>
                    <td valign="top" style="width:80px;"><b>Service Level :</b></td>
                    <td valign="top" style="width:50px;"><%# Eval("PROJECTED") %></td>
                    <td valign="top" style="width:80px;"><b></b></td>
                    <td valign="top" style="width:50px;"></td>
                    <td valign="top" style="width:80px;"><b>Hold Aban Calls :</b></td>
                    <td valign="top" style="width:50px;"></td>
                </tr>
            </table>
        </asp:Panel>
    </ItemTemplate>
</telerik:GridTemplateColumn>

Thanks!
Shane
Shane
Top achievements
Rank 1
 answered on 26 Sep 2013
9 answers
593 views
Hi,

I am dumping the contents of the rad grid into a data table and am trying to find a control that is inside the item template of a grid template column without knowing what he control name is.

I am  looping through all the columns in the grid and based on the data type, performing some custom formatting before inserting the row into the data table.

My question is, if the column is a grid template column, how can I find the control that is inside the <Item Template> without actually knowing the name.

Below is the code I am using to loop through the grid.
Dim dr As DataRow
 For Each dataItem As GridDataItem In Me.rgvMainGrid.MasterTableView.Items
     dr = exportTable.NewRow
     For Each column As GridColumn In Me.rgvMainGrid.MasterTableView.Columns
         If column.Display = True Then
             Select Case column.ColumnType
                 Case "GridBoundColumn", "GridDropDownColumn", "GridDateTimeColumn", "GridNumericColumn", "GridCalculatedColumn"
                     strFields = strFields + IIf(strFields = Nothing, "", ",") + column.UniqueName.ToString + "," + column.HeaderText.ToString
                     Select Case column.DataType.ToString
                         Case "System.String"
                             If dataItem(column.UniqueName).Text.ToString = " " Then
                                 dr(column.UniqueName) = ""
                             Else
                                 dr(column.UniqueName) = "'" + dataItem(column.UniqueName).Text.ToString
                             End If
                         Case "System.Decimal", "System.Double", "System.Single"
                             If dataItem(column.UniqueName).Text.ToString = " " Then
                                 dr(column.UniqueName) = 0
                             Else
                                 dr(column.UniqueName) = FormatNumber(dataItem(column.UniqueName).Text.ToString, 2, TriState.False, TriState.False, TriState.False)
                             End If
                         Case "System.Int16", "System.Int32", "System.Int64", "System.Single"
                             If dataItem(column.UniqueName).Text.ToString = " " Then
                                 dr(column.UniqueName) = 0
                             Else
                                 dr(column.UniqueName) = FormatNumber(dataItem(column.UniqueName).Text.ToString, 0, TriState.False, TriState.False, TriState.False)
                             End If
                         Case "System.DateTime"
                             If dataItem(column.UniqueName).Text.ToString = " " Then
                                 dr(column.UniqueName) = ""
                             Else
                                 dr(column.UniqueName) = dataItem(column.UniqueName).Text.ToString
                             End If
                     End Select
                 Case "GridTemplateColumn"
 
                 Case Else
                     'Do Nothing
             End Select
         End If
 
     Next
     exportTable.Rows.Add(dr)
 Next

Thanks for your assistance.
Tracy
Tracy
Top achievements
Rank 1
 answered on 26 Sep 2013
1 answer
89 views
I am obviously very new to the .net world. Please forgive me if the solution is obvious btu goggling hasn't turned up any info I can apply directly to my situation. I am using Visual Studio 2010. I am creating a "start" project that includes all the things I need for any app on my site, including css, certain images, and external javascript files. 

When I export this project to a template, it does not include the Telerik assembly file for some reason, so When I start a new project from the exported template, It doesn't have the assembly file and I have to manually re-add the Telerik refernce.

What am I doing wrong? How can I fix this?

Thank You.
Ianko
Telerik team
 answered on 26 Sep 2013
1 answer
118 views
Hi,

Is there issue with latest telerik Control on IE 10 , recently we upgraded the application to work on IE with latest telerik control and now daily we are getting unexpected UI behavior which was not earlier.
When combo is disabled toggle image is not showing on UI , please see the attached screen

Thanks
Afroz khan
Hristo Valyavicharski
Telerik team
 answered on 26 Sep 2013
3 answers
177 views

I have a wizard-like screen that has several steps. The first step includes an async-upload. I have set the PostbackTriggers property so that only the submit button on the last step causes the file to be uploaded. This all works fine to persist the file upload through the postbacks associated with the Next/Previous buttons of the wizard, however, the way the wizard works is to hide/show panel controls depending on which step is currently being viewed. If I set the panel.visible property to false for the panel which contains the async-upload, I notice when I return to this step by setting panel.visible to true, the upload is gone. I have found one potential workaround by setting panel.Style("display") = "block" or "none" depending on whether I want to hide it or not and this seems to persist the upload. I would prefer to use the built-in asp.net visible property. I am wondering if this is a known limitation or am I doing something wrong?
Hristo Valyavicharski
Telerik team
 answered on 26 Sep 2013
3 answers
117 views

I am using the demo of the mega menu and now that I have it built one of the sub-menus I want to have it filled via a custom list. I put a literal in and can't access the literal. I am sure I am missing something simple. The menu section is below. Thanks, John


<telerik:RadMenuItem Text="Shows" PostBack="false">
                            <Items>
                                <telerik:RadMenuItem CssClass="Shows" Width="640">
                                    <ItemTemplate>
                                        <div id="ShowsWrapper" class="Wrapper">
                                            <h3>Show Information</h3>
                                            <div class="ShowsLeft">
                                                <asp:Literal runat="server" ID="LiteralCurrentShow"></asp:Literal>
                                            </div>
                                            <div class="ShowsRight">
                                                <asp:Literal runat="server" ID="LiteralUpcomingShows"></asp:Literal>
                                                <a class="moreLink" href="/Shows/">View all Shows</a>
                                                </div>
                                        </div>
                                    </ItemTemplate>
                                </telerik:RadMenuItem>
                            </Items>
                        </telerik:RadMenuItem>


Kate
Telerik team
 answered on 26 Sep 2013
1 answer
411 views

Hello,

I'm creating a 'dashboard' on which the user can dynamically add dock controls. Each dock control contains a certain usercontrol.

Using the examples from the Telerik site, I already have created the dashboard and the functionality to add dock controls. But when I add a usercontrol, I get a null reference exception form the usercontrol. The usercontrol itself contains several buttons, which are null when I call dockLayout.Controls.Add(dock);
I'm not sure, but I think it has to do with the state of the page lifecycle.

The dock-widget example (http://www.telerik.com/help/aspnet-ajax/dock-widgets.html) I've using is probably the way to solve this problem, but the example doesn't explain how LoadControl() should be implemented. Is this the missing link? If so, can you give an example code, based on the provided example?

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <telerik:RadAjaxLoadingPanel runat="server" ID="ralpConfiguration">
    </telerik:RadAjaxLoadingPanel>
 
    <telerik:RadAjaxPanel runat="server" ID="rapConfiguration" LoadingPanelID="ralpConfiguration">
          <telerik:RadWindow ID="modalPopup" runat="server" Width="360px" Height="360px" Modal="true">
               <ContentTemplate>
                    <asp:DropDownList runat="server" ID="ddlControls" ></asp:DropDownList>
                    <asp:Button runat="server" ID="btnAddRadDock" Text="Add" />
               </ContentTemplate>
          </telerik:RadWindow>
     </telerik:RadAjaxPanel>
 
    <telerik:RadDockLayout ID="dockLayout" runat="server">
    </telerik:RadDockLayout>
</asp:Content>

protected override void OnPreInit(EventArgs e)
{
  base.OnPreInit(e);
  btnAddControl.Click += new EventHandler(btnAddControl_Click);
  btnAddRadDock.Click += new EventHandler(btnAddRadDock_Click);
  dockLayout.SaveDockLayout += new DockLayoutEventHandler(dockLayout_SaveDockLayout);
  dockLayout.LoadDockLayout += new DockLayoutEventHandler(dockLayout_LoadDockLayout);
 
  for (int i = 0; i < CurrentDockStates.Count; i++)
  {
    RadDock dock = new RadDock();
    dock.ID = string.Format("RadDock{0}", i);
    dock.ApplyState(CurrentDockStates[i]);
    dockLayout.Controls.Add(dock);
  }
}
 
protected void dockLayout_SaveDockLayout(object sender, DockLayoutEventArgs e)
{
  CurrentDockStates = dockLayout.GetRegisteredDocksState();
}
 
protected void dockLayout_LoadDockLayout(object sender, DockLayoutEventArgs e)
{
  foreach (DockState state in CurrentDockStates)
  {
    e.Positions[state.UniqueName] = state.DockZoneID;
    e.Indices[state.UniqueName] = state.Index;
  }
}
 
private void btnAddRadDock_Click(object sender, EventArgs e)
{
  RadDock dock = CreateRadDock();
  dock.Tag = ddlControls.SelectedValue;
  LoadWidget(dock);
// the following line will trigger the page load of the user control, which in turn returns the null ref exception on a button within the user control
  dockLayout.Controls.Add(dock);
}
 
private void LoadWidget(RadDock dock)
{
  if (string.IsNullOrEmpty(dock.Tag))
    return;
 
  GisMapControl gisMapControl = new GisMapControl();
  gisMapControl.IsFilterPanelVisible = false;
  gisMapControl.LocationLimit = 100;
  gisMapControl.FacilityLimit = 100;
 
  dock.ContentContainer.Controls.Add(gisMapControl);
}
 
private RadDock CreateRadDock()
{
  int docksCount = CurrentDockStates.Count;
  RadDock dock = new RadDock();
  dock.ID = string.Format("RadDock{0}", docksCount);
  dock.Title = string.Format("Dock {0}", docksCount);
  dock.Text = string.Format("Added at {0}", DateTime.Now);
  dock.UniqueName = Guid.NewGuid().ToString();
  dock.Width = Unit.Pixel(300);
  return dock;
}
Slav
Telerik team
 answered on 26 Sep 2013
2 answers
273 views
Hi,
I am using RadButton in aspx page. I set property Visible=false; Depanding Scenarios It will be Visible  from code behind file. I am getting Request.Form["__EVENTTARGET"] null value when i click on radbutton. 
For similar scenario I was replaced RadButton with link button with Vissible=false; I am getting client id for  Request.Form["__EVENTTARGET"] in page_load event.

Please give solution for my problem as soon as possible.
Prasad
Top achievements
Rank 1
 answered on 26 Sep 2013
1 answer
182 views
Actually I am using scheduler where I can track child activities, child will attend the activities or if he doesn't attend we can delete that task on that day.

As of now my I am able to do all these tasks using the scheduler control.

My problem is :

Per task we will charge some amount based on child age, I need to do these calculations in a database based on child attendance.
I need a database query to get child completed tasks based on date wise. If I can get these in table format in the database and I can do above logic.

As of now In Appointments table has a data in single line format (DTSTART:20130916T093000Z
DTEND:20130916T103000Z
RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR
EXDATE:20131008T093000Z,20131010T093000Z ). I need a query where I can get same gird data in the database.
Plamen
Telerik team
 answered on 26 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?