This is a migrated thread and some comments may be shown as answers.

function Help me!!

3 Answers 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gennaro
Top achievements
Rank 1
Gennaro asked on 22 Sep 2008, 08:42 AM
Hi!

I have tried to use this written function in java

function SetFirstRowActive() 

  var grid = window["<%= RadGrid1.ClientID %>"]; 
  grid.SetActiveRow(grid.MasterTableView.Rows[0]); 
}

but with an example that I have carried out it does not work you can kindly give a complete example to me working with this function?.

Thanks I attend a your answer.

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 22 Sep 2008, 08:53 AM
Hi Gennaro,

I hope you are using RadGrid for asp.net AJAX. If so you can refer the following help article to get the equivalent code to set the desired row selected on the client  side.
set_activeRow

Princy.
0
Gennaro
Top achievements
Rank 1
answered on 22 Sep 2008, 09:01 AM
Hi Princy,

I have tried also with this function but I do not succeed to make it to work, if you could put a complete example and thus working I see where mistake and thus perhaps I succeed to go ahead with other things, because they are weeks that I try but I do not succeed to us. I premise that they are a principiante in this atmosphere.

Thanks I attend
0
Princy
Top achievements
Rank 2
answered on 23 Sep 2008, 04:13 AM
Hello Gennaro,

Try out the following code to set a row as active.]
aspx:
<input id="Button1" type="button" value="button" onclick="Click()" /> 

js:
  <script type="text/javascript"
    function Click() 
    { 
       var grid = $find("<%= RadGrid1.ClientID %>");        
       grid.set_activeRow(grid.MasterTableView.get_dataItems()[0].get_element());      
    }     
     
    </script> 

Princy.
Tags
Grid
Asked by
Gennaro
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Gennaro
Top achievements
Rank 1
Share this question
or