Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
220 views
Hi all,

I have a grid with editMode inPlace. When the user adds a new row and clicks "insert" then I can not manage to get the entered values.

Would you please help me with this? What am I missing?!

ASCX code:

<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" MasterTableView-EditMode="InPlace"   
    AutoGenerateColumns="False" Height="150px" oninsertcommand="RadGrid1_InsertCommand" >
<MasterTableView CommandItemDisplay="Top" InsertItemDisplay="Bottom" ShowHeadersWhenNoRecords="true" >
<CommandItemTemplate>
<telerik:RadToolBar ID="rdtbTravelTimeRecording" Runat="server" style="display: block; float: none;
    width: 100%" OnButtonClick="rdtbTravelTimeRecording_ButtonClick"  OnClientButtonClicking="onClientButtonClicking">
    <items>
        <telerik:RadToolBarButton runat="server" Text="Speichern" CommandName="Save" ImageUrl="../../images/icons/Save.png" Width="120px" meta:resourcekey="RadToolBarButtonResource1">
        </telerik:RadToolBarButton>
        <telerik:RadToolBarButton runat="server" Text="Zur Genehmigung" CommandName="Approval" ImageUrl="../../images/icons/Clipboard Check.png" Width="120px" meta:resourcekey="RadToolBarButtonResource1">
        </telerik:RadToolBarButton>
        <telerik:RadToolBarButton runat="server" Text="Zeile hinzuf&uuml;gen" CommandName="InitInsert" ImageUrl="../../images/icons/SymbolAdd.png" Width="120px" meta:resourcekey="RadToolBarButtonResource2">
        </telerik:RadToolBarButton>
    </items>
</telerik:RadToolBar>

</CommandItemTemplate>
    <Columns>
    <telerik:GridTemplateColumn  HeaderText="Datum" uniquename="column4">
        <ItemTemplate>
            <asp:Label ID="typeText" Text='<%# Eval("Date") %>' runat="server" ></asp:Label>
        </ItemTemplate>
        <EditItemTemplate>
            <telerik:RadDatePicker DataField="Date" PickerType="DatePicker" ID="Date" Runat="server"></telerik:RadDatePicker>
        </EditItemTemplate>
    </telerik:GridTemplateColumn>
    
    <telerik:GridTemplateColumn  HeaderText="Von" uniquename="column4">
        <ItemTemplate>
            <asp:Label ID="typeText" Text='<%# Eval("BeginTime") %>' runat="server" ></asp:Label>
        </ItemTemplate>
        <EditItemTemplate>
            <telerik:RadTimePicker DataField="BeginTime" PickerType="TimePicker" ID="PickerFrom" Runat="server"></telerik:RadTimePicker>
        </EditItemTemplate>
    </telerik:GridTemplateColumn>
    
    <telerik:GridTemplateColumn  HeaderText="Bis" uniquename="column4">
        <ItemTemplate>
            <asp:Label ID="typeText" Text='<%# Eval("EndTime") %>' runat="server" ></asp:Label>
        </ItemTemplate>
        <EditItemTemplate>
            <telerik:RadTimePicker  DataField="EndTime" PickerType="TimePicker" ID="PickerTo" Runat="server"></telerik:RadTimePicker>
        </EditItemTemplate>
    </telerik:GridTemplateColumn>
    
    <telerik:GridTemplateColumn  HeaderText="Anwesenheitsart" uniquename="column4">
        <ItemTemplate>
            <asp:Label ID="typeText" Text="Test" runat="server" ></asp:Label>
        </ItemTemplate>
        <EditItemTemplate>
            <telerik:RadComboBox ID="rdcbReason" Runat="server"></telerik:RadComboBox>
        </EditItemTemplate>
    </telerik:GridTemplateColumn>
    
    <telerik:GridTemplateColumn HeaderText="Reiseort/Reisegrund" uniquename="TemplateColumn">
    
        <ItemTemplate>
            <asp:Label ID="typeText" Text='<%# Eval("Type") %>' runat="server" ></asp:Label>
        </ItemTemplate>
        
        <EditItemTemplate>
            <telerik:RadTextBox Width="250px" ID="TextBox1" Runat="server"></telerik:RadTextBox>
        </EditItemTemplate>
    
    </telerik:GridTemplateColumn>
    
    <telerik:GridEditCommandColumn ItemStyle-Width="100px" UniqueName="EditColumn" EditText="Bearbeiten" InsertText="Einf&uuml;gen" CancelText="Abbrechen" UpdateText="Aktualisieren" ></telerik:GridEditCommandColumn>
    <telerik:GridButtonColumn ItemStyle-Width="100px" commandname="Delete" text="L&ouml;schen" uniquename="DeleteColumn"></telerik:GridButtonColumn>
    </Columns>
