Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
1.6K+ views
Hi,

I have to create a RadGrid to enable users to enter data. The row may contain few texbox and Popup buttons. I should enable eight rows to allow them to enter eight records in a time. Some one pls guide me or get me some similar examples for me to proceed with.

Thanks in Advance
Jidesh
Martin
Telerik team
 answered on 24 Sep 2009
1 answer
115 views
I am been going over this and can't seem to get it working.  I am trying
to make a 3 layer (1 MTV and 2 Childs) that will let users filter the 3rd
layer based on a RadComboBox (Pick column) and RadTextBox (Contains ....)
outside of the grid.

I am using WebMethods in the code-behind file of the page.  I cannot
seem to figure out how to get all these items working together in sync.

Actually, I can't seem to figure out how to get the programmatic client
data binding to work with PageMethods.  I have found very little in my
search on the forum.  The items I have found don't seem to work.
I have tried WebServices but can't seem to get them to work on the
server.  I keep getting a 'WebService' is undefined when running the
page.  I have searched everywhere and tried all combinations of possible
issue from changing the web.config file to alterating the way its called
in JavaScript.  WebMethods using Dictionary is the only way I have been
able to pull the data and have it display.

Any ideas about how I can set this up using WebMethod and Dictionary
to return the data?  Forgot, I am using Linq to Sql Classes and
Dynamic Linq in case it make a difference.  Thanks in advance.

Josh
Nikolay Rusev
Telerik team
 answered on 24 Sep 2009
3 answers
465 views

I am trying to use programmatic client side binding with my grid, however,
the grid keeps saying "No records to display.".  Below is my code.  Does
anyone see why it is not populating my grid?  I have verified that I do get
my data passed back in JSON format in the correct Method Names.

Oh yeah, when the grid first comes up it has paging enable, but
after the button click and grid.dataBind is does not.

I was thinking it was the OnDataBinding() handler because at
first I was not using the standard SelectMethod and Count Names.
Still doesn't work though.

