Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
349 views
Hi Team.
We have a scenario where we want to conditionaly hide the detail tables. Below is our structure and we need to hide the childHeader and childRow. 
.aspx
<telerik:RadGrid>
 <MasterTableView >
    <DetailTables>
      <telerik:GridTableView name="Parent">
      </telerik:GridTableView >
    </DetailTables>
<DetailTables>
      <telerik:GridTableView  name="ChildHeader">
         <DetailTables>
            <telerik:GridTableView  name="ChildRow">
           </telerik:GridTableView >
        </DetailTables>
    <telerik:GridTableView >
</DetailTables>
</MasterTableView>
</telerik:RadGrid>


.cs

 protected void radgrid_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
    {
        GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
        switch (e.DetailTableView.Name)
        {
            case "ParentRow":
                {
                    //code for parentrow detail table here
                }
            case "ChildHeader":
                {
                   //code for ChildHeader detail table here
                    break;
                }
            case "ChildRow":
                {
                    //code for ChildRow detail table here
                    break;
                }
        }
Now, DetailTableDataBind method iterates on each detailTable, Is it possible to remove the detailtable so that it does not even render and code in DetailTableDataBind method for childHeader and childRow does not execute. Right now its erroring when it goes in these case statements.
So the requirement is to hide these detail tables conditionally and not execute the code for child header and chidRow in above case statement
Kostadin
Telerik team
 answered on 27 May 2014
1 answer
192 views
Hey all,

I have a time picker control that allows me to pick a time from a set of business hours. Normally, those hours run from around 9AM until (at the latest) 10PM. Since the times appear within the same day, there is no problem. Occasionally, however, our business hours go until around 3AM. 

I can set the min/max times well enough. The control renders the time blocks (every 30 minutes) appropriately, but I cannot select or enter any time past midnight (Even though the times are rendered in the control). I can validate that the selected time falls between the established min/max date-time during the OnSelecting event but it still throws an error and prevents the time from being selected.

How do i get around this? This is a pretty significant business need for us, and i would hate to have to render the control based upon what the current time is, especially since our business folks may have to go back and enter data retroactively.

Help?

Sean Williams
Software Developer
Seaworld Parks & Entertainment
Angel Petrov
Telerik team
 answered on 27 May 2014
2 answers
105 views
i have a radgrid with detailtable that contains columns with checkbox,
main grid contains only one column for grouping.
i use DetailTableDataBind to bind nestedgrid,

what i want is to put a global checkbox inside main grid to check all boxes inside all detail tables at once , for each column inside nestedtable 

how to achieve that ?



Radoslav
Telerik team
 answered on 27 May 2014
1 answer
295 views
I have a RadGrid in batch model (EditMode = "Batch") in <CommandItemTemplate> have a button (SAVE) that calls a javascript function that will call the get_batchEditingManager () method saveChanges (mastertableview);., and server side I I'm Telerik.Web.UI.GridBatchEditingEventArgs function well, the code is working correctly, however, if the server side function of an error, the postback happens and I lose the information that was added on the client. 
How do I not lose this information on the client side if my GridBatchEditingEventArgs server side of an error?

Eyup
Telerik team
 answered on 27 May 2014
5 answers
236 views
Hi

I've a RadTreeview inside a Radcombobox, and it can be quite long. Is it possible to retain the scroll position when a new value is required. Currently the user is taken to the top of the tree, the current selected node is highlighted, but I'd like to start scrolling from the current selected node.

Andy
Shinu
Top achievements
Rank 2
 answered on 27 May 2014
6 answers
222 views
Hi everyone,
I have a problem. I want to use scroll zoom in RadHtmlChart (with line or scatter line series) but I not to want extra control as this link
http://demos.telerik.com/aspnet-ajax/htmlchart/examples/functionality/datanavigation/defaultcs.aspx ,

How to use only scroll in radHtmlChart with Line series?
ahmet
Top achievements
Rank 1
 answered on 27 May 2014
1 answer
79 views
Hi I am trying to show the AjaxLoadingPanel on top the controls when the ajax update is being performed... the images are showing up correctly on every control that is being updated but an extra image is also shown on top of the form and i am not able to get rid of that (screen shot attached)

I hope some one can help with this... here is the code i am using 


<table width="100%" cellpadding="0" cellspacing="0" border="0">
     <tr>
      <td>

<asp:Panel ID="pnlAddEdit" runat="server">
<telerik:RadAjaxLoadingPanel runat="server" ID="raLoadingPanel" BackgroundPosition="Center" Transparency="30">
<div>
<img src="~/images/loading.ring.dots.gif" alt="" />
</div>
</telerik:RadAjaxLoadingPanel>
  <table cellpadding="3px" cellspacing="0px" border="0px">
<tr>
<td class="required" width="150px">xxx: </td>
<td width="275px">
..... </td>
<td />
<td width="150px">Status:</td>
<td width="275px">
....

</td>
</tr>

<tr>
<td class="required" width="150px">xxx: </td>
<td Height="20px" width="280px">
<telerik:RadComboBox AllowCustomText="false" Width="250px" ID="ddlxxx" runat="server" EmptyMessage="Select xxx" DropDownWidth="250px"
CausesValidation="false" AutoPostBack="true" OnSelectedIndexChanged="ddlxxx_SelectedIndexChanged" SkinID="Default"/>
</td>
<td />
<td class="required">yyy: </td>
 <td Height="20px">
 <asp:Panel runat="server" ID="pnlyyy">
<telerik:RadComboBox DropDownWidth="250px" Width="250px" ID="ddlyyy" AutoPostBack="true" OnSelectedIndexChanged="ddlyyy_SelectedIndexChanged" runat="server" EmptyMessage="Select yyy" CausesValidation="false" AllowCustomText="false" SkinID="Default" />

</td>
</tr>
<tr>
....
</tr>

<tr>
<td class="required" width="150px">zzz: </td>
<td Height="20px">
<asp:Panel ID="pnlzzz" runat="server">
<telerik:RadComboBox ID="ddlzzz" Width="250px" DropDownWidth="250px" runat="server" OnSelectedIndexChanged="ddlzzz_SelectedIndexChanged" OnItemDataBound="ddlzzz_ItemDataBound" AutoPostBack="true" CausesValidation="false" EmptyMessage="Select zzz" SkinID="Default" AllowCustomText="false"/>
</asp:Panel>
</td>
<td />
<td class="required">aaa: </td>
 <td Height="20px">
 <asp:Panel ID="pnlaaa1" runat="server">
<telerik:RadComboBox ID="ddlaaa1" Width="250px" runat="server" EmptyMessage="Select aaa1" CausesValidation="false" DropDownWidth="250px"
SkinID="Default" AllowCustomText="false" OnItemDataBound="ddlaaa1_ItemDataBound" />

</asp:Panel>
<div ID="pnlaaa2" runat="server">

</div>
</td>
</tr>

</table>
</asp:Panel>

</table>

<telerik:RadAjaxManager ID="ramMain" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="ddlxxx">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ddlyyy" LoadingPanelID="raLoadingPanel" UpdatePanelRenderMode="Block" />
<telerik:AjaxUpdatedControl ControlID="ddlzzz" LoadingPanelID="raLoadingPanel" UpdatePanelRenderMode="Block" />
<telerik:AjaxUpdatedControl ControlID="pnlaaa1" LoadingPanelID="raLoadingPanel" UpdatePanelRenderMode="Block"  />
<telerik:AjaxUpdatedControl ControlID="pnlaaa2" LoadingPanelID="raLoadingPanel" UpdatePanelRenderMode="Block"  />
</UpdatedControls>
</telerik:AjaxSetting>

<telerik:AjaxSetting AjaxControlID="ddlyyy">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ddlzzz" LoadingPanelID="raLoadingPanel" UpdatePanelRenderMode="Block"  />
<telerik:AjaxUpdatedControl ControlID="pnlaaa1" LoadingPanelID="raLoadingPanel" UpdatePanelRenderMode="Block"  />
<telerik:AjaxUpdatedControl ControlID="pnlaaa2" LoadingPanelID="raLoadingPanel" UpdatePanelRenderMode="Block"  />
</UpdatedControls>
</telerik:AjaxSetting>

<telerik:AjaxSetting AjaxControlID="ddlzzz">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="pnlaaa1" LoadingPanelID="raLoadingPanel" UpdatePanelRenderMode="Block"  />
<telerik:AjaxUpdatedControl ControlID="pnlaaa2" LoadingPanelID="raLoadingPanel" UpdatePanelRenderMode="Block"  />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>  
</telerik:RadAjaxManager>
Radoslav
Telerik team
 answered on 27 May 2014
2 answers
332 views
Hello Telerik Teams

     I create RadGrid and set AutoGenerateColumns="True", and use EditMode="PopUp". When edit form pop up. I don't know how to get value from auto generated edit form to insert or update to Database. I google it but I don't find any solution yet. Please help me.

Thank you very much.

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="True" ShowHeader="false"
            BorderWidth="1px" Skin="Office2007" Width="495" Height="100%" OnNeedDataSource="RadGrid1_NeedDataSource"
            OnDeleteCommand="RadGrid1_DeleteCommand" OnInsertCommand="RadGrid1_InsertCommand"
            OnUpdateCommand="RadGrid1_UpdateCommand">
            <MasterTableView DataKeyNames="NV_ID" CommandItemDisplay="Top" EditMode="PopUp" Font-Names="Arial"
                ForeColor="Black">
                <CommandItemSettings AddNewRecordText="Thêm má»›i" ShowRefreshButton="false" />
                <NoRecordsTemplate>
                    No record</NoRecordsTemplate>
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <EditFormSettings CaptionFormatString="Edit NV_ID: {0}" CaptionDataField="NV_ID" >
                    <PopUpSettings />
                </EditFormSettings>
                <Columns>
                    <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton">
                    </telerik:GridEditCommandColumn>
                    <telerik:GridButtonColumn Text="Delete" CommandName="Delete" ButtonType="ImageButton">
                    </telerik:GridButtonColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>

protected void RadGrid1_InsertCommand(object source, GridCommandEventArgs e)
    {       
        var editableItem = ((GridEditableItem)e.Item);
        //create new entity          
        var item_nv = new DM_NHAN_VIEN();
 
        //item_nv.Ma_DonVi = "CNTT";
        item_nv.NV_ID = 99999;
        item_nv.Ten_DD = "test insert";
        item_nv.Ten_TCap = "T_Insert";
        item_nv.Mat_Khau = "";
        DbContext.DM_NHAN_VIENs.InsertOnSubmit(item_nv);
        try
        {
            //submit chanages to Db    
            DbContext.SubmitChanges();
        }
        catch (Exception ex)
        {
            //ShowErrorMessage();
            lblmes.Text = ex.Message;
        }
    }
scvn80
Top achievements
Rank 1
 answered on 27 May 2014
3 answers
125 views
Is there a way to simulate progress?

I'm attempting to use the custom progress with an Input File object.  It is the processing of the file that I need to simulate but there aren't any measurable steps as such. 

I note that I've tried to use the input=file demo example that does not have any codebehind code, and the only way I could get the ProgressArea to display was to put code in the codebehind of the button click.

There is only 1 file to be uploaded, therefore the "While" is really only needed once otherwise it loops through the processing repeatedly.

The actual processing of the file is done using an external method from the project.

Perhaps I'm missing something?

Thanks

Peter Filipov
Telerik team
 answered on 27 May 2014
2 answers
58 views
How to perform advance filtering (combobox, calendar) when AutoGenerateColumns is set to true
Eyup
Telerik team
 answered on 27 May 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?