</MasterTableView>
</telerik:RadGrid>

//Here is what I tried in code behind:
protected void RadGrid1_InsertCommand(object source, GridCommandEventArgs e)
        {
            GridDataInsertItem ii;
            ii = (GridDataInsertItem)RadGrid1.MasterTableView.GetInsertItem();
            
            RadDatePicker date;
            RadDateTimePicker rdtpFrom;
            RadDateTimePicker rdtpTo;
            RadComboBox rdcbReason;

            date = (RadDatePicker)ii.FindControl("Date");
            rdtpFrom = (RadDateTimePicker)ii.FindControl("PickerFrom");
            rdtpTo = (RadDateTimePicker)ii.FindControl("PickerTo");
            rdcbReason = (RadComboBox)ii.FindControl("rdcbReason"); 

            DataRow dr = dt2.NewRow();
            dr["Date"] = date.SelectedDate.ToString();
            dr["BeginTime"] = rdtpFrom.TimeView.StartTime.ToString();
            dr["EndTime"] = rdtpFrom.TimeView.EndTime.ToString();
            dr["Type"] = rdcbReason.Text;
            dt2.Rows.Add(dr);

            RadGrid1.DataSource = dt2;
            RadGrid1.DataBind();
        }


//Thank you very much!
hamid
Top achievements
Rank 1
 answered on 11 Dec 2014
1 answer
86 views
I haven't been successful getting AsyncUpload to work from VS2013.  Is there a complete VS project I can download that shows how to upload a file from a web page?  Thanks
Hristo Valyavicharski
Telerik team
 answered on 11 Dec 2014
3 answers
378 views
Hey guys,

I have made a recommendation to Telerik on this one and I need support for this new control idea.  If you do find it useful, please submit it as a feature request for the cause.

Thanks in advance.
_________________________

I think a Digital Signature control would be a great add-on to the existing Telerik ASP.net library. 
Some of the main properties would include:
  • Integrated Authentication(Active Directory) vs. Anonymous mode
  • Text
  • Background image
  • the existing skin options
  • Fonts
  • and others

Client experience
  • When the Integrated Authentication is selected (during the development), the Current Context User ID is populated in the signature box along with DateTime
  • When the Anonymous mode is selected (during the development), the user will be able to enter Full Name inside a popup window and then control would be populated with the full name along with DateTime.
  • As soon as the control populated by the user, the signature can not be changed. (When the control renders on the client side, the signature would automatically be converted into a binary image which would be stored at a temporary folder.)

Server Side Capturing / Reading
Then the developer could use the usual binary conversion methods to send it to a database.  As soon as the Image is consumed it would be discraded from the temporary storage.

This is obviously a high level description on how I perceived it would work.  However, regardless of how it gets built or works from the developer perspective, if the main functionality I have mentioned here existed today it would definetely be one more thing for me to brag about Telerik to my colleges.

Best Regards,

Ian

 
Rumen
Telerik team
 answered on 11 Dec 2014
1 answer
109 views
grid is loading and when i am clicking on page numbers its working, but next precious button is not workng. and its not showing any error message also

Please help.

thanks,

please find the below code : 


design page :

<asp:ScriptManager ID="ScriptManager1" ScriptMode="Release" runat="server" EnablePageMethods="true">
                </asp:ScriptManager>
                <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                </telerik:RadAjaxManager>
                <telerik:RadGrid ID="telGrid" runat="server" AllowPaging="True" AllowSorting="True" PageSize="10"
                    AllowFilteringByColumn="True" OnPageIndexChanged="PhaseView_PageIndexChanged" OnNeedDataSource="PhaseView_NeedDataSource">
                    <MasterTableView AutoGenerateColumns="false" TableLayout="Fixed">
                        <Columns>
                            <telerik:GridBoundColumn DataField="DrugId" HeaderText="DrugId" UniqueName="DrugId">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="DDC_CODE" HeaderText="DDC_CODE" UniqueName="DDC_CODE">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="TRADE_NAME" HeaderText="TRADE_NAME" UniqueName="TRADE_NAME">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="STATUS" HeaderText="STATUS" UniqueName="STATUS">
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true">
                        <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
                    </ClientSettings>
                </telerik:RadGrid>

