Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Control Rows Number
posted

hi all

I'm new in Infragistics, so i was hoping that you help me with this.

so far i have been able to bind two Bands in one grid (Parent band is A, Child band is B)

what am trying to do is allow the user to add as much as he want to band A, but when it comes to band B, i want allow him to enter one row only under each row in band A

this is what i could do so far

 

function uwgWS_BeforeRowInsertHandler(gridName, parentRowId, rowId, index)
{
var g = igtbl_getGridById(gridName);
alert(g.RowsServerLength);
}

i don't know exactly how it works but i know it is not working because of two things
1- it only count band A, no mater what it never count band B
2- it work on both add buttons for band A and B, and i only want it to work on add button for band B only

thank you again for your help

 

Parents
No Data
Reply
  • 1000
    posted

    I was just looking arround and you are totally true, you can't get this information from the grid. Infragistics team, prove me if I am wrong ;-)

    I see the whole thing a bit confusing.

    UltraWebGrid1.Rows.Count gives you the row count of the band at index 0.

    More logical would be UltraWebGrid1.Band(index of desired band).Rows.Count, I can understand that the Rows is straight to the grid to point to the first band, but still there is something missing to get the other info.

    The same with SelectedRow, that lost me searching and forced me to consult the forums and how to's to find that. (Can be found in DisplayLayout, what is that all about??) As a programmer you start to build up certain knowledge that you interpolate to new things. So because it is in Band 0 you try to select that and find for SelectedRows or similarities, didn't found it and went looking at the Grid level, never tought of DisplayLayout because as the name says, it controls the display, not any grid (Band).

    Hopefully a good suggestion to look in to it.

Children
No Data