<script type="text/javascript">  
var tableview;  
 
    function pageLoad() {  
        tableview=$find("Grid").get_masterTableView();  
    }  
    function ButtonClick(sender, args) {  
        PageMethods.GetEvents(0, 100, """",GetData);  
        return false;  
    }  
    function GetData(Data) {  
        tableview.set_dataSource(Data);  
        tableview.dataBind();  
    }  
    function Grid_DataBinding(sender, args) {  
        alert("Made it this far.");  
        sender.ClientSettings.DataBinding.SelectMethod = "GetData";  
        sender.ClientSettings.DataBinding.SelectCountMethod = "GetCount";  
        sender.ClientSettings.DataBinding.FilterParameterType = "Linq";  
        sender.ClientSettings.DataBinding.SortParameterType = "Linq";  
    }  
</script> 

<asp:ScriptManager ID="MainScript" runat="server" EnablePageMethods="true" /> 
    <asp:Button ID="Button1" runat="server" Text="Get Data" OnClientClick="return ButtonClick();" /> 
    <rad:RadGrid runat="server" ID="Grid" AutoGenerateColumns="false" Height="670px" AllowPaging="true"   
    PageSize="15" Skin="Telerik">  
    <MasterTableView TableLayout="Fixed" ClientDataKeyNames="EventID,EventName" Height="670px">  
   <Columns> 
    <rad:GridBoundColumn HeaderText="EventID" DataField="EventID" /> 
    <rad:GridBoundColumn HeaderText="EventID" DataField="EventName" /> 
   </Columns> 
   </MasterTableView> 
   <ClientSettings> 
 <ClientEvents OnCommand="function(){}" OnDataBinding="Grid_DataBinding" /> 
 <Scrolling AllowScroll="true" /> 
 <Selecting AllowRowSelect="true" /> 
</ClientSettings> 
</rad:RadGrid> 

        [WebMethod]  
        public static Dictionary<stringobject> GetEvents(int startRowIndex, int maximumRows, string sortExpression, string filterExpression)  
        {  
            var filter = !string.IsNullOrEmpty(filterExpression);  
            var sort = !string.IsNullOrEmpty(sortExpression);  
 
            var data = new LinqtoSqlDataContext();  
            var eventdata = (from e in data.Events  
                             select new 
                             {  
                                 EventID = e.EventID,  
                                 EventName = e.EventName  
                             })  
                         .Where(filter ? filterExpression : "EventID > 0")  
                         .OrderBy(sort ? sortExpression : "EventID ASC");  
 
            var count = filter ? eventdata.Count() : data.Events.Count();  
            eventdata = eventdata.Skip(startRowIndex).Take(maximumRows);  
            return new Dictionary<stringobject> { { "GetData", eventdata }, { "GetCount", count } };  
        } 
Nikolay Rusev
Telerik team
 answered on 24 Sep 2009
1 answer
94 views
Hi,

THis is live url

http://www.seeds-lanka.com/minute/document.aspx

I have created blog inculding all the code , How did i create popup window

You can see code from
 http://radwindow.blogspot.com/

My problem is first time popup window working find , When i try second time window is laoding but cant see content. If i change grid row and load again its loading fine. But second time for same row same like previous

can you check code and see what happen


Yavor
Telerik team
 answered on 24 Sep 2009
1 answer
71 views
Hi,

                    <td> 
                        <label class="reDialogLabel"
                            <span style="text-align: right;">Margin </span> 
                        </label> 
                    </td> 
In EditorDialogs/setimageproperties.ascx should be

                    <td align="right"
                        <label class="reDialogLabel"
                            <span style="text-align: right;"
                                <script type="text/javascript"
                                    document.write(localization["Margin"]); 
                                </script> 
                            </span> 
                        </label> 
                    </td> 





Georgi Tunev
Telerik team
 answered on 24 Sep 2009
3 answers
138 views

assume i have everything else correctly then i have below codes:

<telerik:AjaxSetting AjaxControlID="RadGrid1">  
                    <UpdatedControls>  
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />  
                    </UpdatedControls>  
                </telerik:AjaxSetting> 

then
 <telerik:RadGrid AutoGenerateColumns="true" ID="RadGrid1" 
     Width="760px" AllowFilteringByColumn="True" AllowSorting="True" 
     PageSize="15" ShowStatusBar="true" ShowFooter="True" AllowPaging="True" runat="server" 
     GridLines="None">  
     <PagerStyle Mode="NextPrevAndNumeric" />  
     <MasterTableView Summary="testing"></MasterTableView>  
</telerik:RadGrid> 

then assume rs is sqldatareader and now i am loading it to datatable.
Dim dt As Data.DataTable = New Data.DataTable  
        dt.Load(rs)  
        Me.radgrid1.datasource = dt 

so when i run this, i got data, However, when i try to click on the next page, it won't let me. I keep getting javascript error saying object required. and then when i type in a word for it to automatically filter it won't do anything. And when i type in the word i want to filter for and click on the filter drop down to get Contain, it postback with nothing. can you let me know what i'm missing here please or help me get this resolve. thank you very much. I must have the data dynamically generate from the server. thank you very much for your help.
Yavor
Telerik team
 answered on 24 Sep 2009
2 answers
388 views
Hello All,

I have a RadGrid containing CheckBox Columns which will indicate that RadGrids row will be deleted.
User selectes rows that she wants to delete using Checkboxes and then presses Button.
Button's Click handler is called and a method checks what rows are meant to be deleted.

I can get a reference to selected row's GridDataItem but I don't no how to delete it from RadGrid or RadGrid's Datasource.
I can't use any automatic insert/update/delete database techniques in this case.

Thanks,
Mike
Top achievements
Rank 1
 answered on 24 Sep 2009
1 answer
152 views
First let me lay out the situation.   I have a Date Field that is not required.  But I would like this field to still be validated when data is entered. So, therefore I'm using the RadDateInput field and a custom validator.

I tried to implement a solution by subscribing to the Error event, and keeping track of the state.  But the problem is that when it enters error state, then you clear the text box, you don't know that you "cleared" the error, and the form doesn't validate.

Here is the javascript i'm using:
        var invalidInput = false
 
        function OnValueChanged(sender, args) { 
            if (!(invalidInput && args.get_newValue() == "")) { 
                invalidInput = false
            } 
        } 
 
        function OnError(sender, args) { 
            invalidInput = true
        } 
 
        function CustomValidate(sender, args) { 
            if (invalidInput) { 
                args.IsValid = false
            } 
        }   

And my control:
<tel:RadDateInput runat="server" id="DOB" MinDate="1/2/1900"
    <ClientEvents OnValueChanged="OnValueChanged" OnError="OnError" /> 
</tel:RadDateInput> 
<asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="DOB" ClientValidationFunction="CustomValidate" ErrorMessage="*" ValidateEmptyText="true" /> 
 

So, is there a way to check to see if the RadDateInput control is in "Error" state (red w/ Exclamation)?

You can reproduce this by using the code attached and following these steps.
#1 Set the date to something invalid ("asdf")
#2 tab out ( notice the Telerik Error state and the custom validator message '*" )
#3 Submit the form. (notice the validation error)
#4 clear the textbox
#5 tab out (notice he Telerik error state has been cleared, but the validation error still persists)
#6 submit the form( it wont submit because the custom validator has not been cleared)

Any help in resolving the validator issue, or giving me a solution where the Data in the RadDateInput is still validated but stops the form from submitting w/ errors while still allowing an "empty" state where the data not "required".

Thanks,
Sean

Yavor
Telerik team
 answered on 24 Sep 2009
3 answers
129 views
Hello,

      I have cretaed a rad grid view and populate the values to grid dynamically. And i need to place a check bok column inside the grid.
I used Headertemplate and ItemTemplate to place the check box column. Also i have set the proprty for "Allow Filtering" to true. On executing the application am getting the filteration for check box column too. I dont want this filtering in check box column alone. Please can you help me in this.

       I have attached my aspx grid code with is mail.

<telerik:RadGrid  ID="radSimpleGrid" runat="server" AllowPaging="True" AllowSorting="True"
                GridLines="Both" AutoGenerateColumns="False" AllowFilteringByColumn="true" Skin="Office2007">
                <FooterStyle BackColor="#CCCCCC" />
                <MasterTableView TableLayout="Fixed" PageSize="10">
                    <NoRecordsTemplate>
                        No records found
                    </NoRecordsTemplate>
                    <Columns>
                        <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn">
                            <HeaderTemplate>
                             <asp:CheckBox id="headerChkbox" OnCheckedChanged="ToggleSelectedState" AutoPostBack="True" runat="server"></asp:CheckBox>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox id="CheckBox1" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" runat="server"></asp:CheckBox>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                </MasterTableView>
                <PagerStyle Mode="NumericPages"></PagerStyle>
                <HeaderStyle HorizontalAlign="Center" />
                <ClientSettings ClientEvents-OnRowContextMenu="RowContextMenu" EnableRowHoverStyle="true">
                    <ClientEvents OnRowContextMenu="RowContextMenu"></ClientEvents>
                    <Selecting AllowRowSelect="true" />            
                </ClientSettings>
            </telerik:RadGrid>



Vijayaragavan
Top achievements
Rank 1
 answered on 24 Sep 2009
1 answer
137 views

Hi,

After setting "Web garden" on IIS 6.0 I experience problems with telerik captcha image.

Using ImageStorageLocation=Cache are no good - I know.

But ImageStorageLocation=Session should work.

: Type 'Telerik.Web.UI.CaptchaImage' in Assembly 'Telerik.Web.UI, Version=2009.2.826.35, Culture=neutralPublicKeyToken=121fae78165ba3d4' is not marked as serializable 

Please mark it as serializable in the next version.

Regards,
Hessner
Pero
Telerik team
 answered on 24 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?