Jun 04, 2009, 1:02 AM
Check box selection in Gridpanel using version 0.8
hi,
we are using coolite version 0.0.8.
i have select checkbox in gridpanel , i want select only one row in grid. This is i can, but on button click event i have change selectedindex , but previous selectedindex only selected in gridview.how can i slove this.In version 0.7 it's working perfectly.
sample code is following
in checkbox selection i have write following code
i get previous selectedindex row only .Give me a solution.
Thank you.
Regrads
speedstep
we are using coolite version 0.0.8.
i have select checkbox in gridpanel , i want select only one row in grid. This is i can, but on button click event i have change selectedindex , but previous selectedindex only selected in gridview.how can i slove this.In version 0.7 it's working perfectly.
sample code is following
in checkbox selection i have write following code
string LStr_json = e.ExtraParams["Values"];
string[] Lses = new string[100];
string[] Lcno = new string[3];
string[] Lano = new string[3];
string[] Lsys = new string[3];
Lses = LStr_json.Split(',');
if (Lses.GetLength(0) >= 2)
{
Lsys = Lses[1].Split(':');
Lcno = Lses[2].Split(':');
Lano = Lses[0].Split(':');
Lcno = Lcno[1].Split('"');
Lano = Lano[1].Split('"');
}
if (Lcno[1] != "" && Lcno[1]!=null)
{
Session["A_collection_no"] = Lcno[1];
Session["A_article_no"] = Lano[1];
Session["G_sys_id"] = Lsys[1];
}
CheckboxSelectionModel sm = this.GrdPnl1.SelectionModel.Primary as CheckboxSelectionModel;
sm.SingleSelect = true;
StringBuilder sb = new StringBuilder();
foreach (SelectedRow row in sm.SelectedRows)
{
string aaa = row.RowIndex.ToString();
Session["index"] = row.RowIndex.ToString();
}
i have change selectedindex value on button click event like this,
Session["index"] = Convert.ToInt32(Session["index"].ToString()) + 1;
then i have click another button to select current selectedvalue in the grid,the code is
RowSelectionModel sm = this.GrdPnl1.SelectionModel.Primary as RowSelectionModel;
if (Session["A_article_no"] != null)
{
int number_of_record = 20;
int number = Convert.ToInt32(Convert.ToInt32(Session["index"].ToString()) / number_of_record) + 1;
int number1 = Convert.ToInt32(Convert.ToInt32(Session["index"].ToString()) % number_of_record);
PagingToolBar1.PageIndex = number;
Sto1.On("load", new JFunction("this.getSelectionModel().selectRow(" + number1 + ");"), "GrdPnl1", new HandlerConfig { Single = true });
sm.SelectedIndex = number1;}
i get previous selectedindex row only .Give me a solution.
Thank you.
Regrads
speedstep