title: How to get selected row of detail grid in Master-Detail GridView?
body: <p>I'm having a problem on getting the selected rows values of a detail grid. I have master-detail grid in a popup control and it works fine. I also enabled the enable selection to have checkboxes but when i try to run GetSelectedFieldValues on ClientSideEvents of a button it always returns "0". What do i do wrong, i couldn't find it?</p>
  
  <p>Here is the detail grid:</p>
  
  <blockquote>
    <p>
  
  <pre><code>                            AutoGenerateColumns="False"
  </code></pre>
    
    <p>CssFilePath="~/App_Themes/Aqua/{0}/styles.css"</p>
  
  <pre><code>                            CssPostfix="Aqua" 
  
                              OnBeforePerformDataSelect="gv_ParameterTempD_BeforePerformDataSelect"
  </code></pre>
    
    <p>ClientInstanceName="gvC_ParameterTempD"></p>
    
    <p></p>
  
  <pre><code>                                &lt;dxwgv:GridViewCommandColumn
  </code></pre>
    
    <p>ShowSelectCheckbox="True"
    VisibleIndex="0"></p>
  
  <pre><code>                                &lt;/dxwgv:GridViewCommandColumn&gt;
  
                                  &lt;dxwgv:GridViewDataTextColumn
  </code></pre>
    
    <p>Caption="Detay Kodu"
    FieldName="PrmDetailCode" </p>
  
  <pre><code>                                    VisibleIndex="0"&gt;
  
                                  &lt;/dxwgv:GridViewDataTextColumn&gt;
  
                                  &lt;dxwgv:GridViewDataTextColumn
  </code></pre>
    
    <p>Caption="Seçim Adı"
    FieldName="PrmDetailName" </p>
  
  <pre><code>                                    VisibleIndex="2"&gt;
  
                                  &lt;/dxwgv:GridViewDataTextColumn&gt;
  
                                  &lt;dxwgv:GridViewDataTextColumn
  </code></pre>
    
    <p>Caption="Seçim Adı(Grup)" </p>
  
  <pre><code>                                    FieldName="PrmDetailNameG"
  </code></pre>
    
    <p>VisibleIndex="3"></p>
  
  <pre><code>                                &lt;/dxwgv:GridViewDataTextColumn&gt;
  
                                  &lt;dxwgv:GridViewDataTextColumn
  </code></pre>
    
    <p>Caption="Seçim Adı(Stok)" </p>
  
  <pre><code>                                    FieldName="PrmDetailNameS"
  </code></pre>
    
    <p>VisibleIndex="4"></p>
  
  <pre><code>                                &lt;/dxwgv:GridViewDataTextColumn&gt;
  
                                  &lt;dxwgv:GridViewDataTextColumn
  </code></pre>
    
    <p>Caption="Grup Seçimi Yapan" </p>
  
  <pre><code>                                    FieldName="PrmGroupSelector"
  </code></pre>
    
    <p>VisibleIndex="5"></p>
  
  <pre><code>                                &lt;/dxwgv:GridViewDataTextColumn&gt;
  
                                  &lt;dxwgv:GridViewDataTextColumn
  </code></pre>
    
    <p>Caption="Stok Seçimi Yapan" </p>
  
  <pre><code>                                    FieldName="PrmStokSelector"
  </code></pre>
    
    <p>VisibleIndex="6"></p>
  
  <pre><code>                                &lt;/dxwgv:GridViewDataTextColumn&gt;
  
                              &lt;/Columns&gt;
  </code></pre>
  </blockquote>
  
  <p>And this is the button:</p>
  
  <blockquote>
    <p></p>
  
  <pre><code>                &lt;ClientSideEvents Click="function(s,e)
  
                  {
  
                      pcc_Question.Hide();
  
                      gvC_ParameterTempD.GetSelectedFieldValues('PrmDetailName;PrmDetailNameG;PrmDetailNameS',ShowCellValue);
  
                  }"
  
                  /&gt;
  
              &lt;/dxe:ASPxButton&gt;
  </code></pre>
  </blockquote>
  
  <p>and this is the jsscript:</p>
  
  <blockquote>
    <p>function ShowCellValue(values) {</p>
  
  <pre><code>    var value = condition.GetText();
  
      alert(values.length); // here it returns "0"
  
      if(value != "")
  
      {
  
          var newValue = ' ' + value + values + ' = ';
  
          condition.SetText(newValue);
  
      }
  
      else
  
      {
  
          for(var i = 0; i &lt; values.length; i ++) {
  
              value += values[i];
  
          }
  
          condition.SetText(value);
  
      }
  
  
  
  }
  </code></pre>
  </blockquote>
  
  <p>I don't know what i do wrong, </p>
  
  <p>Thanks for the help</p>