Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
327 views

I am having trouble adding a GridEditCommandColumn or GridHyperLinkColumn to a grid control that is bound clientside via a web service. When I add either of these type columns the columns appear empty.

There are several search fields. When the user presses the Search button the form is submitted and on the server side, the grid is bound to a blank datasource. On the client side, the OnGridCreated event triggers a call to a web service that returns the data for the grid and then binds it. From there, all paging and sorting is done client side.

Here is what I think is the pertinent code. I am also including a screenshot showing part of the resulting grid.

The Grid:

 

<telerik:RadGrid ID="gridResults" runat="server" Visible="false" AutoGenerateColumns="false" EnableViewState="true" 
                 SkinID="CR"  GridLines="None" HeaderStyle-HorizontalAlign="left" PageSize="20"   
                 AllowAutomaticUpdates="false" OnUpdateCommand="gridResults_UpdateCommand"                                                                                                       
                 AllowPaging="True" PagerStyle-Position="Bottom" PagerStyle-Mode="NextPrev" AllowSorting="true">  
    <ClientSettings> 
        <ClientEvents OnGridCreated="gridResults_GridCreated" OnCommand="gridResults_Command" OnRowDataBound="RowDataBound" />                              
    </ClientSettings> 
 
    <MasterTableView DataKeyNames="ID" EnableNoRecordsTemplate="false" PagerStyle-AlwaysVisible="true" Visible="true" 
                     ShowFooter="false" AutoGenerateColumns="false"  AllowPaging="true" FooterStyle-Font-Bold="true" EditMode="PopUp"  > 
          
        <Columns>                                                                                                              
            <telerik:GridEditCommandColumn ButtonType="PushButton" UniqueName="EditTicket"></telerik:GridEditCommandColumn> 
            <telerik:GridHyperLinkColumn HeaderText="link" DataTextField="ID" DataNavigateUrlFields="ID" UniqueName="EditTicket" DataNavigateUrlFormatString="EditAsset.aspx?AssetID={2}"></telerik:GridHyperLinkColumn>                                      
                  
            <telerik:GridBoundColumn DataField="ID" HeaderText="Ticket #" SortExpression="ID" UniqueName="ID" HeaderButtonType="TextButton"><ItemStyle Wrap="false" /></telerik:GridBoundColumn>              
            <telerik:GridBoundColumn DataField="StatusName" HeaderText="Status" SortExpression="tsitil.StatusName" HeaderButtonType="TextButton"></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="Category" HeaderText="Category" SortExpression="tc.Code" HeaderButtonType="TextButton"></telerik:GridBoundColumn>                             
        </Columns> 
          
        <EditFormSettings EditFormType="Template" CaptionDataField="ID" CaptionFormatString="Change Status For Ticket: {0}" PopUpSettings-Modal="true">  
            <FormTemplate>                
                ...       
            </FormTemplate>           
        </EditFormSettings>       
    </MasterTableView>                        
</telerik:RadGrid> 

The Server Side Search Button:

 

protected void btnSearch_Click(object sender, EventArgs e)  
    {  
        //Here is where the search criteria are built and then written to javascript so they can be sent to the web service      
         
        gridResults.DataSource = new int[] { };  
        gridResults.DataBind();  
        gridResults.Visible = true;  
 
        return;  
    } 

The javascript that binds the results of the web service to the grid:

 

function UpdateGrid(result) {  
 
    var tableView = $find("<%= gridResults.ClientID %>").get_masterTableView();                               
    var objData = result["d"];  
    var count = objData["Count"];  
    tableView.set_virtualItemCount(count);  
                      
    tableView.set_dataSource(objData["Data"]);  
    tableView.dataBind();  
 
} 


Is it possible to have an GridEditCommandColumn on a grid that is using client side binding? I am willing to have the popup edit do a postback but I would like to continue binding the grid client side. The Grid / Client Side demo shows that you can use a hyperlink column in a client side grid but I am not sure of the exact format I would need to return from my webservice. Does anyone know if this is documented somewhere? The important part though is to have a GridEditCommandColumn. Is this possible?

Thanks for any help,
Blake

Tsvetoslav
Telerik team
 answered on 05 Mar 2010
3 answers
177 views
Is it possible to assign a list of invalid characters to a RadInput so the user can't even enter them into the textbox?
Shinu
Top achievements
Rank 2
 answered on 05 Mar 2010
3 answers
125 views

Hello...

In radListView how can I set the filter expression with "StartsWith" Criteria.

I can't find any such xriteria in ur Live demos.

Similar to the "StartsWith" in radGrid I need a "StartsWith" criteria implementation in  radListView. Is it possible?

My requirement is to fetch those records from the database whose Names start with a particular alphabet, for instance:names which start with B

Please reply me soon.

-Liji Jose
Rosen
Telerik team
 answered on 05 Mar 2010
4 answers
237 views
Hi,

