Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
209 views
Well.

Please notice the bold, italicized line in the function below.  It works fine (retrieves NEW, user-modified values from the RadGrid) after a fresh load of the page, but after a postback of the page, it retrieves the OLD values from the RadGrid.

Is there any Telerik-related reason this would happen?  I really have no idea why the postback page works differently than the original page load.

private static void CaptureChangesInGrid(RadGrid targetGrid)
{
    //Loop through each targetgrid item
    foreach (GridDataItem gridRow in targetGrid.MasterTableView.Items)
    {
        Dictionary<object, object> editDict = new Dictionary<object, object>();
        targetGrid.MasterTableView.ExtractValuesFromItem(editDict, (gridRow as GridEditableItem));
        foreach (GridColumn column in targetGrid.MasterTableView.Columns)
        {
            CustomEditableColumn editableCol = column as CustomEditableColumn;
            GridEditableColumn editColumn = editableCol as GridEditableColumn;
            if (editableCol != null)
            {
                //Find the edit control in the given row
                System.Web.UI.Control editItem = editableCol.FindControlInRow(gridRow);
   
                if (editItem == null)
                {
                    throw new ApplicationException("Unable to find edit control in for column: " + editableCol.HeaderText);
                }
                editableCol.CheckControlForChange(editItem, GetValueFromDictionary(editableCol, editDict));
            }
        }
    }
}

Does anyone have a better way of retrieving user-entered values on a RadGrid which works after successive postbacks to the page?  Or is there a way to fix this?

EnableViewState is enabled for the page.

The data entered is required for modifying the appearance of the page (highlighting for errors in entries, etc.) and thus I cannot have a fresh load performed every time.  An undesirable option might be to place any user-edited data into the viewstate and perform a full refresh of the page and replace old data with the saved viewstate data... but that sounds like a lot of additional code for which I really don't have the time to create.

I'll be here all day, talk to me!

Thanks,
Jon
Marin
Telerik team
 answered on 02 May 2011
1 answer
154 views
Hi;
We are using RADLIST box we have an unusal requirement after everyword inside the listbox there has to be some white spaces in betwwen the word for example "Hello                                                                         World".
but when I give this inside the listbox the spaces get truncated to "Hello World".
Can you please tell me that how can I acihve this functionality as it is very urgent for me.
please let me know ASAP.
Dimitar Terziev
Telerik team
 answered on 02 May 2011
1 answer
84 views

Hi,

Is it possible to make the cursor inside the editor to look bigger? if i change the fonts inside the editor will it be ok?

I am asking because it's for some one with eye problems.


Regards,
Eleni
Rumen
Telerik team
 answered on 02 May 2011
1 answer
52 views
hello,

I have a raddcok dynamically created. I load Usercontrol in that. I put raddock height as auto hence it takes height of usercontrol.

I observed there is some space left at the bottom of raddcock after loading usercontrol. Please see attached image. I tried to use CSS to remove that but didnt helped.

Can you suggest better way to remove that ?
.RadDock
    {
        height: auto;
        margin: 0px 0px 9px 0px;
        padding-bottom:0px !important;
        border-bottom-width:0px;  
    }
Pero
Telerik team
 answered on 02 May 2011
2 answers
138 views
Hello,

I have raddcocks in the raddock layout. I out three table columns and three raddock zones inside these three columns.

I create a raddcock dynamically and load in the raddcock zone. I observed that there is margin left between table left, top right border and raddock. Please see the attached image. I tried to use the css properties but it didnt help.

Can you please suggest good way to remove unwanted margins ?

PN:- I want to set margin to 9px at left, top and right.
Pero
Telerik team
 answered on 02 May 2011
1 answer
57 views
Hello

No matter what i change in the EditModes i always see only the Deisgn and HTML mode.. I never see Preview mode whatever i try.

this is our RadEditor code:
<telerik:RadEditor ID="editEditor" runat="server" Width="100%" Height="650px" ToolsWidth="100%" StripFormattingOnPaste="MSWordNoFonts"
            OnClientCommandExecuting="OnClientCommandExecuting" EnableEmbeddedSkins="true" EditModes="All"
            EnableResize="False" Skin="Web20" OnClientLoad="onEditorLoad" meta:resourcekey="editEditorResource1">

As you can see EditModes is set to "All" but no matter what i change it i always see HTML and Design tabs in bottom of the RadEditor.

Why does this happen?

Rumen
Telerik team
 answered on 02 May 2011
4 answers
220 views

UPDATE: I was able to get the value of column, but I have another question:

I have the following, how do I open up a link to a new window without getting the "sys.webforms.pagerequestmanagerparsererrorexception: the message received from the server could not be parted" error?  I'm trying to assign a http link.

 

 

protected void gridAdmiral_ItemCommand(object source, GridCommandEventArgs e)

 

 

{

 

 

 

if (e.CommandName == "Open")

 

 

{

 

 

 

 

    string id = ((GridDataItem)e.Item).GetDataKeyValue("ID").ToString();

 

 

 

 

    string url = GetOpenLink(id);

 

 

    Response.Write(

 

"<script>");

 

 

    Response.Write(

 

"window.open('" + url + "','_blank')");

 

 

    Response.Write(

 

"</script>");

 

 

}

 

}

Pavlina
Telerik team
 answered on 02 May 2011
3 answers
225 views
Hello

My RadGrid is based on following demo.
http://demos.telerik.com/aspnet-ajax/grid/examples/client/insertupdatedelete/defaultcs.aspx
There is no server side events or server side bindings.

It is functional but i want to do following things

  • I have template columns with edit, delete and other link. When i insert a new row and rebind and repaint on client side the links are not rendered for newly inserted row.
  • Enable row selection Edit link click that is a template column inside grid

   and disable row selection on row click

For all above if i get row object than i can work with it.

I am doing following thing. That works but how to disable row selection? I have onrowselecting event and there i check for eventargs dom to cancel for td but it is throwing an error in the event when i select from below. is there an efficient way?

 

 

 

 

 

And in function i have following code

<telerik:GridTemplateColumn
<ItemTemplate>  
  
 <a href="#" onclick="EditPersonClick('<%#DataBinder.Eval(Container.DataItem, "PersonId")%> 
  
','Person');return false;"> 
Edit
</a
 </ItemTemplate
  
 </telerik:GridTemplateColumn>

 

 

 

function EditPersonClick(personId) { 
var grid = $find(Person_GridFollowUp); 
var masterTable = grid.get_masterTableView(); 
var dataItems = masterTable.get_dataItems(); 
if (dataItems!=null && dataItems.length > 0) { 
for (var i = 0; i < dataItems.length; i++) { 
  
var dbPersonId= dataItems[i].getDataKeyValue("PersonId" 
  
); // primary key 
if (dbPersonId== personId) { 
var row = dataItems[i]; 
row.set_selected(true); 
return
}}}}

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Pavlina
Telerik team
 answered on 02 May 2011
2 answers
149 views
Hi all,

I'm trying to disable a listview on the client side and have been unable to do so even if I do the following:

document.getElementById(

 

'<%=Listview.ClientID %>').disabled = true

I can disable it server side but would rather client side disable it.

Thanks...

 

Jim
Top achievements
Rank 1
 answered on 02 May 2011
1 answer
177 views
Hello

We are using RadEditor and ImageManager to insert images into it...
What we need and could not find the option is to automatically add image width and height tags in the "<img" tag. (After pressing "insert" in Image Manger to add the image to RadEditor)

thank you,
Dror
Rumen
Telerik team
 answered on 02 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?