code behind :

protected void PhaseView_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            loadgrid();
        }
        private void loadgrid()
        {
            DataTable dtDrug = new ClinicBLL.Settings.Settings_DrugBLL().GridLoad_FetchForUpdate();

            if (dtDrug != null && dtDrug.Rows.Count > 0)
            {
                telGrid.DataSource = dtDrug;
                telGrid.DataBind();
            }
        }


Pavlina
Telerik team
 answered on 11 Dec 2014
1 answer
368 views
Hi,
I need to create a confirm popup window after server side validation.
steps:
1- after click the button it should go to the serverside to validate value from database 
2- if (match) then confiramation popup 
     No --> cancel event
     yest --> to continue 
Marin Bratanov
Telerik team
 answered on 11 Dec 2014
3 answers
83 views

 

G'Day Guys,

I love the demos that you have posted, such as http://demos.telerik.com/aspnet-ajax/grid/examples/clientbinding/defaultcs.aspx and it is great that you have provided the source code.

You have also provided "Instructions how to isolate this demo as a stand-alone application (removing the Quick Start Framework dependencies)" which are easy enough to follow but very time consuming. Can you post the stand alone code as well? That way it only needs to be done once, rather than hundreds of us wasting our time going through the code and deleting out the Quick Start Framework dependencies. I know I would be more inclined to play with the code if I didn't have to spend half an hour on each example cleaning it up.

If you don't want to do it yourself then maybe provide an upload box where some good Samaritan can submit the code that they just spent half an hour cleaning, so that it doesn't have to be done by hundreds of others.

Just a thought.

Cheers

Ian.

Pavlina
Telerik team
 answered on 11 Dec 2014
2 answers
80 views
Hello,

Is there a way to preserve capitalized HTML tag in the telerik editor when switching from HTML mode to Design/Preview mode and back to HTML mode? Switching between editor modes always converting the HTML tag to lower case tag. Please see screen shots CaptureBefore.PNG (initial edits in HTML mode) and CaptureAfter.PNG (back to HTML mode from either Design or Preview mode). 
Ianko
Telerik team
 answered on 11 Dec 2014
3 answers
161 views
My need is to create the pivot grid programmatically and allow users to pivot the fields that they like. 

1) As soon as the data is bound to the pivot grid, it automatically creates some of the fields as RowPivotGrid and some as Aggregate etc. How to control this behavior? By the time _FieldCreated event is called, the field with Telerik's assumed type is already created. How can we override this behavior so that we check the field Name, Type etc and provide proper type for it?  (we tried to initialize fields by adding fields to Fields collection but they show up on the pivot grid, we are trying to control the "All Fields" in the panel)

2) Also for DateTime type of fields, Telerik automatically adds fields like "-Month", "-Week" etc - but while dragging them on to the grid, the month or week are not properly displayed and they don't have correct group interval either. 

Basically I am looking for the best place to gain access to the fields displayed in "All Fields" and setting them properly to Row/Column type so that when user drags them they only go to valid sections.

Thanks,
Angel Petrov
Telerik team
 answered on 11 Dec 2014
1 answer
44 views
1. Is it possible to remove the inner white border of the lightbox? I mean the one that surrounds an image.
2. Is it possible to adjust the opacity level of the backdrop? All I can find is it's either on or off according to whether the lightbox is modal or not.
Angel Petrov
Telerik team
 answered on 11 Dec 2014
7 answers
83 views
Hello,

Kind of a weird question but I'll try to be as descriptive as possible. :)

I have a web app that uses on demand loading.  You can drill down about 4 levels.  I've noticed that when you drill down from level 3 to 4 it fires the events  childItemsDatabind 3 times and NeedDataSource once.  What I'm trying to accomplish is unnecessary trips to the data base and if your drilling from level 3 to 4 it should only bind that level and assume the rest of the tree levels don't need rebinding.  This would allow a single trip to the data base only for the expanded node.

Any thoughts?
Viktor Tachev
Telerik team
 answered on 11 Dec 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
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
Iron
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?