I have one radcomobobox, on its selectedindexchanged event, I am binding it with new values.
It is ok when I bind it first time, it do show the first item selected. But when the selectedindexchanged event fires, it still shows the previously selected item (only text, when I click on comobo, it shows the new item selected), even though I assign selected index every time on binding.

Below is a code of binding.

  for (i = 0; i <= dtable.Rows.Count - 1; i++) 
     { 
       DDEvent.Items.Add(new RadComboBoxItem("text", "value"); 
     } 
   DDEvent.SelectedIndex = 0 
 
 

I tried this too after the above code, but still not done.

      DDEvent.SelectedItem.Text = DDEvent.Items(0).Text
Mansi
Top achievements
Rank 1
 answered on 05 Mar 2010
2 answers
84 views
Hi,
I have created a Radgrid with unbound columns. Value entered on Filter and filter condition has to be removed from unbound column. Its not happening.  How to achieve it ?

Thanks,
Suresh

Suresh Krishna
Top achievements
Rank 1
 answered on 05 Mar 2010
19 answers
233 views
Hi, I've read all your skinning threads on this forum and can impliment it like that. but their is a problem with that implimentation.

When I create my custom skin, I'm forced to point to individual gif images. for all the buttons. I did change the css file to show to my own sprite.PNG, an it works for the commandbar, but the add, and delete images still point to gif files. Now I can change all of them to point to different png's, but then the whole objective of reducing the http request and having a single sprite is for nothing.

See http://www.4solutions.co.za/telerik/GIF_PNG.jpg
the top is your single sprite.gif and the bottom is my custom sprite.PNG.

I can't sleep at night because of all the rastered edges on images.
How do I create a custom skin, using my own single sprite PNG file.
Like your build in styles, I just want to use ONE image for styling the whole grid, a PNG image.

(I do not the limitation that only certain browsers can use PNG-24 images, but do know how to overcome this by creating multiple transparency layers in a single PNG-8 file)
Anil Kumar Patra
Top achievements
Rank 2
 answered on 05 Mar 2010
0 answers
88 views
Hi team,

I have some problems using one RadUpload inside one UserControl loaded in one ajaxpanel MultipageView. I use the Wizard sample found in demo to load one UC. This uc use one RadUpload, but is not working this this configuration, not downloading files. If I use RadUpload directly inside the page is fine. Exist some registering problem to use RadUpload from one loaded UC.

loading as
protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e) 
    { 
        Control pageViewContents = LoadControl(e.PageView.ID + "CS.ascx"); 
        pageViewContents.ID = e.PageView.ID + "userControl"; 
        e.PageView.Controls.Add(pageViewContents); 
    } 
 

regards, Romi
Pierre
Top achievements
Rank 1
 asked on 05 Mar 2010
5 answers
738 views

hello to all,

                thanks again to sir shinu,

               I would to ask help once again about passing parameter from another page to the radwindow with a grid inside, here's my scenario i have one page contains textboxes that user will input numbers to search the details related to the numbers inputed, for example the user input 123 to the txtbox name TxtAccountNumber.Text then he will click the button Search coming from page  then a radwindow will popup with a grid inside then load the record coming from the database.. how can i do that i tried to put the value from session inside the page but when the radwindow pop up the parameter there is null so its means no value has been carried by my session variable. anyway here's my code. please check and revise if ever..



 

<

 

telerik:RadWindowManager ID="RadWindowManager1" runat="server">

 

 

 

 

 

<Windows>

 

 

 

 

 

<telerik:RadWindow ID="RadWindow1" runat="server" Skin ="Vista" ReloadOnShow ="true"

 

 

Modal ="true" OpenerElementID ="<%#btnSearch.ClientID%>"

 

 

Title ="Transactional" NavigateUrl ="~/CHS/CHSTransactional.aspx?Accountno='123456789'" Width ="580px" Height ="300px" >

 

 

 

 

 

</telerik:RadWindow>

 

 

 

 

 

</Windows>

 

 

</telerik:RadWindowManager>

 

 

 

sample/codes is highly appriciated. 

thanks to all  

gc_0620
Top achievements
Rank 1
 answered on 05 Mar 2010
4 answers
93 views
Any chance the Telerik team could update these to work with the latest release? Q3 2009?

Specially I really need the WebBlue one for the combobox.


Thanks,
Stephen
Stephen
Top achievements
Rank 1
 answered on 04 Mar 2010
3 answers
171 views
In IE7 browser at my client machine, all the transfer buttons of the listbox were blank.
But it shows good in IE8 and firefox. I didnt checked in IE6. (hav a look at the attachment image)

Even, the telerik online demo page for the RADlistbox has same problem in IE7.

Is there any fix for this? Or is it possible to set custom images for these buttons as an alternate?

Please Help.
Roland
Top achievements
Rank 1
 answered on 04 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?